672 yesterday

Unsloth Dynamic, Engram, MTP & Vision

vision
ollama run jetelain/Qwen4-35B-A3B

Details

yesterday

887ffb3559d5 · 37GB

·
20.5B
qwen4exp
·
35.9B
·
Q4_K_M
clip
·
447M
·
BF16
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR US
{ "draft_num_predict": 4, "min_p": 0, "presence_penalty": 0, "repeat_penalty": 1,
{{ .Prompt }}

Readme

Qwen 4 35B A3B (Unsloth Dynamic, Engram, MTP & Vision)

Alibaba Qwen 4 Mixture-of-Experts (MoE) foundation model featuring 35B core parameters (~3B active per token, 8 routed + 1 shared out of 256 experts), a 20B per-layer n-gram embedding table (engram), and an embedded 2B Multi-Token Prediction (MTP) head on a hybrid Gated DeltaNet + Qwen Sparse Attention architecture (40 layers, 2 KV heads, native 1M context).

Packaged with Unsloth Dynamic v3.1 Quantization (UD-Q4_K_XL & UD-Q8_K_XL), integrated Multimodal Vision (mmproj-BF16), and Ollama’s native qwen4 renderer/parser for thinking traces, tool calling, and multimodal inputs.

🚀 Key Highlights

  • Hybrid Linear + Sparse Attention (40 Layers): 10 blocks of 3 Gated DeltaNet layers + 1 Qwen Sparse Attention layer (2 KV heads, head dim 256), minimizing KV cache growth all the way to 1,048,576 native context.
  • 20B Per-Layer Engram Table: Split into -00002-of-00002.gguf (11.5 GB IQ4_NL in Q4, 21.8 GB Q8_0 in Q8) and mapped on demand by Ollama, boosting factual and coding knowledge without inflating GPU VRAM.
  • Unsloth Dynamic v3.1 (UD-Q4_K_XL & UD-Q8_K_XL): UD-Q4_K_XL preserves 95.0% accuracy vs 95.3% BF16 across GSM8K/MATH-500/CRUXEval-O/MMLU-Pro and scores 1.000 on RULER up to 128K.
  • Native MTP Speculative Decoding (draft_num_predict: 4): Embedded MTP head (~24–40% draft acceptance) accelerating generation without a separate draft model.
  • Multimodal Vision Included: Bundled with mmproj-BF16 (903 MB) for image and visual-coding tasks.

📦 Tags & Variants

Tag Quantization Total Size Default Settings Target Use Case
latest / q4 UD-Q4_K_XL 37 GB (24.7 GB core + 11.5 GB IQ4_NL engram + 0.9 GB mmproj) temp 1.0, top_p 0.95, top_k 20, draft 4 Recommended Sweet Spot: ~21–25 t/s up to 112k on 8 GB laptops; ~41–48 t/s up to 256k on unified memory
q8 UD-Q8_K_XL 63 GB (40.5 GB core + 21.8 GB Q8_0 engram + 0.9 GB mmproj) temp 1.0, top_p 0.95, top_k 20, draft 4 Near-lossless 8-bit precision (~28–33 t/s up to 256k in ~38.2 GB VRAM on unified memory)

💡 Usage Recommendations

1. Fast CLI Run

# Recommended sweet spot (quality + speed):
ollama run jetelain/Qwen4-35B-A3B:q4

# Near-lossless Q8 precision:
ollama run jetelain/Qwen4-35B-A3B:q8

2. Hardware Recommendations

  • 8 GB VRAM (Laptops with 64 GB RAM):
    • Use :q4 up to 112k context (20.8–24.7 t/s generation, ~30.1–31.5 GB Host RAM). Still runs at 14.9–15.1 t/s at 128k–160k and 10.6 t/s at 256k.
    • :q8 also fits 64 GB RAM via on-demand engram mapping (9.2–14.6 t/s across 48k–256k, ~54.3–57.1 GB Host RAM).
  • 24 GB VRAM GPUs (RTX 3090 / 4090) + 32–64 GB RAM: Core Q4 weights + KV cache fit comfortably in 24 GB VRAM while the 11.5 GB engram maps from host RAM.
  • Unified Memory (64–96 GB / Apple Silicon / AMD Strix Halo):
    • :q4: 100% GPU offload (42/42 layers) at ~40.5–47.6 t/s generation (~118–161 t/s prompt) all the way to 256k context (23.7–25.3 GB VRAM).
    • :q8: 100% GPU offload (42/42 layers) at ~27.8–32.9 t/s generation (~80–123 t/s prompt) all the way to 256k context (37.9–38.5 GB VRAM).

3. 💡 Hardware Alias Tip (Zero Disk Overhead)

# On 8 GB Laptops with 64 GB RAM (112k context sustaining >= 20 t/s on Q4):
curl http://localhost:11434/api/create -d '{
  "model": "Qwen4-35B-A3B",
  "from": "jetelain/Qwen4-35B-A3B:q4",
  "parameters": {
    "num_ctx": 114688
  }
}'

# On 64-96 GB Unified Memory Servers (256k context at ~28-33 t/s on Q8):
curl http://localhost:11434/api/create -d '{
  "model": "Qwen4-35B-A3B",
  "from": "jetelain/Qwen4-35B-A3B:q8",
  "parameters": {
    "num_ctx": 262144
  }
}'