Run this model with HF Jobs

Run precisit/Qwen4-35B-A3B-Text-MLX-4bit on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/precisit/Qwen4-35B-A3B-Text-MLX-4bit. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/precisit/Qwen4-35B-A3B-Text-MLX-4bit on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/precisit/Qwen4-35B-A3B-Text-MLX-4bit. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Qwen4-35B-A3B Text MLX 4-bit

A 4-bit MLX quantization of the text path of Qwen/Qwen4-35B-A3B (revision c06f0c19d9411aba77f8d5948f69ae825c7161cb), for Apple Silicon.

Quantization affine, 4 bits, group size 64, uniform
Kept unquantized in BF16: MoE routers and shared-expert gates, hyper-connection block-inject weights, DeltaNet in_proj_a/in_proj_b, the sparse-attention indexer projection, norms and conv1d; the n-gram hash buffers stay I64
Payload 31,775,670,296 bytes (29.6 GiB), 6 shards
Effective size 4.509 bits per parameter over the 56.4B text parameters (scales and biases included)
Included language model, untied lm_head, the n-gram embedding (128 shards), and the MTP head's weights (mlx-vlm drops MTP on load)
Not included the vision tower; this is a text-only package

"35B" is the upstream model's name. The checkpoint's text partition holds 56.4B parameters, most of the difference being the n-gram embedding table. "A3B" is upstream's name for about 3B active parameters per token; it was not measured here.

Bit allocation of model Fig 1. Bit allocation of model as shown on TensorLens (see link for details). The card's 55.0B is the language-model tower; TensorLens counts the MTP head (0.86B) and lm_head (0.51B) separately.

Running it

It needs an mlx-vlm with qwen4_moe support. At the time of writing that is mlx-vlm main, not a release. The package was load-tested at commit bb224121e7f5a88ba727635a2f1ae7a4a9b0ccb1 with mlx 0.32.5:

pip install "mlx-vlm @ git+https://github.com/Blaizzy/mlx-vlm@bb224121e7f5a88ba727635a2f1ae7a4a9b0ccb1"
python -m mlx_vlm.generate --model precisit/Qwen4-35B-A3B-Text-MLX-4bit --prompt "Write a haiku about the sea." --max-tokens 256

mlx-vlm reports that the vision tower has no weights and disables it; that is expected for this text-only package. Stock mlx-lm does not load qwen4_moe yet (ml-explore/mlx-lm#2140 is open), and this package is laid out for mlx-vlm.

Tokenizer and chat template are Qwen's tokenizer-compat/ files, which Qwen provides for ecosystems that use Jinja templates. The template understands enable_thinking and reasoning_effort. The repository's reference tiktoken tokenizer (trust_remote_code) is not included.

Measurements

On a Mac mini (M5 Pro, 64 GB, macOS 27; wired-memory limit 56 GB), mlx 0.32.5:

this package mlx-community/Qwen4-35B-A3B-4bit-text
consumer mlx-vlm @ bb224121 mlx-lm @ #2140 head 7b35ab57
held-out perplexity, EN + SV (169 docs, 217,157 tokens) 10.690 10.567
English / Swedish 8.250 / 12.050 8.231 / 11.860
HumanEval+ pass@1, n = 20 (seed 0) 0.65 0.55
GSM8K, n = 20 0.95 1.00

Generation settings: greedy, reasoning_effort: low, up to 2,048 new tokens, stopping on the tokenizer's end tokens only.

Read this table as a sanity check, not a ranking. The two quantizations have the same nominal recipe (4-bit, g64) but different converters and run on different consumers, because neither loader reads the other's layout today. Twenty items per task puts one item at 5 points. The perplexity difference is small (+1.2% pooled, +0.2% English) but systematic over the documents (paired mean log-ratio +0.016, bootstrap 95% CI +0.010 to +0.023), and it is not attributed: this package keeps more of the model in BF16 than the comparison, so the consumer is the more likely source. No BF16 reference was measured: the 112 GB BF16 text model does not fit in the memory of the test hosts.

Speed, same host, greedy, 1,337-token prompt, 178 generated tokens, 3 runs: about 1,460 prompt tokens/s (warm), 74 generated tokens/s, 33.0 GB peak memory.

How it was made

Converted and quantized with smt (Precisit's Swift conversion tool), streaming in bounded memory (0.3 GiB footprint for a 105 GiB BF16 intermediate):

  1. Source pinned at c06f0c19; every safetensors header reconciled with the index (113,646,523,896 bytes, 56,823,261,843 parameters, exact); all files hashed.
  2. Text partition extracted to BF16 with byte-identity to the source verified for all 1,133 tensors.
  3. Quantized with the policy above; every tensor independently re-derived and checked before publishing; the payload matched the pre-computed prediction to the byte.
  4. Packaged for mlx-vlm; every payload byte checked against the quantized artifact.
  5. Load receipt under the pinned mlx-vlm: all 664 instantiated quantized modules at their declared level, loader file hash equal to the one the packaging rules were read from, coherent generation.

package-manifest.json is smt's packaging record. In the published copy, the local paths in its recorded command line are replaced by $WORKDIR; nothing else in it differs.

Feedback and maintenance

Maintained by Precisit. Please report problems or questions in this repository's Community tab.

License

Apache License 2.0, as the base model. The LICENSE file is Qwen's, unmodified. Weights © Qwen; this repository contains a quantized derivative.

Downloads last month
303
Safetensors
Model size
29B params
Tensor type
U32
·
BF16
·
I64
·
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for precisit/Qwen4-35B-A3B-Text-MLX-4bit

Quantized
(816)
this model