--- license: apache-2.0 base_model: - WaveCut/Nanbeige4.2-3B-heretic pipeline_tag: text-generation library_name: mlx tags: - mlx - dwq - 4-bit - nanbeige - heretic - coding - agents --- # Nanbeige4.2-3B Heretic MLX DWQ 4-bit A 4-bit, group-size-32 Distilled Weight Quantization (DWQ) release of [`WaveCut/Nanbeige4.2-3B-heretic`](https://huggingface.co/WaveCut/Nanbeige4.2-3B-heretic). This repository includes a small trusted-code MLX-LM adapter because Nanbeige reuses 22 physical decoder layers over two loops and is not a standard Llama layout at runtime. The adapter preserves shared weights while allocating 44 independent KV caches, one for each loop/layer execution. Unsupported optional Nanbeige architectures are rejected explicitly. ## DWQ calibration - 4 bits, group size 32. - 1,024 training samples and 32 validation samples. - Maximum sequence length: 1,025 tokens. - Seed: 20260722. - Corpus: 528 agentic trajectories plus 528 coding-reasoning examples, deterministically shuffled. - Corpus SHA-256: `a7cfdbe02c124304bf1282bbd5ed7162bfa72dec6750b60ed2d3a68000c7a554`. - Agentic source: `TIGER-Lab/SWE-QA-Pro-SFT-Trajectories` at `b8f5b8a8dcf90bca8b6d70adedac0d20dca02b86`. - Coding source: `nvidia/OpenCodeReasoning` at `20a1ca19c0d050fe9057fc08339d6b370ec1c67a`. | Validation loss | Value | | --- | ---: | | Initial RTN | 0.284 | | Final DWQ | 0.043 | MLX-LM revision: `cf10f962b7a20e63a6df43dbf0faf06070153d40`. ## Usage The model file is repository code, so load it only after reviewing `nanbeige_mlx.py` and pass `--trust-remote-code`. ```bash mlx_lm.generate \ --model WaveCut/Nanbeige4.2-3B-heretic-MLX-DWQ-4bit \ --trust-remote-code \ --prompt "Implement a bounded async worker pool in Python." \ --max-tokens 256 ``` Exact artifact hashes and clean-load smoke-test results are recorded in `release-manifest.json`.