Instructions to use Phipper/qwen3.5-27b-opus-distilled-proposal-c with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Phipper/qwen3.5-27b-opus-distilled-proposal-c 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("Phipper/qwen3.5-27b-opus-distilled-proposal-c") 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 Phipper/qwen3.5-27b-opus-distilled-proposal-c with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Phipper/qwen3.5-27b-opus-distilled-proposal-c"
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": "Phipper/qwen3.5-27b-opus-distilled-proposal-c" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Phipper/qwen3.5-27b-opus-distilled-proposal-c 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 "Phipper/qwen3.5-27b-opus-distilled-proposal-c"
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 Phipper/qwen3.5-27b-opus-distilled-proposal-c
Run Hermes
hermes
- MLX LM
How to use Phipper/qwen3.5-27b-opus-distilled-proposal-c with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "Phipper/qwen3.5-27b-opus-distilled-proposal-c"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "Phipper/qwen3.5-27b-opus-distilled-proposal-c" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Phipper/qwen3.5-27b-opus-distilled-proposal-c", "messages": [ {"role": "user", "content": "Hello"} ] }'
Qwen3.5-27B Opus-Distilled — Proposal C Mixed Quantization (MLX)
A sensitivity-aware mixed-precision quantization of Qwen3.5-27B, distilled from Claude Opus reasoning traces and quantized using a per-layer bit allocation strategy optimized for Apple Silicon (MLX).
Key Stats
| Metric | Value |
|---|---|
| Parameters | 27B dense |
| Disk size | ~20 GB |
| Avg bits/weight | ~6.5 |
| Peak memory | ~22 GB |
| Throughput (M3 Ultra) | 27 tok/s (oMLX), 23 tok/s (mlx_lm) |
| Quality (Phipps eval v3) | 4.45–4.47 |
Quantization Methodology — "Proposal C" (8/8/6/5)
This is NOT uniform quantization. Each component type gets a precision level matched to its sensitivity:
Bit Allocation
| Component | Bits | Rationale |
|---|---|---|
Embeddings (embed_tokens) |
8 | Token↔continuous space mapping — errors cascade |
LM Head (lm_head) |
8 | Directly impacts output probabilities |
| GQA self-attention (q/k/v/o_proj) | 8 | Traditional softmax attention — the "precise reasoning" layers |
| DeltaNet linear attention inputs (qkv, z, b, a) | 6 | Linear recurrence is more robust to quantization noise |
| DeltaNet output projection | 8 | Last transform before residual stream |
| All MLP layers (gate/down/up_proj) | 5 | Bulk of parameters, tolerant due to element-wise nonlinearities |
Architecture-Aware Design
Qwen3.5-27B uses a hybrid DeltaNet/GQA architecture with a 3:1 ratio:
- Layers 0, 1, 2 → DeltaNet (linear attention)
- Layer 3 → GQA (softmax attention)
- Pattern repeats across all 64 layers (48 DeltaNet + 16 GQA)
Proposal C exploits this: GQA layers (which handle precise key-value attention) get full 8-bit, while DeltaNet layers (which use linear recurrence with gating) can tolerate 6-bit on inputs. MLP weights — the parameter-count majority — compress to 5-bit with minimal quality impact.
Why This Works
- Protect information bottlenecks: Embeddings, LM head, and attention output projections are all 8-bit because errors there propagate directly into the residual stream
- Match precision to mechanism: GQA softmax attention needs precision; DeltaNet's gating mechanism absorbs quantization noise
- Compress where it's cheap: MLP layers have the most parameters but are the most quantization-tolerant
Results vs Uniform Quantization
Proposal C was validated against uniform 4-bit, 5-bit, and 8-bit baselines on the 80B MoE variant (Proposal A). Zero measurable quality loss vs the fp16 baseline at ~3x compression. The same methodology applied to the 27B dense model scores 4.45–4.47 on our eval harness — higher than the 80B MoE at 4.25 (which has only 3B active parameters per token vs 27B dense).
Usage
from mlx_lm import load, generate
model, tokenizer = load("Phipper/qwen3.5-27b-opus-distilled-proposal-c")
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "What is a leveraged buyout?"}],
tokenize=False, add_generation_prompt=True
)
response = generate(model, tokenizer, prompt=prompt, max_tokens=512)
print(response)
Sampling Recommendations
- Temperature: 0.7
- Top-p: 0.8
- Top-k: 20
- Max tokens: 16384
Hardware Requirements
- Apple Silicon with ≥24GB unified memory (M2 Pro/Max, M3 Pro/Max/Ultra, M4 Pro/Max)
- MLX ≥0.31.1, mlx-lm ≥0.31.1
Credits
- Created by Nate Baranski (@Phipper)
- Base model: Qwen/Qwen3.5-27B (Apache 2.0)
- Distillation: Opus reasoning traces
- Quantization methodology & evaluation: Nate Baranski + Bessemer (Claude Code agent)
- Downloads last month
- 12
5-bit
Model tree for Phipper/qwen3.5-27b-opus-distilled-proposal-c
Base model
Qwen/Qwen3.5-27B