Views
No views yet
qwen3_5_moe's SparseMoeBlock for the trellis
decoder, auto-detected from quantization_config.quant_method == "eschamoe".mx.get_active_memory() after
load). Fits a stock 24 GB Mac.| Part | Format | Exactness |
|---|---|---|
Routed experts gate_up_proj / down_proj | EXL3 trellis codes, 2/3 bpw (verbatim) | bit-exact decode (((x*0xCBAC1FED)&0x8FFF8FFF)^0x3B603B60, two fp16 halves summed RNE) |
| Attention, shared expert, embed, lm_head | affine Q8 group-128, f32 scales/biases | bit-exact vs the source int8 w8a16 contract (dequant = f32 scale*w8, measured ±1e-6) |
Router gates (mlp.gate, shared_expert_gate) | fp16 | exact fp16 |
Norms / conv1d / A_log / dt_bias | bf16 | norm +1 shift baked into weights (Qwen3.6 convention) |
mx.hadamard_transform(scale=1/sqrt(128))1# oMLX: place this repo in a model directory and serve it; the trellis path
2# engages automatically from the config marker.1python - <<'EOF'
2import sys; sys.path.insert(0, "/path/to/omlx")
3from omlx.patches.escha_trellis import apply_escha_trellis_patch
4apply_escha_trellis_patch()
5from mlx_lm import load, generate
6model, tok = load("dogfoodai/Qwen3.6-35B-A3B-Escha-W2-trellis-mlx")
7print(generate(model, tok, prompt="Write a haiku about the ocean:", max_tokens=64))
8EOF| concurrent requests | aggregate tok/s (measured) |
|---|---|
| 1 | ~32 (server) |
| 4 | 124 |
| 8 | 135 |
For heavy concurrency, setESCHA_MLX_WIRED_GB(e.g.19) before loading - MLX's wired-limit can otherwise thrash catastrophically once the working set nears Metal's cap (the reference runtime measured a ~23x cliff on a 24 GB Mac).
EschaLabs/escha-mlx: same decode
hash, same Q8 f32-scale repack, same native Hadamard....-2bit-mlx if raw single-stream speed is the goal.1python tools/convert_escha_mlx.py --src <escha-w2-dir> --out <parts> --expert-format trellis
2python tools/finalize_escha_mlx.py --parts <parts> --out <out> --src-config <w2>/config.json --tokenizer-dir <tok-dir> --template <w2>/chat_template.jinja --expert-format trellis