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.
Instructions to use precisit/Qwen4-35B-A3B-Text-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use precisit/Qwen4-35B-A3B-Text-MLX-4bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("precisit/Qwen4-35B-A3B-Text-MLX-4bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use precisit/Qwen4-35B-A3B-Text-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "precisit/Qwen4-35B-A3B-Text-MLX-4bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "precisit/Qwen4-35B-A3B-Text-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use precisit/Qwen4-35B-A3B-Text-MLX-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "precisit/Qwen4-35B-A3B-Text-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "precisit/Qwen4-35B-A3B-Text-MLX-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "precisit/Qwen4-35B-A3B-Text-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use precisit/Qwen4-35B-A3B-Text-MLX-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "precisit/Qwen4-35B-A3B-Text-MLX-4bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default precisit/Qwen4-35B-A3B-Text-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use precisit/Qwen4-35B-A3B-Text-MLX-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "precisit/Qwen4-35B-A3B-Text-MLX-4bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "precisit/Qwen4-35B-A3B-Text-MLX-4bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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.
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):
- 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. - Text partition extracted to BF16 with byte-identity to the source verified for all 1,133 tensors.
- Quantized with the policy above; every tensor independently re-derived and checked before publishing; the payload matched the pre-computed prediction to the byte.
- Packaged for mlx-vlm; every payload byte checked against the quantized artifact.
- 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
4-bit
Model tree for precisit/Qwen4-35B-A3B-Text-MLX-4bit
Base model
Qwen/Qwen4-35B-A3B