--- license: apache-2.0 base_model: PowerInfer/SmallThinker-4BA0.6B-Instruct tags: - mlx - smallthinker - moe - tool-use - function-calling library_name: mlx pipeline_tag: text-generation --- # SmallThinker-4BA0.6B-Instruct (MLX 4-bit) An MLX 4-bit (group size 64, affine) conversion of [PowerInfer/SmallThinker-4BA0.6B-Instruct](https://huggingface.co/PowerInfer/SmallThinker-4BA0.6B-Instruct): a 4B-total / roughly 0.6B-active dense-attention Mixture-of-Experts model (32 experts, top-4, ReLU-gated), non-thinking Instruct. ## Requires an mlx_lm architecture module Stock `mlx_lm` does not yet ship a `smallthinker` architecture, so this model will not load with an unmodified install. Until the upstream mlx-lm PR lands, copy the included `smallthinker.py` into your `mlx_lm/models/` directory: ```bash cp smallthinker.py "$(python -c 'import mlx_lm,os;print(os.path.join(os.path.dirname(mlx_lm.__file__),"models"))')/" ``` Then: ```bash python -m mlx_lm generate \ --model Aa09876/SmallThinker-4BA0.6B-Instruct-mlx-4bit \ --prompt "Explain a mixture-of-experts model in two sentences." ``` ## Tool calling The model uses the native Hermes tool-call format, `{json}`, and works with servers that select a Hermes tool parser (for example rapid-mlx `--tool-call-parser hermes`, no reasoning parser). ## Provenance and lineage - Base weights: `PowerInfer/SmallThinker-4BA0.6B-Instruct` (Apache-2.0), pinned revision `b51db6d` - Architecture support: a from-scratch `mlx_lm` implementation of the custom `SmallThinkerForCausalLM` (ReLU-gated packed-expert MoE, GQA with 12 query / 2 KV heads, and the model's pre-attention router-input routing). It was numerically parity-checked against the reference PyTorch model: BF16 greedy generation matched token-for-token, router top-k selection matched 100% (tie-adjusted), and per-tensor error stayed at the BF16 rounding floor. - Quantization: MLX 4-bit, group size 64, affine. ## License Apache-2.0, inherited from the base model. Attribution: PowerInfer / IPADS (SmallThinker). This repository redistributes a quantized derivative under the same license.