Instructions to use malekoo/Qwen3.8-27B-MLX-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use malekoo/Qwen3.8-27B-MLX-bf16 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("malekoo/Qwen3.8-27B-MLX-bf16") 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 malekoo/Qwen3.8-27B-MLX-bf16 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "malekoo/Qwen3.8-27B-MLX-bf16"
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": "malekoo/Qwen3.8-27B-MLX-bf16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use malekoo/Qwen3.8-27B-MLX-bf16 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "malekoo/Qwen3.8-27B-MLX-bf16"
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 "malekoo/Qwen3.8-27B-MLX-bf16" \ --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"
- MLX LM
How to use malekoo/Qwen3.8-27B-MLX-bf16 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "malekoo/Qwen3.8-27B-MLX-bf16"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "malekoo/Qwen3.8-27B-MLX-bf16" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "malekoo/Qwen3.8-27B-MLX-bf16", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use malekoo/Qwen3.8-27B-MLX-bf16 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 "malekoo/Qwen3.8-27B-MLX-bf16"
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 malekoo/Qwen3.8-27B-MLX-bf16
Run Hermes
hermes
- Atomic Chat
Qwen3.8-27B — MLX, bf16
This model was converted to MLX format from
Qwen/Qwen3.8-27B using
mlx-lm.
Refer to the original model card
for more details on the model.
The conversion is lossless for the language model (~54 GB on disk): every
weight is bit-identical to the source, except the RMSNorm gains, which are
stored in the mathematically equivalent 1 + w form that the reference
computes at runtime (verified exact: embeddings, lm_head, linear and A_log
tensors bit-identical; every checked norm exactly source + 1.0). No
quantization.
This conversion is text-only. The base model is a native vision-language
model; mlx-lm's qwen3_5 implementation strips the vision encoder
(vision_tower.*) and the multi-token-prediction drafter (mtp.*) at load
time, so this artifact does not accept images or videos and does not do
speculative decoding. For vision use, run the original checkpoint with
Transformers, vLLM, or SGLang. (The pipeline_tag here is text-generation
for that reason, while the base card is image-text-to-text.)
Model description (inherited from the base card)
Qwen3.8-27B is the compact dense model of the Qwen3.8 generation, built on the Qwen3.5 architecture:
- 27B parameters, 64 layers: 16 × (3 × (Gated DeltaNet → FFN) → 1 × (Gated Attention → FFN)) — a 3:1 hybrid of linear attention and full attention
- Gated DeltaNet: 48 V-heads / 16 QK-heads, head dim 128
- Gated Attention: 24 Q-heads / 4 KV-heads, head dim 256, RoPE on 64 dims
- Vocab 248,320; context 262,144 native (extensible to 1M — extended-context serving beyond 256K is not configured in this conversion)
- Thinking mode on by default,
reasoning_effortcontrol (xhighdefault /medium/low),preserve_thinkingon by default
See the base model card for benchmark results. Text benchmarks apply to this conversion in principle (identical bf16 numerics); vision benchmarks do not (no vision tower).
Use with mlx-lm
pip install -U mlx-lm
mlx_lm.generate --model malekoo/Qwen3.8-27B-MLX-bf16 --prompt "Explain KV caches briefly." --max-tokens 2048
from mlx_lm import load, generate
model, tokenizer = load("malekoo/Qwen3.8-27B-MLX-bf16")
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "Explain KV caches briefly."}],
add_generation_prompt=True,
)
text = generate(model, tokenizer, prompt=prompt, max_tokens=2048, verbose=True)
OpenAI-compatible server:
mlx_lm.server --model malekoo/Qwen3.8-27B-MLX-bf16 --port 8080
In requests, set "model" to the id reported by /v1/models (the model path)
— mlx-lm treats an unrecognized name as a Hub repo to download.
Thinking control goes through chat_template_kwargs, as on the base model:
enable_thinking (default true), preserve_thinking (default true), and
reasoning_effort (xhigh default, medium, low) — all verified effective
against this repo's chat template. The generation prompt ends inside an open
<think> block (thinking mode), so reasoning-channel splitting requires a
parser aware of the pre-opened tag.
Recommended sampling (from the base card)
- Thinking mode:
temperature=1.0,top_p=0.95,top_k=20,min_p=0.0,presence_penalty=0.0,repetition_penalty=1.0 - Instruct (non-thinking) mode:
temperature=0.7,top_p=0.80,top_k=20,min_p=0.0,presence_penalty=1.5,repetition_penalty=1.0
Qwen notes the model operates in thinking mode by default, emitting
<think>...</think> before the answer; mlx-lm's server surfaces this as the
reasoning channel.
Conversion provenance
- Source:
Qwen/Qwen3.8-27B(bf16 safetensors, released 2026-08-14) - Converted with
mlx_lm.convert(no-q); the vision encoder (333 tensors) and MTP drafter (15 tensors) are dropped, the remaining 851 text tensors verified as described above - Tokenizer re-serialized by transformers 5; verified id-identical to the source tokenizer on text, code, CJK, emoji, and chat-template inputs
- Toolchain: mlx
0.32.1.dev20260814+3d23f7d87(built from ml-explore/mlx main), mlx-lm at ml-explore/mlx-lm main254d153(conversion code path verified identical to upstream main) - Hardware: Apple silicon (macOS), Metal backend
- Measured on this build: wikitext-2 (test) perplexity 6.9352 — disjoint 2048-token windows, no overlap, single token stream. Decode ~10 tok/s on an M5 Max MacBook Pro at ~54 GB peak memory. A 4-bit quantization measured in the identical harness is at malekoo/Qwen3.8-27B-MLX-4bit (ppl 7.0871, ~15 GB, ~33 tok/s).
License and attribution
Apache-2.0, inherited from the base model. Copyright the Qwen team; this repository is a format conversion and claims no additional rights.
Citation
@misc{qwen38,
title = {{Qwen3.8-Max}: A New Bar for Coding and Cowork},
url = {https://qwen.ai/blog?id=qwen3.8},
author = {{Qwen Team}},
month = {August},
year = {2026}
}
- Downloads last month
- -
Quantized
Model tree for malekoo/Qwen3.8-27B-MLX-bf16
Base model
Qwen/Qwen3.8-27B