Instructions to use Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit 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("Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit") config = load_config("Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit") # 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 Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit"
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": "Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit 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 "Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit"
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 Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit"
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 "Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit" \ --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"
Qwen3.8-Flash-Next MLX Mixed 2-bit/4-bit
This is a reproducible MLX conversion of
Qwen/Qwen3.8-Flash-Next at immutable
revision f5d08274bafd880402bd16f5e3e6c514136ec06c.
The 48 base routed-expert banks use MLX affine Q2/group-128, the 160-wide n-gram table and remaining eligible core/MTP matrices use Q4, while token/output embeddings, QSA indexers, routers, vision, and MTP fusion heads remain BF16. This is the 128 GB Mac profile.
- Artifact payload: 68.08 GiB
- Quantized Q2 modules: 144
- Quantized Q4/group-32 modules: 128
- Quantized Q4/group-64 modules: 682
- Source: 180B parameters including 125B main, 51B n-gram embedding, and 4B MTP
- Native model context: 262,144 tokens; see the v0.45.0 runtime limit below.
Run locally with mere.run
Native support is available as of mere.run v0.45.0. The instructions below use its Apple Silicon Swift/MLX runtime. No Python environment, local quantization, or separate MTP-model download is needed.
Requirements and current limits
- Apple Silicon Mac, macOS 15 or later, with 128 GB unified memory recommended.
- Enough free disk space for the approximately 68.08 GiB checkpoint; a fresh v0.45.0 pull budgets about 82 GiB including safety headroom. Leave memory available for macOS and runtime buffers.
- In v0.45.0, text generation is qualified; image input is not yet qualified,
despite the model's upstream multimodal architecture and
vision-chatID. - Prompt plus requested output must fit within 2,048 tokens, including chat
template/system tokens. The upstream 262,144-token context is not yet available
in this runtime: long-context QSA selection is still being integrated. Requests
above the current budget are rejected. Set
--max-tokensexplicitly; the generic 2,048-token output default leaves no room for a prompt.
1. Install or update mere.run
Download mere.run v0.45.0 or newer from the mere.run releases page, install MereRun in Applications, then open the app's Settings and choose Install CLI. Existing installations can use MereRun > Check for Updates… and reinstall the CLI from Settings if needed.
mere.run --version
This should report 0.45.0 or later. See the
getting-started guide for installation details.
2. Pull this pre-quantized checkpoint
After reviewing the Qwen Community License 1.0:
mere.run model pull vision-chat-q38-flash-next-mixed \
--accept-license-terms
Use this managed model ID, not the Hugging Face repository name, with the commands below. It resolves to this Sawfwair mixed Q2/Q4 distribution and includes the bundled MTP head. The repository is public and ungated; the acceptance flag records acknowledgement of the model's terms, not a request for gated access.
For an external SSD, add --cache-dir /Volumes/Models/huggingface-cache to the
pull command, substituting your mounted drive's path. Keep that drive mounted
while using the model. To inspect support and download requirements without
downloading, add --preflight --json to the pull command.
3. Generate text with verified MTP
mere.run text chat \
--model vision-chat-q38-flash-next-mixed \
--context-size 2048 \
--max-tokens 256 \
--temperature 0 \
--no-thinking \
--stream \
--stats \
--prompt "Explain sparse attention in three short sentences."
--temperature 0 selects greedy decoding, which uses the bundled MTP draft head
by default for eligible requests. Proposed tokens are verified by the full target
model. No opt-in flag or extra checkpoint is required. --stats reports local
generation timing; --no-thinking keeps this short example focused on the answer.
For a target-only comparison or to avoid loading the draft head, prefix the same
command with MERERUN_Q35_MTP_SPECULATION=0.
4. Serve a local OpenAI-compatible API
After the pull completes, start the server:
mere.run api serve \
--engine text-chat-q36 \
--model vision-chat-q38-flash-next-mixed \
--context-size 2048 \
--host 127.0.0.1 \
--port 8080
text-chat-q36 is the shared Qwen-family serving engine; it also dispatches this
Qwen3.8-Flash-Next model. Startup loads and warms the target and MTP graphs before
the server begins listening, so allow the initial warmup to finish.
From another terminal:
curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "vision-chat-q38-flash-next-mixed",
"messages": [{"role": "user", "content": "Explain sparse attention in three short sentences."}],
"max_tokens": 256,
"temperature": 0
}'
The example binds to localhost only. If you have configured MERERUN_API_KEY,
include its bearer token in requests. See the
API guide for authentication and client setup.
Runtime status
The tensor inventory, source hashes, MLX packing, fused-expert split, convolution
layout, and zero-centered RMSNorm conversion are validated by the bundled
MERERUN_CONVERSION.json. A Qwen4Exp-aware MLX runtime is required; do not
expect an older mlx-lm or mlx-vlm release to dispatch this new architecture.
License
This redistribution retains the upstream Qwen Community License 1.0 in
LICENSE. Review it before use. In particular, it contains attribution/display
requirements for very large commercial products and separate-license conditions
for certain commercial Model-as-a-Service and AI Work Assistant uses. The model
is not gated; downloading or using it does not remove those terms.
The upstream model card is preserved as README.upstream.md.
- Downloads last month
- 16,848
4-bit
Model tree for Sawfwair/Qwen3.8-Flash-Next-MLX-Mixed-2bit
Base model
Qwen/Qwen3.8-Flash-Next