Image-Text-to-Text
Safetensors
MLX
mtplx
qwen4_exp
apple-silicon
macos
speculative-decoding
multi-token-prediction
qwen
qwen3.8-flash-next
Mixture of Experts
mtp
local-ai
chat
qwen3.8
qwen3-8
qwen-3.8
local-llm
llm
8-bit precision
vision
m5-max
m3-ultra
mac-studio
opencode
claude-code
flash-next
qwen3-8-flash-next
qwen4
125b
conversational
Instructions to use Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality 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("Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality") config = load_config("Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality") # 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 Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality"
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": "Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality 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 "Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality"
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 Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality"
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 "Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality" \ --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"
File size: 3,477 Bytes
072dd0b b8fb374 56b2d9f 072dd0b b8fb374 d945fdf b8fb374 d945fdf b8fb374 d945fdf 072dd0b d945fdf 072dd0b b8fb374 072dd0b d945fdf 072dd0b b8fb374 072dd0b 470d66a d945fdf 470d66a 072dd0b b8fb374 072dd0b d945fdf b8fb374 d945fdf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | ---
license: other
license_name: qwen-community-1.0
license_link: LICENSE
library_name: mtplx
pipeline_tag: image-text-to-text
base_model: Qwen/Qwen3.8-Flash-Next
base_model_relation: quantized
tags:
- mlx
- apple-silicon
- macos
- speculative-decoding
- multi-token-prediction
- qwen
- qwen3.8-flash-next
- moe
- mtp
- mtplx
- local-ai
- chat
- qwen3.8
- qwen3-8
- qwen-3.8
- local-llm
- llm
- 8-bit
- vision
- m5-max
- m3-ultra
- mac-studio
- opencode
- claude-code
- flash-next
- qwen3-8-flash-next
- qwen4
- 125b
---
**[MTPLX](https://mtplx.com): the fastest way to run Qwen 3.8 on a Mac. Native multi-token-prediction speculative decoding on Apple Silicon, two to three times the speed of plain decoding, exact at any temperature.**
# Qwen 3.8 Flash-Next Optimized Quality
**8-bit body and MTP head, BF16 structural tensors, and a 4-bit n-gram table. Higher-fidelity Flash-Next build.**
Qwen's 125B-A6B Flash-Next preview, the Qwen4-generation architecture with GDN
hybrid MoE, Qwen Sparse Attention and the 51B-parameter n-gram memory, at
8 bits: the highest-fidelity way to run it on a Mac, with its native
multi-token-prediction head drafting through [MTPLX](https://mtplx.com)'s
speculative path. It is built for Mac Studio with 256 GB or 512 GB. On a
128 GB Mac, pick
[Optimized Speed](https://huggingface.co/Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Speed),
the recommended build.
The 32 GB n-gram table streams from SSD, so only the weights stay in memory:
about 128.5 GiB, which leaves about 59.5 GiB for context and the session cache
on a 256 GB Mac.
## How it is built
- The experts, attention and the multi-token-prediction head at 8 bits with
64-weight groups, twice the precision of Optimized Speed.
- The structural weights stay in BF16.
- The n-gram table at 4 bits, as a separate sidecar that MTPLX streams from
SSD. The vision tower is preserved in the weights.
| | |
|---|---|
| Download | 170 GB (includes the 32 GB n-gram table) |
| Weights in memory (n-gram on SSD) | about 128.5 GiB |
| Recommended Macs | 256 GB and 512 GB (on 128 GB, use Optimized Speed) |
| Context window | 262,144 tokens |
| MTP depth | adaptive, ceiling 3 |
| Sampling | temperature 1.0, top-p 0.95, top-k 20 (the official Qwen 3.8 contract) |
Speed on 256 GB and 512 GB Macs has not been measured yet. The 8-bit weights
move twice the bytes per token of Optimized Speed, so it decodes slower.
The serving contract ships inside `mtplx_runtime.json`. MTPLX reads it on
load. Drafts are accepted with the probability-ratio rule plus residual
resampling, so the output follows the model's own distribution at any
temperature.
## Use it
Mac app (MTPLX 2.12.0 or later): download at
[mtplx.com](https://mtplx.com), pick "Qwen 3.8 Flash-Next Optimized Quality".
On Macs with 256 GB or more it is listed second, after Optimized Speed.
Command line (MTPLX 2.12.0 or later):
```bash
pip install mtplx
mtplx serve --model Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Quality --model-id mtplx-flash-next-optimized-quality
```
Siblings: [Optimized Speed](https://huggingface.co/Youssofal/Qwen3.8-Flash-Next-MTPLX-Optimized-Speed)
(the recommended build) and
[Bare Speed](https://huggingface.co/Youssofal/Qwen3.8-Flash-Next-MTPLX-Bare-Speed)
(flat 4-bit, the quickest build).
Base model: [Qwen/Qwen3.8-Flash-Next](https://huggingface.co/Qwen/Qwen3.8-Flash-Next)
(Qwen Community License; the upstream model card is preserved in this repo as
`README-upstream-qwen.md`).
|