Instructions to use treeish/Qwen3.5-4B-oQ4e-MTP-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use treeish/Qwen3.5-4B-oQ4e-MTP-MLX with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("treeish/Qwen3.5-4B-oQ4e-MTP-MLX") config = load_config("treeish/Qwen3.5-4B-oQ4e-MTP-MLX") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use treeish/Qwen3.5-4B-oQ4e-MTP-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "treeish/Qwen3.5-4B-oQ4e-MTP-MLX"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "treeish/Qwen3.5-4B-oQ4e-MTP-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use treeish/Qwen3.5-4B-oQ4e-MTP-MLX with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "treeish/Qwen3.5-4B-oQ4e-MTP-MLX"
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 "treeish/Qwen3.5-4B-oQ4e-MTP-MLX" \ --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"
- Hermes Agent
How to use treeish/Qwen3.5-4B-oQ4e-MTP-MLX 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 "treeish/Qwen3.5-4B-oQ4e-MTP-MLX"
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 treeish/Qwen3.5-4B-oQ4e-MTP-MLX
Run Hermes
hermes
- Atomic Chat
Qwen3.5-4B-oQ4e-MTP-MLX
This is the Qwen3.5-4B model package used by Sprig in Treeish. It combines an oQ4e mixed-precision MLX quant with its vision tower, embedded Multi-Token Prediction head and the chat template validated for Sprig's coding-agent workflow.
The package is intended to be downloaded and loaded as-is. Treeish pins an exact repository commit rather than following main.
Model
- Base model: Qwen/Qwen3.5-4B
- Architecture: dense 4B vision-language model
- Quantisation: oQ4e imatrix-enhanced mixed precision
- Default quantisation: 4-bit affine, group size 64
- Per-tensor overrides: 5 and 6-bit
- Format: MLX safetensors
- MTP: one embedded layer under
language_model.mtp.* - Context length: 262,144 tokens
The package contains 1,250 indexed tensors, including 297 vision-tower tensors and 29 embedded MTP tensors. Its single weight file contains 3,265,391,616 bytes of tensor data.
Provenance
The quantised weights and model configuration are byte-identical to TheWirelessPhoenix/Qwen3.5-4B-oQ4e-mtp at commit 83ceb8e436c02406ab57ab575adee0fbb156934a. That source declares oMLX 0.5.3 as the converter and Qwen3.5-4B as the base model. Its imatrix report records the oqe_code_multilingual calibration dataset with 128 samples at a sequence length of 512. It does not identify the exact base-model commit used for conversion, so this package is a curated, byte-pinned distribution rather than a byte-reproducible conversion recipe.
The chat template is Froggeric's unified Qwen v21.3 template. It is byte-identical to archive/v21_chat_template.jinja in froggeric/Qwen-Fixed-Chat-Templates at commit 9f14778c92c3b5ed3e0738085694c0d3452802dd.
No model, tokenizer or configuration tensors were changed for this release. The release adds the corrected chat template, licence, provenance, a complete single-shard tensor index and file manifest.
Runtime compatibility
This package is validated with Treeish's pinned MLX Swift runtime. A different runtime must support the per-tensor quantisation overrides in config.json and the embedded Qwen MTP layout.
Treeish uses this model from 16 GB of unified memory. Actual headroom depends on context length, cache settings and other running applications.
Treeish validation
The release candidate was validated on a 36 GB M4 Max using the release build of Treeish's benchmark:
- All 1,250 indexed tensors were present exactly once, including the complete vision tower and embedded MTP head.
- Embedded-MTP tool use produced a parsed
search_textcall with the requested query and result count. - The warmed 1,066-token performance fixture averaged 74.6 tokens/s without MTP. MTP blocks 2, 3 and 4 averaged 67.9, 66.4 and 64.1 tokens/s, so Treeish's runtime optimiser can leave MTP disabled for this model and hardware combination.
- Sprig's exact-string edit format produced 7 exact edits from 12 fixtures and 9 structurally valid edits from 12 fixtures in one deterministic-format trial.
These figures describe one machine and one small release fixture. They are not general model benchmarks.
Limitations
This is a low-bit quantisation. It trades some model quality for memory use and local generation speed. Applications should validate it against their own prompts, tool format and runtime before relying on it.
The model package contains no custom executable code. File sizes, SHA-256 digests and source revisions are recorded in RELEASE_MANIFEST.json.
Licence
Qwen3.5-4B is licensed under Apache 2.0. The full licence text is included in LICENSE. The Froggeric template repository also declares Apache 2.0 and is attributed above.
- Downloads last month
- 8
4-bit