--- language: - en library_name: mlx pipeline_tag: text-generation license: apache-2.0 base_model: Qwen/Qwen3.6-35B-A3B base_model_relation: quantized datasets: - aisamdasu/algocean-fable5-traces tags: - mlx - optiq - quantized - mixed-precision - qwen3.6 - qwen3.5-moe - lora - sft - tool-use - agentic - langgraph - fable5 --- # Algocean-Qwen3.6-35B-A3B-mlx-OptiQ Quality-first OptiQ MLX release of the Algocean fine-tune derived from `Qwen/Qwen3.6-35B-A3B`. The source model for this quantized release is `aisamdasu/Algocean-Qwen3.6-35B-A3B-mlx`, which was produced by merging the best LoRA checkpoint from the Algocean SFT run. This artifact keeps the same text-focused MLX scope as the merged MLX release: the current `mlx-lm` Qwen3.5-MoE conversion stores language-model weights and omits `model.visual`. ## Use ```bash pip install mlx-lm ``` ```python from mlx_lm import load, generate model, tokenizer = load("aisamdasu/Algocean-Qwen3.6-35B-A3B-mlx-OptiQ") messages = [{"role": "user", "content": "Create a concise LangGraph plan for a repo refactor."}] prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True) response = generate(model, tokenizer, prompt=prompt, max_tokens=512, verbose=True) ``` ## Artifact | item | value | |---|---:| | Format | MLX safetensors | | Quantization | OptiQ mixed precision | | Shards | 7 | | Weight size in MLX index | 36,036,335,872 bytes | | Parameters in MLX index | 34,660,608,768 | | Converter output size | 34,367.2 MB | | Visual weights | omitted | | Integrity file | `SHA256SUMS` | ## OptiQ Settings | key | value | |---|---| | Method | `optiq_mixed_precision` | | Source artifact | `aisamdasu/Algocean-Qwen3.6-35B-A3B-mlx` | | Target BPW | 4.5 | | Achieved BPW | 4.733167 | | Candidate bits | 4, 8 | | Allocation | 297 tensors at 4-bit, 94 tensors at 8-bit | | Reference | `uniform_4bit` | | Group size | 64 | | Calibration source | `aisamdasu/algocean-fable5-traces` train split | | Calibration mix | 512 train records sampled before eval separation | | Exact calibration | 24 samples, 48 calibration sequences, seq_len 512 | | Evaluated tensors | 391 | | Skipped sensitivity entries | 120 entries without BF16 source match | This is the quality-first OptiQ export from this run. Instead of publishing a smaller static or uniform 4-bit artifact, the exact OptiQ pass measured layer sensitivity on the FABLE/LangGraph calibration mix and kept the more sensitive tensors at 8-bit. The result is larger than a uniform 4-bit model, but preserves more capacity in the layers that measured as most sensitive for this calibration workload. ## Training | key | value | |---|---| | Base model | `Qwen/Qwen3.6-35B-A3B` | | Dataset | `aisamdasu/algocean-fable5-traces` | | Train / eval rows | 30,265 / 512 | | Selected source rows | Crownelius 26,938 + kelexine 3,839 | | Dedup skipped | 1,721 | | Fine-tune method | LoRA SFT | | LoRA target modules | `q_proj`, `v_proj` | | LoRA rank / alpha / dropout | 16 / 32 / 0.0 | | Max sequence length | 16,384 | | Optimizer / schedule | AdamW fused / cosine | | Learning rate / warmup | 1e-5 / 0.03 | | Batch / grad accumulation | 1 / 1 | | Max steps | 4,000 | | Eval / save interval | 200 / 200 | | GPU | Modal B200 x1 | | Runtime | 7,934.71 sec | ## Checkpoint Selection The published weights use checkpoint `3600`, not the final step `4000`. | step | eval loss | eval PPL | note | |---:|---:|---:|---| | 200 | 1.300712 | 3.671911 | first eval | | 3200 | 1.067631 | 2.908480 | near plateau | | 3400 | 1.067996 | 2.909543 | regression | | 3600 | 1.066911 | 2.906388 | selected best | | 3800 | 1.067495 | 2.908084 | worse than best | | 4000 | 1.067005 | 2.906661 | final, slightly worse | Best checkpoint rationale: - `3600` has the lowest validation loss: `1.066911`. - Final step `4000` is very close but still higher: `+0.000094` eval loss. - The curve flattened after `3200`, so selecting `3600` keeps the best validation point without chasing extra train loss. ![Eval loss vs step](./eval_loss_vs_step.png) ![Train vs eval loss](./train_vs_eval_loss.png) ![Learning rate vs step](./learning_rate_vs_step.png) ## Metrics | metric | value | |---|---:| | Best eval loss | 1.066911 | | Best eval perplexity | 2.906388 | | Final eval loss | 1.067005 | | Final eval perplexity | 2.906661 | | Trainer average train loss | 0.494604 | | Last logged train loss | 0.996137 | | Train samples/sec | 0.504 | | Train steps/sec | 0.504 | | Eval samples/sec at final eval | 2.088 | ## Comparison Notes This OptiQ artifact is selected for fidelity under the available local export options: best validation checkpoint first, then exact OptiQ sensitivity allocation instead of static quantization. It is not claiming a public benchmark win over the base model, the merged MLX model, or the upstream OptiQ model; that would require the same held-out benchmark harness across all models. The comparison recorded here is based on the completed training run's validation curve and the OptiQ allocation metadata. ## Intended Use This model is intended for local MLX inference experiments around agentic coding, tool-use traces, and LangGraph-style planning. It is not a general safety-tuned assistant release.