Image-Text-to-Text
MLX
Safetensors
qwen4_exp
mlx-vlm
omlx
oq
mtp
speculative-decoding
qwen
qwen3.8
mixture-of-experts
vision-language
quantized
apple-silicon
4-bit precision
conversational
Instructions to use TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP 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("TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP") config = load_config("TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP") # 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 TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP"
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": "TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP 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 "TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP"
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 TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP"
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 "TensorFold/Qwen3.8-Flash-Next-MLX-oQ4-MTP" \ --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"
Add Mac memory chooser and reproducible demo prompt
Browse files
README.md
CHANGED
|
@@ -22,10 +22,12 @@ tags:
|
|
| 22 |
- 4-bit
|
| 23 |
---
|
| 24 |
|
|
|
|
| 25 |
<p align="center">
|
| 26 |
<a href="https://qwen.ai/"><img src="qwen-logo.png" width="96" height="95" alt="Qwen"></a>
|
| 27 |
</p>
|
| 28 |
|
|
|
|
| 29 |
<p align="center">
|
| 30 |
<img src="https://img.shields.io/badge/Qwen-Qwen3.8-615CED?style=for-the-badge&logo=qwen&logoColor=white" alt="Qwen Qwen3.8">
|
| 31 |
<img src="https://img.shields.io/badge/Apple_Silicon-MLX-000000?style=for-the-badge&logo=apple&logoColor=white" alt="Apple silicon MLX">
|
|
@@ -33,12 +35,15 @@ tags:
|
|
| 33 |
<img src="https://img.shields.io/badge/Vontra-oQ4-6E56CF?style=for-the-badge&logo=huggingface&logoColor=white" alt="Vontra oQ4">
|
| 34 |
</p>
|
| 35 |
|
|
|
|
| 36 |
<h1 align="center">Qwen3.8 Flash Next — MLX oQ4 with native MTP</h1>
|
| 37 |
|
|
|
|
| 38 |
<p align="center">
|
| 39 |
A mixed-precision MLX conversion of <a href="https://huggingface.co/Qwen/Qwen3.8-Flash-Next">Qwen/Qwen3.8-Flash-Next</a>, quantised directly from the official BF16 checkpoint with its native MTP draft block preserved.
|
| 40 |
</p>
|
| 41 |
|
|
|
|
| 42 |
<p align="center">
|
| 43 |
<a href="https://huggingface.co/Qwen/Qwen3.8-Flash-Next">Original model</a> ·
|
| 44 |
<a href="https://qwen.ai/blog?id=qwen3.8-flash-next">Qwen overview</a> ·
|
|
@@ -46,10 +51,13 @@ tags:
|
|
| 46 |
<a href="LICENSE">Qwen Community License 1.0</a>
|
| 47 |
</p>
|
| 48 |
|
|
|
|
| 49 |
## About this conversion
|
| 50 |
|
|
|
|
| 51 |
This repository contains an oQ4 mixed-precision MLX conversion produced directly from Qwen's BF16 weights. Layer sensitivity was measured with a validated local proxy. Every final tensor, including the native MTP head, was rebuilt from the official BF16 checkpoint. Group size 32 supports the model's 160-wide hashed n-gram embedding tables.
|
| 52 |
|
|
|
|
| 53 |
| Item | Value |
|
| 54 |
| --- | --- |
|
| 55 |
| Repository | `Vontra/Qwen3.8-Flash-Next-MLX-oQ4-MTP` |
|
|
@@ -65,27 +73,36 @@ This repository contains an oQ4 mixed-precision MLX conversion produced directly
|
|
| 65 |
| Configured context | 262,144 tokens |
|
| 66 |
| Architecture | `qwen4_exp` vision-language sparse MoE |
|
| 67 |
|
|
|
|
| 68 |
The upstream tokenizer, chat template, vision processor, generation configuration, and native MTP configuration are preserved.
|
| 69 |
|
|
|
|
| 70 |
> [!IMPORTANT]
|
| 71 |
> This checkpoint requires an oMLX or MLX-VLM runtime with explicit `qwen4_exp` native-MTP support. Stock runtimes that do not construct the Qwen4Exp MTP module may reject the 76 MTP tensors during strict weight loading.
|
| 72 |
|
|
|
|
| 73 |
> [!CAUTION]
|
| 74 |
> Do not attach a Qwen3.8 27B drafter to this model. Flash Next has different hidden dimensions and ships its own matching MTP block here.
|
| 75 |
|
|
|
|
| 76 |
## Download and use
|
| 77 |
|
|
|
|
| 78 |
```bash
|
| 79 |
hf download Vontra/Qwen3.8-Flash-Next-MLX-oQ4-MTP \
|
| 80 |
--local-dir Qwen3.8-Flash-Next-MLX-oQ4-MTP
|
| 81 |
```
|
| 82 |
|
|
|
|
| 83 |
Add the downloaded directory to an MTP-capable oMLX installation, select the model, and enable native MTP in its model settings.
|
| 84 |
|
|
|
|
| 85 |
## Apple M3 Studio performance
|
| 86 |
|
|
|
|
| 87 |
Validated with native MTP enabled in oMLX on an Apple M3 Studio:
|
| 88 |
|
|
|
|
| 89 |
| Test | Output tokens | Speed |
|
| 90 |
| --- | ---: | ---: |
|
| 91 |
| Raw completion, first measured run | 32 | 29.4 tokens/s |
|
|
@@ -93,14 +110,19 @@ Validated with native MTP enabled in oMLX on an Apple M3 Studio:
|
|
| 93 |
| Exact-instruction chat | 27 | 17.4 tokens/s |
|
| 94 |
| Casual chat | 71 | 39.7 tokens/s |
|
| 95 |
|
|
|
|
| 96 |
The two deterministic raw-completion runs produced identical output. The exact-instruction test returned `hello`, and the longer chat completed coherently without repetition or cache-reconciliation errors. Native MTP remained active throughout, with 58.3 to 89.5% draft acceptance across these tests.
|
| 97 |
|
|
|
|
| 98 |
Results vary with prompt length, cache state, sampling settings, runtime version, and memory pressure.
|
| 99 |
|
|
|
|
| 100 |
## Architecture
|
| 101 |
|
|
|
|
| 102 |
Qwen3.8 Flash Next combines Gated DeltaNet, Qwen Sparse Attention, sparse mixture-of-experts layers, widened gated residual streams, hashed bigram and trigram embeddings, and a native next-token prediction block for speculative decoding.
|
| 103 |
|
|
|
|
| 104 |
| Architecture detail | Upstream value |
|
| 105 |
| --- | ---: |
|
| 106 |
| Language-model parameters | 125B total / 6B active |
|
|
@@ -112,20 +134,61 @@ Qwen3.8 Flash Next combines Gated DeltaNet, Qwen Sparse Attention, sparse mixtur
|
|
| 112 |
| Native configured context | 262,144 tokens |
|
| 113 |
| Native MTP draft blocks | 1 |
|
| 114 |
|
|
|
|
| 115 |
For upstream evaluations, intended use, limitations, safety guidance, and the complete architecture discussion, see the [original model card](https://huggingface.co/Qwen/Qwen3.8-Flash-Next).
|
| 116 |
|
|
|
|
| 117 |
## Conversion and validation
|
| 118 |
|
|
|
|
| 119 |
- The converter read the official BF16 checkpoint directly.
|
| 120 |
- Sensitivity-guided allocation used a 4-bit base and 232 protected or overridden modules.
|
| 121 |
- Structural validation checked all 3,747 indexed tensors and all 22 shards.
|
| 122 |
- MTP validation confirmed one configured draft layer and 76 converted MTP tensor entries.
|
| 123 |
- Live generation validation covered deterministic completion, exact-instruction chat, coherent chat, MTP telemetry, and cache rollback.
|
| 124 |
|
|
|
|
| 125 |
This is a community conversion, not an official Qwen release.
|
| 126 |
|
|
|
|
| 127 |
## License and attribution
|
| 128 |
|
|
|
|
| 129 |
The upstream model is released under the **Qwen Community License 1.0**. The required licence text is included in this repository.
|
| 130 |
|
|
|
|
| 131 |
Model design, training, evaluations, and upstream documentation belong to Qwen and the original contributors. The MLX conversion and packaging are provided by [Vontra](https://huggingface.co/Vontra).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
- 4-bit
|
| 23 |
---
|
| 24 |
|
| 25 |
+
|
| 26 |
<p align="center">
|
| 27 |
<a href="https://qwen.ai/"><img src="qwen-logo.png" width="96" height="95" alt="Qwen"></a>
|
| 28 |
</p>
|
| 29 |
|
| 30 |
+
|
| 31 |
<p align="center">
|
| 32 |
<img src="https://img.shields.io/badge/Qwen-Qwen3.8-615CED?style=for-the-badge&logo=qwen&logoColor=white" alt="Qwen Qwen3.8">
|
| 33 |
<img src="https://img.shields.io/badge/Apple_Silicon-MLX-000000?style=for-the-badge&logo=apple&logoColor=white" alt="Apple silicon MLX">
|
|
|
|
| 35 |
<img src="https://img.shields.io/badge/Vontra-oQ4-6E56CF?style=for-the-badge&logo=huggingface&logoColor=white" alt="Vontra oQ4">
|
| 36 |
</p>
|
| 37 |
|
| 38 |
+
|
| 39 |
<h1 align="center">Qwen3.8 Flash Next — MLX oQ4 with native MTP</h1>
|
| 40 |
|
| 41 |
+
|
| 42 |
<p align="center">
|
| 43 |
A mixed-precision MLX conversion of <a href="https://huggingface.co/Qwen/Qwen3.8-Flash-Next">Qwen/Qwen3.8-Flash-Next</a>, quantised directly from the official BF16 checkpoint with its native MTP draft block preserved.
|
| 44 |
</p>
|
| 45 |
|
| 46 |
+
|
| 47 |
<p align="center">
|
| 48 |
<a href="https://huggingface.co/Qwen/Qwen3.8-Flash-Next">Original model</a> ·
|
| 49 |
<a href="https://qwen.ai/blog?id=qwen3.8-flash-next">Qwen overview</a> ·
|
|
|
|
| 51 |
<a href="LICENSE">Qwen Community License 1.0</a>
|
| 52 |
</p>
|
| 53 |
|
| 54 |
+
|
| 55 |
## About this conversion
|
| 56 |
|
| 57 |
+
|
| 58 |
This repository contains an oQ4 mixed-precision MLX conversion produced directly from Qwen's BF16 weights. Layer sensitivity was measured with a validated local proxy. Every final tensor, including the native MTP head, was rebuilt from the official BF16 checkpoint. Group size 32 supports the model's 160-wide hashed n-gram embedding tables.
|
| 59 |
|
| 60 |
+
|
| 61 |
| Item | Value |
|
| 62 |
| --- | --- |
|
| 63 |
| Repository | `Vontra/Qwen3.8-Flash-Next-MLX-oQ4-MTP` |
|
|
|
|
| 73 |
| Configured context | 262,144 tokens |
|
| 74 |
| Architecture | `qwen4_exp` vision-language sparse MoE |
|
| 75 |
|
| 76 |
+
|
| 77 |
The upstream tokenizer, chat template, vision processor, generation configuration, and native MTP configuration are preserved.
|
| 78 |
|
| 79 |
+
|
| 80 |
> [!IMPORTANT]
|
| 81 |
> This checkpoint requires an oMLX or MLX-VLM runtime with explicit `qwen4_exp` native-MTP support. Stock runtimes that do not construct the Qwen4Exp MTP module may reject the 76 MTP tensors during strict weight loading.
|
| 82 |
|
| 83 |
+
|
| 84 |
> [!CAUTION]
|
| 85 |
> Do not attach a Qwen3.8 27B drafter to this model. Flash Next has different hidden dimensions and ships its own matching MTP block here.
|
| 86 |
|
| 87 |
+
|
| 88 |
## Download and use
|
| 89 |
|
| 90 |
+
|
| 91 |
```bash
|
| 92 |
hf download Vontra/Qwen3.8-Flash-Next-MLX-oQ4-MTP \
|
| 93 |
--local-dir Qwen3.8-Flash-Next-MLX-oQ4-MTP
|
| 94 |
```
|
| 95 |
|
| 96 |
+
|
| 97 |
Add the downloaded directory to an MTP-capable oMLX installation, select the model, and enable native MTP in its model settings.
|
| 98 |
|
| 99 |
+
|
| 100 |
## Apple M3 Studio performance
|
| 101 |
|
| 102 |
+
|
| 103 |
Validated with native MTP enabled in oMLX on an Apple M3 Studio:
|
| 104 |
|
| 105 |
+
|
| 106 |
| Test | Output tokens | Speed |
|
| 107 |
| --- | ---: | ---: |
|
| 108 |
| Raw completion, first measured run | 32 | 29.4 tokens/s |
|
|
|
|
| 110 |
| Exact-instruction chat | 27 | 17.4 tokens/s |
|
| 111 |
| Casual chat | 71 | 39.7 tokens/s |
|
| 112 |
|
| 113 |
+
|
| 114 |
The two deterministic raw-completion runs produced identical output. The exact-instruction test returned `hello`, and the longer chat completed coherently without repetition or cache-reconciliation errors. Native MTP remained active throughout, with 58.3 to 89.5% draft acceptance across these tests.
|
| 115 |
|
| 116 |
+
|
| 117 |
Results vary with prompt length, cache state, sampling settings, runtime version, and memory pressure.
|
| 118 |
|
| 119 |
+
|
| 120 |
## Architecture
|
| 121 |
|
| 122 |
+
|
| 123 |
Qwen3.8 Flash Next combines Gated DeltaNet, Qwen Sparse Attention, sparse mixture-of-experts layers, widened gated residual streams, hashed bigram and trigram embeddings, and a native next-token prediction block for speculative decoding.
|
| 124 |
|
| 125 |
+
|
| 126 |
| Architecture detail | Upstream value |
|
| 127 |
| --- | ---: |
|
| 128 |
| Language-model parameters | 125B total / 6B active |
|
|
|
|
| 134 |
| Native configured context | 262,144 tokens |
|
| 135 |
| Native MTP draft blocks | 1 |
|
| 136 |
|
| 137 |
+
|
| 138 |
For upstream evaluations, intended use, limitations, safety guidance, and the complete architecture discussion, see the [original model card](https://huggingface.co/Qwen/Qwen3.8-Flash-Next).
|
| 139 |
|
| 140 |
+
|
| 141 |
## Conversion and validation
|
| 142 |
|
| 143 |
+
|
| 144 |
- The converter read the official BF16 checkpoint directly.
|
| 145 |
- Sensitivity-guided allocation used a 4-bit base and 232 protected or overridden modules.
|
| 146 |
- Structural validation checked all 3,747 indexed tensors and all 22 shards.
|
| 147 |
- MTP validation confirmed one configured draft layer and 76 converted MTP tensor entries.
|
| 148 |
- Live generation validation covered deterministic completion, exact-instruction chat, coherent chat, MTP telemetry, and cache rollback.
|
| 149 |
|
| 150 |
+
|
| 151 |
This is a community conversion, not an official Qwen release.
|
| 152 |
|
| 153 |
+
|
| 154 |
## License and attribution
|
| 155 |
|
| 156 |
+
|
| 157 |
The upstream model is released under the **Qwen Community License 1.0**. The required licence text is included in this repository.
|
| 158 |
|
| 159 |
+
|
| 160 |
Model design, training, evaluations, and upstream documentation belong to Qwen and the original contributors. The MLX conversion and packaging are provided by [Vontra](https://huggingface.co/Vontra).
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
<!-- vontra-chooser-start -->
|
| 165 |
+
## Choose for your Mac
|
| 166 |
+
|
| 167 |
+
[64GB Macs](https://huggingface.co/collections/Vontra/mlx-models-for-64gb-macs-6a9fefda17932216ec9ab457) · [128GB Macs](https://huggingface.co/collections/Vontra/mlx-models-for-128gb-macs-6a9ff0abd31bc9abbe7922d7) · [256GB Macs](https://huggingface.co/collections/Vontra/mlx-models-for-256gb-macs-6a9ff0ef9fed7c5bdca15e9b)
|
| 168 |
+
|
| 169 |
+
No measured memory tier is assigned here. The collections use published M3 Studio peaks with at least 25% nominal headroom; fit on other Macs is an estimate, and full context is not guaranteed. Start with short context and one request.
|
| 170 |
+
|
| 171 |
+
### Runtime and evidence
|
| 172 |
+
|
| 173 |
+
The exact tested oMLX application version is not recorded here; a library version is not an app version. The original performance tables retain their benchmark conditions and speed figures; this documentation update adds no new test results.
|
| 174 |
+
|
| 175 |
+
An unresolved [long-generation repetition report](https://huggingface.co/Vontra/Qwen3.8-Flash-Next-MLX-oQ4/discussions/2) involves oQ4-MTP; this update does not establish a fix.
|
| 176 |
+
|
| 177 |
+
### Quick start and demo prompt
|
| 178 |
+
|
| 179 |
+
```bash
|
| 180 |
+
hf download Vontra/Qwen3.8-Flash-Next-MLX-oQ4-MTP --local-dir ./models/Qwen3.8-Flash-Next-MLX-oQ4-MTP
|
| 181 |
+
```
|
| 182 |
+
|
| 183 |
+
Add the downloaded folder to oMLX model directories, refresh the list, and follow this card's architecture and MTP compatibility requirements before loading.
|
| 184 |
+
|
| 185 |
+
Try this in a new chat with a 128-token output limit:
|
| 186 |
+
|
| 187 |
+
```text
|
| 188 |
+
Explain why the sky looks blue in three short sentences.
|
| 189 |
+
```
|
| 190 |
+
|
| 191 |
+
This is a demo prompt to try, not a recorded successful run; a captured demonstration for this documentation update is not yet available.
|
| 192 |
+
|
| 193 |
+
[Follow Vontra for new Apple Silicon releases and fixes.](https://huggingface.co/Vontra)
|
| 194 |
+
<!-- vontra-chooser-end -->
|