/ Модель

Характеристики

Контекст
262 144 токена
Размер весов
14,4 ГБ
Лицензия
Apache 2.0
Архитектура
qwen3_5_moe · dense
Базовая модель
Qwen3.6-35B-A3B
Библиотека
mlx
Опубликована
30 ноя 2026

Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX

Генерация текстаТекст → текст
1 774скачиваний за 30 дней1лайквеса обновлены3 дек 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Квантованная версия Qwen3.6-35B-A3B для локальной генерации текста и диалогов на Apple Silicon с заявленным контекстом до 1 млн токенов.

DioLLLE8-3bit-1M-MLX — сжатая версия Qwen3.6-35B-A3B, подготовленная Tejas Phatak (tejadabheja) для запуска на Apple Silicon с MLX и пользовательскими ядрами Metal C++. Модель имеет 35,95 млрд параметров, из которых активно около 3 млрд на токен, и использует квантизацию с эффективной точностью 3,332 бита на параметр. Для кэша KV заявлена поддержка контекста до 1 млн токенов.

Модель предназначена для генерации текста в диалоге, программирования, решения математических задач и работы с длинным контекстом. В README приведены результаты отдельных тестов на Apple M5, включая скорость генерации и оценки на нескольких задачах; эти показатели относятся к указанной конфигурации и тестам автора. Репозиторий описывает запуск через MLX на macOS с Apple Silicon. Лицензия — Apache-2.0.

Сценарии применения

  • диалоговый помощник на локальном устройстве
  • генерация и рефакторинг кода
  • решение математических задач
  • ответы по длинному контексту
  • локальный запуск Qwen на компьютере Apple Silicon

Ограничения

Предназначена для запуска через MLX на macOS с Apple Silicon; указанная скорость измерена на Apple M5 и может отличаться на другом оборудовании. Заявленные результаты тестов в README приведены автором и не подтверждают качество на широком наборе задач.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX (v3: RW-GPTQ-Gosset-v3 + PolarQJL-BLUE 1M KV, 5.9193 WikiText-2 PPL, 50.6–52.3 tok/s, 13.27 GiB RAM)

tejadabheja/Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX is a native Apple Silicon MLX + Custom Metal C++ compression of Qwen/Qwen3.6-35B-A3B (35.95B total parameters, 3.0B active parameters/token) using DioLLLE8 v3 (Mixed-Radix Diophantine Butterfly + Residual-Writer Selective Pivoted-Cholesky GPTQ-Gosset-v3 + Unbiased PolarQJL-BLUE 1M KV Cache).

New in v3 (RW-GPTQ-Gosset-v3 + PolarQJL-BLUE Mathematical & Systems Upgrade — Zero Extra Weight Bytes!):

  • Closes 45.3% of the entire WikiText-2 perplexity gap to 19 GiB MLX-4bit at 0 extra weight bytes (5.9951 → 5.9193 vs. MLX-4bit 5.8280) and strictly improves held-out Python 3.12 code perplexity (1.7000 → 1.6924), achieving 8/8 (100.0%) GSM8K, 4/4 (100.0%) executable Python / strict JSON / class refactoring, and 50.55 tok/s mean (52.28 tok/s peak) lossless speculative decode on a base Apple M5 (153.6 GB/s).
  • Residual-Writer Selective GPTQ-Gosset-v3 (RW-GPTQ-Gosset) + D₈⁺ Weyl-Chamber Exact Voronoi Pullback: Proves that applying linear Hessian GPTQ exclusively to the 240 linear residual-stream writers (self_attn.o_proj, linear_attn.out_proj, shared_expert.down_proj, switch_mlp.down_proj) while preserving isotropic Gosset quantization on pre-gate projections avoids downstream multiplicative gate (SwiGLU / RMSNormGated / normalize_qk) re-amplification, boosting mean backbone SQNR to 29.11 dB and expert SQNR to 18.56 dB (99.93% / 0.003 dB of exhaustive 65,536-codeword brute-force Gosset Voronoi oracle) with 100% canonical codes_u32 + scales_fp16 inference layout.
  • Unbiased PolarQJL-BLUE (3.0625 bpp) 1M-Token KV Cache (3.996 GiB → 3.7085 GiB @ 1M, Slope = 1.0000): Replaces biased scalar KV scaling with our exact Householder Polar-Unbiased scale γ_unb = ‖y‖₂² / ⟨y, z⟩ (eliminating logit shrinkage bias with vanishing radial variance ∝ sin²∠(q, k) on needles), causal 64-token NoPE key-mean centering (+1.25 dB free Key SQNR), and Kronecker preconditioned transforms (24.55 dB KV SQNR, 100% exact 32K passkey retrieval).
  • New Ultra-Compact Sub-3-Bit Companion (10.22 GiB RAM / 9.89 GiB no-MTP, 2.576 bpw, 49.64 tok/s, 3.14 GiB 1M KV — runs on 16 GB Macs!): See tejadabheja/Qwen3.6-35B-A3B-DioLLLE8-2.5bit-1M-MLX, powered by OpenAI First Proof #6 Spectral-Light Mixed-Bit MoE (Top-48 3-bit + 208 ε-light 2-bit experts).
  • Companion Recurrent-Depth Release: Looking for latent recurrent depth (T=1/2/3 passes = 64 / 80 / 96 effective layers + LoopCD-Hidden + 2.22× MTP speedup in 13.43 GiB RAM)? See tejadabheja/Looped-Qwen3.8-27B-DioLLLE8-1M-MLX.

It bundles:

  1. Zero-pickle compressed .safetensors weights (13.435 GiB base + 0.325 GiB optional mtp-diollle8.safetensors = 13.266 GiB resting Unified GPU RAM with MTP enabled, or 12.952 GiB with load_mtp=False) — saving 4.90–5.22 GiB (27%–28.7%) of GPU RAM vs. mlx-community/Qwen3.6-35B-A3B-4bit (18.169 GiB) while staying within +0.091 WikiText-2 PPL (5.9193 vs. 5.8280) and +0.065 Python 3.12 code PPL (1.6924 vs. 1.6275).
  2. Swap-free 1,000,000-token live context on a 32 GB Mac (16.97 GiB total active GPU RAM for base weights + 3.71 GiB PolarQJL-BLUE 1M KV combined, 0.0 MB swap) via DioLLLE8PolarQJLKVCache (polar_hq, 3.0625 bpp) and automatic YaRN 4.0× context extension.
  3. Turnkey local OpenAI (Chat Completions, Responses, Completions) + Anthropic Messages (+ Gemini) API server & terminal chat REPL (diollle8_mlx/serve_cli.py + api_server.py): native tool calling, streaming, extended thinking and multi-slot prefix caching. Tested end-to-end with Claude Code and the official OpenAI / Anthropic SDKs. Includes a one-command macOS installer, install_and_serve.sh (see Quick Start).
  4. Full Preprint Paper (paper/DIOLLLE8_PREPRINT.pdf, .tex, .md) — also hosted at tejadabheja/DioLLLE8-Preprint.

v3 Head-to-Head Benchmark Summary (Apple M5 MacBook Pro, 32 GB Unified Memory)

Measured back-to-back on an idle MacBook Pro (Mac17,2, Base Apple M5 153.6 GB/s, 32 GB Unified Memory) via diollle8_mlx/benchmark_v3_dual_35b.py (raw JSON in benchmark_v3_gptq_gosset_polar.json):

MetricMLX-4bit (Official)DioLLLE8-3bit (v2)DioLLLE8-3bit (v3 — This Repo)DioLLLE8-2.5bit (v1)
Effective Bits / Weight4.50 bpw3.332 bpw3.332 bpw2.576 bpw
Backbone .safetensors Disk19.001 GiB13.435 GiB13.435 GiB (+0.325 MTP)10.388 GiB (+0.325 MTP)
Resting Unified GPU RAM18.169 GiB13.266 GiB13.266 GiB (12.95 no-MTP)10.220 GiB (9.89 no-MTP)
Cold Load Time (M5 SSD)5.46 s2.61 s2.61 – 2.85 s2.08 s
WikiText-2 Test PPL (16K @ 2K)5.8280 (38.25s)5.9951 (24.39s)5.9193 (27.47s)6.3073 (26.27s)
Python 3.12 Stdlib PPL (8K @ 2K)1.6275 (24.37s)1.7000 (11.26s)1.6924 (12.02s)1.8103 (13.26s)
GSM8K Math Spot-Eval (temp=0)——8 / 8 (100.0%)8 / 8 (100.0%)
Executable Code / JSON / Refactor100%4 / 4 (100%)4 / 4 (100.0%)4 / 4 (100.0%)
Chat Decode (MTP K=2 + Suffix)54.4 tok/s51.3 – 53.4 tok/s50.55 – 52.28 tok/s (41.6 base)47.96 – 49.64 tok/s (41.6 base)
1M-Token PolarQJL-BLUE KV RAM19.07 GiB (FP16)3.996 GiB3.7085 GiB (3.06 bpp)3.1409 GiB (2.59 bpp)
32K Needle Retrieval (POLAR-GOSSET)—PASS100% EXACT (28.34 tok/s)100% EXACT (29.53 tok/s)
Total RAM @ 1,000,000 Context38.1 GiB (Swap/OOM)17.49 GiB16.97 GiB (0.0 MB swap)13.03 GiB (0.0 MB swap)

Task-by-Task v3 Speed & Functional Verification (temp = 0, Base Apple M5)

TaskBase (tok/s)MTP K=2HybridGainCheck
binary_search (O(log n))41.5252.2851.721.26×exec() PASS
merge_intervals42.2651.7351.961.23×exec() PASS
strict_json_schema42.5046.5546.051.10×json PASS
refactor_suffix (BillingClient)41.0247.3251.421.25×ast PASS (362/362)

Public Agentic, Coding & Reasoning Benchmarks (Controlled Head-to-Head vs. MLX-4bit, DioLLLE8-2.5bit & Official BF16)

Evaluated back-to-back on the same Apple M5 MacBook Pro (32 GB Unified Memory) using identical prompts, identical strided sample indices, identical sampling (temp=0.0 non-thinking; temp=0.6, top_p=0.95 thinking), and official public graders (Gorilla BFCL v4 ast_checker & live stateful Python multi_turn_checker, sandboxed execution for HumanEval & LiveCodeBench v6, exact match for MMLU-Pro, GPQA Diamond, and AIME26). Raw JSON logs: benchmark_agentic_bfcl_v4_3bit.json, benchmark_pillars_234_3bit.json, benchmark_agentic_bfcl_v4_4bit_mlx.json, benchmark_pillars_234_4bit_mlx.json, benchmark_agentic_bfcl_v4_25bit.json, benchmark_pillars_234_25bit.json.

Benchmark / SplitDioLLLE8-3bit (13.27 GiB)DioLLLE8-2.5bit (10.22 GiB)MLX-4bit (18.17 GiB)Official BF16 (~65 GiB)
BFCL v4 — Non-Live AST Avg (100 Qs)92.00%83.00%91.00%—
↳ simple_python (25) / multiple (25)92.0% / 96.0%88.0% / 100.0%96.0% / 92.0%—
↳ parallel (25) / parallel_multiple (25)92.0% / 88.0%72.0% / 72.0%92.0% / 84.0%—
BFCL v4 — Non-Live Overall (incl. irrelevance)88.80%81.60%88.80%—
BFCL v4 — Live AST Avg (90 Qs)77.54%73.42%77.46%—
BFCL v4 — Live Overall (131 Qs)77.32%75.15%77.18%—
BFCL v4 — Multi-Turn Stateful Avg (32 eps)46.11%42.22%41.67%64.7–67.2% (v4 overall w/ thinking)
↳ multi_turn_base (12) / miss_func (10) / miss_param (10)58.3% / 30.0% / 50.0%66.7% / 30.0% / 30.0%75.0% / 30.0% / 20.0%—
HumanEval (164/164 FULL)93.90% (154/164)90.24% (148/164)95.73% (157/164)90.2% (pub. omlx.ai MLX-4bit)
MMLU-Pro (30 Qs, uncapped)76.67% (23/30)80.00% (24/30)80.00% (24/30)85.2% (HF Card)
LiveCodeBench v6 (15 Qs, 16K cap)*26.67% (4/15)40.00% (6/15)26.67% (4/15)80.4% (HF Card, 32K–64K)
GPQA Diamond (20 Qs, 16K cap)*50.00% (10/20)50.00% (10/20)65.00% (13/20)86.0% (HF Card, 32K–64K)
AIME26 (15 Qs, 16K cap)*6.67% (1/15)6.67% (1/15)13.33% (2/15)92.7% (HF Card, 32K–64K)

Key Takeaway: DioLLLE8-3bit (13.27 GiB) beats MLX-4bit (18.17 GiB) on every composite BFCL v4 agentic metric (92.00% vs. 91.00% Non-Live AST, 77.32% vs. 77.18% Live Overall, 46.11% vs. 41.67% Multi-Turn Stateful — +4.44 pts ahead!), ties MLX-4bit on LiveCodeBench v6 (26.67%), and lands within 3 problems on full HumanEval (154/164 = 93.90% vs. 157/164 = 95.73%, going 80/80 = 100% on the first half) — all while saving 4.90 GiB (−27%) of Unified GPU RAM.

* Methodology note on LiveCodeBench v6, GPQA Diamond, and AIME26: All three local quants (including MLX-4bit) averaged 306–413 s/q and hit our max_tokens=16384 ceiling inside <think>, whereas official Qwen3.6 BF16 evals use 32K–64K tokens + presence_penalty=1.5.


Mathematical Innovations in v3

1. D₈⁺ Weyl-Chamber Exact Gosset Voronoi Pullback & Two-Level Pivoted-Cholesky RW-GPTQ-Gosset-v3

  • D₈⁺ Weyl-Chamber Reduction: Reduces all 240 Gosset Voronoi facets of V(q·E₈) to just 2 dominant half-spaces (v_(8) + v_(7) ≤ q and ∑ v_i ≤ 2q) plus single-step Gosset root pullback (gosset_v3_quantizer.py), achieving 99.93% (0.003 dB) of exhaustive 65,536-codeword brute-force Voronoi search at 0 extra bits and 100% compatibility with our existing 8 KB SRAM LUT Metal decode kernels.
  • Residual-Writer Selective GPTQ-Gosset-v3 (RW-GPTQ-Gosset): Across 40 layers of strictly held-out calibration activations (verified_16gram_eval_overlap == 0), we proved empirically on 35.95B that applying linear-Hessian GPTQ error feedback to pre-gate projections (q_proj, k_proj, in_proj_qkv, in_proj_z, gate_proj, up_proj) hurts end-to-end perplexity because downstream scale-invariant / multiplicative gates (normalize_qk, RMSNormGated, SwiGLU) re-amplify sacrificed low-variance pre-gate channels. Restricting GPTQ-Gosset-v3 exclusively to the 240 linear residual-stream writers (self_attn.o_proj, linear_attn.out_proj, shared_expert.down_proj, switch_mlp.down_proj) while keeping isotropic Gosset quantization on pre-gate projections strictly improves both prose (5.9951 → 5.9193) and code (1.7000 → 1.6924) simultaneously.

2. Unbiased PolarQJL-BLUE (polar_hq & polar_qjl_2bit) 1M-Token KV Cache (polar_qjl_kv_cache.py)

Inspired by recent PolarQuant + QJL inner-product theory and Gauss–Markov BLUE estimation:

  1. Householder Polar-Unbiased Scale: Standard nearest-lattice KV quantization shrinks inner products (E[⟨q, k̂⟩] < ⟨q, k⟩), causing attention entropy drift at 128K–1M context. Setting the per-block scale to γ_unb = ‖y‖₂² / ⟨y, z⟩ makes k̂ = γ_unb · z strictly unbiased (Slope = 1.0000) for every deterministic lattice quantizer, while decomposing error orthogonally so radial variance vanishes as ∝ sin²∠(q, k) on high-similarity needle keys.
  2. Causal 64-Token NoPE Key-Mean Centering + Kronecker Transform: Subtracting a rollback-safe causal 64-token running mean μ_k on unrotated RoPE dimensions yields +1.25 dB free Key SQNR, while U₂₅₆ = D_pre · (H₄ ⊗ U₆₄) smears cross-group outliers across all 256 head dimensions, cutting 1M-token 3-bit KV RAM from 3.996 GiB to 3.7085 GiB (24.55 dB SQNR).
  3. Gauss–Markov Wiener-BLUE Fusion (2.5-bit / polar_qjl_2bit): Fuses 2-bit Gosset centroids with an orthogonal-subspace 1-bit PolarQJL residual sign sketch (2.75× lower variance than i.i.d. Gaussian QJL) via zero-overhead scale folding λₜ* = sec²θₜ / (sec²θₜ + σ_B²) (0 extra decode FLOPs).

Authorship, Upstream Open-Source Credits & AI Provenance Disclosure

Transparent AI-Primary Credit & Open-Source Attribution: Almost 100% of the mathematical research, red-team verification, Metal C++ kernel engineering, benchmarking, and documentation in this release was performed autonomously by AI systems in response to high-level human prompts, building directly on verified open-source community and mathematical research:

  • Core Mathematical Formulation (DioLLLE8 v1–v3): Co-developed autonomously by Gemini Carbon / Nano, Claude Fable, GPT Astra 6.0, and Antigravity (Google DeepMind) multi-agent math & systems swarm (D₈⁺ Weyl-chamber Gosset pullback, RW-GPTQ-Gosset-v3, PolarQJL-BLUE Wiener-BLUE KV cache, and OpenAI First Proof #6 ε-light spectral MoE compression).
  • Upstream Speculative & Thinking-Budget Inspiration (v2/v3): Special credit to David Y. Tan (turbo-tan/tqllm, Apache-2.0) for pioneering training-free suffix-copy continuation drafting, live-cache --thinking-budget graceful </think> closure without re-prefilling, and O(1) deferred-commit speculative verification on hybrid Qwen3.5/3.6 MLX architectures; to Jason Titus (sliderforthewin/Looped-Qwen3.8-27B, MIT); and to the Qwen Team for Qwen/Qwen3.6-35B-A3B.
  • Human Role (tejadabheja / Tejas Phatak): Prompting, problem framing, red-team direction, hardware execution host, and Hugging Face stewardship.

Complete Setup & Usage Instructions

System Requirements

  • Hardware: Apple Silicon Mac (M1, M2, M3, M4, or M5)
    • 16 GB Unified Memory: Runs 4K–16K context (12.95 GiB with load_mtp=False), or use Qwen3.6-35B-A3B-DioLLLE8-2.5bit-1M-MLX (9.89–10.22 GiB RAM!) for spacious 16 GB operation.
    • 24 GB Unified Memory: Smoothly runs up to 256K+ context.
    • 32 GB+ Unified Memory: Smoothly runs the full 1,000,000-token context (16.97–17.29 GiB total active GPU RAM, 0.0 MB swap).
  • OS & Python: macOS 14.0+, Python 3.11+ (3.12 recommended).

Quick Start: One-Command Install & Launch (macOS, Apple Silicon)

# Without cloning first: sets up uv + .venv, downloads the model, starts the OpenAI/Anthropic server on :8080
curl -fsSL https://huggingface.co/tejadabheja/Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX/resolve/main/install_and_serve.sh | bash

# From inside a downloaded copy of this repo:
./install_and_serve.sh                 # install deps on first run, then serve on http://127.0.0.1:8080
./install_and_serve.sh --claude        # start the server in the background and open Claude Code on it
./install_and_serve.sh --chat          # interactive terminal chat
./install_and_serve.sh --port 9000 --enable-thinking --thinking-budget 2048   # other flags go to serve_cli
./install_and_serve.sh --install-only  # only create .venv and install dependencies

The script checks for macOS on arm64 and installs uv if it is missing. It creates .venv (Python 3.12) and installs mlx, mlx-lm, transformers, safetensors and huggingface_hub, and downloads the weights only when they are not already present. If a DioLLLE8 server is already running on the port, it re-uses it. In --claude mode it waits for /health, launches Claude Code with the right environment variables, and stops the server when Claude Code exits.

Step 1: Install Environment & Download Checkpoint

uv venv .venv --python 3.12
source .venv/bin/activate
uv pip install "mlx>=0.30.0" "mlx-lm>=0.30.0" "transformers>=4.51.0" "safetensors>=0.4.5" "huggingface_hub>=0.28.0" numpy

hf download tejadabheja/Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX --local-dir ./Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX
cd ./Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX

Step 2A: Local OpenAI + Anthropic API Server (Claude Code, Codex, Cursor, OpenWebUI, …)

python -m diollle8_mlx.serve_cli --port 8080            # HTTP server (model type and KV bits are auto-detected)
python -m diollle8_mlx.serve_cli --port 8080 --enable-thinking --thinking-budget 2048   # <think> on by default

The server prints the exact client settings at startup. One process serves all of these API shapes from the same model and the same prefix cache:

APIEndpointsSupported
OpenAI Chat CompletionsPOST /v1/chat/completionsstreaming (+stream_options.include_usage), tools / tool_choice (auto/none/required/named), assistant tool_calls + tool results, reasoning_effort → <think> with reasoning_content deltas, response_format (json_object/json_schema, best-effort via prompt), stop, max_completion_tokens, usage.prompt_tokens_details.cached_tokens
OpenAI ResponsesPOST /v1/responses, GET/DELETE /v1/responses/{id}input string or items (message, function_call, function_call_output, reasoning), instructions, function tools, previous_response_id, reasoning.effort, max_output_tokens, full SSE event sequence (response.created … response.completed)
OpenAI Completions / ModelsPOST /v1/completions, GET /v1/models[/{id}]streaming, echo, token-id prompts
Anthropic MessagesPOST /v1/messages, POST /v1/messages/count_tokenssystem (string/blocks, incl. interleaved system messages), tools → tool_use / tool_result (incl. is_error), tool_choice (auto/any/tool/none), extended thinking (thinking.type enabled/adaptive/disabled, budget_tokens, display: omitted) → thinking blocks, stop_sequences → stop_reason: stop_sequence, max_tokens, full SSE event sequence (message_start, content_block_*, ping, message_delta, message_stop), Anthropic-style errors
GeminiPOST /v1beta/models/{m}:generateContent / :streamGenerateContent / :countTokenstext, functionDeclarations → functionCall, thinkingConfig

Tool calls use the model's native Qwen3.6 XML tool format and are parsed with the open-source mlx-lm qwen3_coder tool parser (derived from Qwen's qwen3coder_tool_parser.py), with a bundled fallback copy. Images, PDFs and audio are replaced with a text placeholder because this server is text-only.

Claude Code

ANTHROPIC_BASE_URL=http://127.0.0.1:8080 \
ANTHROPIC_AUTH_TOKEN=local \
ANTHROPIC_MODEL='Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX[1m]' \
ANTHROPIC_SMALL_FAST_MODEL=Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX \
ANTHROPIC_DEFAULT_HAIKU_MODEL=Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX \
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 \
CLAUDE_CODE_AUTO_MODE_SERVER=0 \
API_TIMEOUT_MS=1800000 \
claude
  • The [1m] suffix tells Claude Code the model has a 1M-token window. Without it, Claude Code assumes 200K and auto-compacts. You can also set CLAUDE_CODE_MAX_CONTEXT_TOKENS=1000000.
  • Any model name works: the server serves its one loaded model whatever name you send.
  • Auto mode (Shift+Tab, or --permission-mode auto): Claude Code normally asks the Anthropic API to run its safety classifier server-side. A local server cannot provide Anthropic's hosted classifier, so without extra settings Claude Code reports that 127.0.0.1:8080 "doesn't pass it through" and falls back to asking you. CLAUDE_CODE_AUTO_MODE_SERVER=0 is the documented setting that makes Claude Code send its own classifier requests instead. They go to this server like any other request, so the local model acts as the safety classifier. That is weaker than Anthropic's hosted review, so keep that in mind for risky work, or use Manual / acceptEdits mode. The server keeps the classifier's long prompt in its own prefix-cache slot. The first classifier call prefills about 30K tokens; later calls reuse the cache. install_and_serve.sh --claude sets this variable for you.
  • Claude Code sends thinking: {type: "adaptive"} by default. That follows the server's --enable-thinking setting (off by default, which is faster). Override it with --adaptive-thinking / --no-adaptive-thinking.
  • Claude Code's first request is a ~20K-token system prompt plus tools, so the first turn takes about 45 s on a base M5 (~19.5K tokens at ~440 tok/s prefill). We measured later turns at 0.1-1 s of prefill. After that, prefix caching re-uses the conversation: later turns only prefill the new tokens.
  • If you set --api-key KEY, use ANTHROPIC_AUTH_TOKEN=KEY.

OpenAI-compatible clients (OpenAI SDK, Codex CLI, Cursor, Continue, Cline, OpenWebUI, LiteLLM): base URL http://127.0.0.1:8080/v1, any API key.

from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key="local")
r = client.chat.completions.create(model="Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX", messages=[{"role": "user", "content": "Hi"}],
                                   tools=[{"type": "function", "function": {"name": "get_weather", "parameters": {
                                       "type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]}}}])
print(r.choices[0].message.tool_calls)

Useful flags: --host / --port, --api-key, --served-model-name, --max-tokens (default when the client sends none), --temp + --force-temp, --enable-thinking / --adaptive-thinking / --thinking-budget, --cache-slots (prefix-cache sessions kept warm; default 3: main agent, auto-mode classifier and side calls), --kv-bits (default 3), --chunk-size, --speculative / --num-draft / --suffix-copy. Set DIOLLLE8_DUMP_REQUESTS=/tmp/d8req to save every incoming request body for debugging.

How it works: HTTP requests are handled on many threads, but all MLX/GPU work runs on one dedicated worker thread, so /health, /v1/models and count_tokens answer even during a long generation. Requests queue in order, a client disconnect cancels its generation, and SSE keep-alive pings are sent during long prefills.

[!NOTE] LM Studio: not supported. DioLLLE8 weights use custom E8-lattice / rotated-domain quantization that needs the bundled Metal kernels. LM Studio's MLX engine only loads stock mlx-lm affine-quantized models and does not run custom model code (trust_remote_code=False). Use serve_cli above instead: it exposes the same OpenAI-compatible API that LM Studio's server does.

Step 2B: Interactive 1M-Context Terminal Chat REPL

python -m diollle8_mlx.serve_cli --chat            # /think toggles <think>, /stats, /reset, /exit

Step 2C: Python API (v3 RW-GPTQ-Gosset + PolarQJL-BLUE 1M Caching)

import sys
from huggingface_hub import snapshot_download

model_dir = snapshot_download("tejadabheja/Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX")
sys.path.insert(0, model_dir)

from diollle8_mlx import (
    load_diollle8_qwen35_model,
    generate_diollle8,
    prefill_chunked,
    save_e8_cache,
    load_e8_cache,
)

model, tokenizer = load_diollle8_qwen35_model(model_dir, enable_1m_yarn="auto", load_mtp=True)

messages = [{"role": "user", "content": "Write an O(log n) Python search_range(nums, target) function."}]
prompt = tokenizer.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
)

res = generate_diollle8(
    model,
    prompt,
    tokenizer=tokenizer,
    max_tokens=384,
    temp=0.0,
    speculative="auto",
    num_draft=2,
    suffix_copy=True,
)
print(res["text"])
print(f"Decode: {res['decode_tps']} tok/s | Accept: {res.get('acceptance_rate', 0):.1%}")

Preprint Paper & Citation

Bundled in paper/DIOLLLE8_PREPRINT.pdf and hosted at tejadabheja/DioLLLE8-Preprint.

@misc{diollle8_v3_2026,
  title        = {Breaking the Walsh--Hadamard Rational Kernel Trap: Diophantine-Butterfly Nested-{E8} Lattice Quantization, Residual-Writer {GPTQ-Gosset}, and {PolarQJL-BLUE} 1M-Context Inference on Consumer Apple Silicon},
  author       = {Phatak, Tejas},
  note         = {AI-Primary Autonomous Research \& Engineering by Gemini Carbon/Nano, Claude Fable, GPT Astra 6.0, and Google DeepMind Antigravity; speculative \& thinking-budget runtime inspired by David Y. Tan (tqllm) and Jason Titus (Looped-Qwen3.8-27B)},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/tejadabheja/Qwen3.6-35B-A3B-DioLLLE8-3bit-1M-MLX}}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · mlx

Нельзя запустить

MLX-модели работают только на Apple Silicon, на GPU NVIDIA они не запускаются.

Класс архитектуры
Qwen3_5MoeForConditionalGeneration
Ревизия весов
68aa2d7

0 моделей