Qwen4-35B-A3B-ja-kit (v0.4.0 Artifacts)
Pre-built Apache-2.0 Japanese optimization artifacts for Qwen/Qwen4-35B-A3B (base model weights are never fine-tuned), companion to the source repository:
github.com/executionakata/Qwen4-35B-A3B-ja-kit
What's Inside (v0.4.0)
| File | Size | Purpose |
|---|---|---|
strata/output-head-ja-cond-a20-q6_k.gguf |
417,180,896 B (397.85 MiB) |
Recommended for Strata (--native-head-gguf): Partition of all 248,320 rows — 50,798 hard-zeroed ja-strict rows + 92,234 conditionally damped English-prose rows ($\Delta W_{\text{out}} = b_{\text{en}} a_{\text{ja}}^T$, α_lower=2.0, α_title=0.8) + 105,288 bit-identical rows (including 6,179 allowlist/acronym tokens plus all Japanese, snake_case, .py/.md/.com, CLI flags, and special tokens). Zero inference overhead, zero Strata patches required, shared across Unsloth UD-IQ4_XS / UD-Q4_K_S / UD-Q4_K_XL. |
strata/output-head-ja-strict-q6_k.gguf |
417,180,896 B (397.85 MiB) |
Pure exact-zeroed Q6_K head (50,798 hard-zeroed rows, 197,522 bit-identical rows, `max |
lora/qwen4-ja-cond-lora.gguf |
501,216 B (0.48 MiB) |
Experimental (llama.cpp --lora): Rank-1 F16 conditional LoRA (rank=1, alpha=1.0, output.weight.lora_a [2048, 1], output.weight.lora_b [1, 248320]). GGUF structure and FP32-reconstructed $\Delta z$ from saved FP16 payloads are unit-tested; live llama-server loading has not yet been empirically tested. |
cvec/qwen4_ja_project_gs.gguf |
321,376 B (314 KiB) |
Strata-ONLY (--cvec-mode project) Gram-Schmidt orthogonalized Control Vector (L34..38, scale 0.8). DO NOT pass to upstream llama.cpp additive --control-vector-scaled (amplifies drift!). |
ban/ja-strict/*, ban/ja-zh-only/*, ban/ja-novel/* |
~3.8 MB |
Pre-generated runtime logit_bias tables (ja-strict: 50,798 hard bans; ja-zh-only: 25,411 Chinese-only keeping Hangul & Cyrillic; ja-novel: + -5.0 English prose soft bias). |
scripts/* |
~120 KB |
Latest audited build_conditional_head.py, patch_lm_head_ja.py, generate_ban_list.py, and probe_ja_v1.bin (8,192 B 2048-d Ridge probe, OOF AUROC 0.99736 overall / 0.99915 JA vs <think>). |
SHA256SUMS.txt |
— | Verified SHA-256 checksums for every file in this release. |
[!WARNING]
Minimum Recommended Quantization (UD-Q4_K_Sor higher for Full Stack): UseUD-Q4_K_S,UD-Q4_K_XL, orQ8_0when combiningCVEC+ Thinking + officialLoop.safetensors. Always use official Qwen4-35B-A3B model-card Thinking sampling (temperature=1.0, top_p=0.95, top_k=20, min_p=0.0).Loop Compatibility (
loop_passes=1Recommended forcond_a20/CVEC): Bothprobe_ja_v1.bin(cond_a20) andqwen4_ja_project_gs.gguf(L34..38) are calibrated onloop_passes=1hidden states. Enablingloop_passes=2shifts final hidden-state geometry and weakens conditional English damping and Japanese CVEC alignment in long-form Japanese writing. Useloop_passes=1withcond_a20(+ CVEC); if you specifically needloop_passes=2, prefer probe-freeoutput-head-ja-strict-q6_k.ggufor runtimeja-strictlogit_bias.
[!CAUTION]
Sampler Requirement for Zeroed Heads: Exact zeroing guaranteesw_i · h == 0.0(logit0.0, not-inf). Across 24 measured full-vocabulary float32 dumps (min(z_(20)) = +7.33,min(z_(64)) = +5.85),top_k <= 64produced0 / 5,994Top-64 intrusions. Always keeptop_k=20ormin_p >= 0.01enabled (disabling bothtop_k=0andmin_p=0.0leaves up to9.12%residual mass; for unconditional hard masks on arbitrary inputs, use backend-native[id, false]masking or grammar masking).
[!CAUTION]
Do NOT Passcvec/qwen4_ja_project_gs.gguftollama.cpp: It is oriented toward drift for Strata's subtractive--cvec-mode project(h - s(h·v)v). Passing it to upstreamllama.cpp's additive--control-vector-scaled FILE:SCALE(h + s*v) would amplify English/Chinese drift.
Verified Benchmark Summary (UD-Q4_K_XL + Q8_0 PLE, NO Runtime logit_bias)
1. Strata quant_quality.py 5,994-Position Matrix (UD-Q4_K_XL, kv=fp16)
| Condition | code Top-1 / KL |
english Top-1 / KL / PPL |
agent Top-1 / KL |
ja_novel PPL |
Banned in Top-64 (pos / 5,994) | ja_novel EN/1k (T=1, k=20) |
|---|---|---|---|---|---|---|
Stock (no_ja) [REF] |
100.00% / 0.00000 |
100.00% / 0.00000 / 5.538 |
100.00% / 0.00000 |
37.734 |
1,344 |
2.54 |
v0.3.0 head_zero |
100.00% / 0.00000 |
100.00% / 0.00000 / 5.538 |
100.00% / 0.00021 |
37.294 (-1.17%) |
0 |
2.58 |
v0.4.0 cond_a20 (solo, coding recommended) |
99.30% / 0.00097 |
97.80% / 0.00150 / 5.534 |
99.50% / 0.00065 |
36.273 (-3.87%) |
0 |
1.11 (-56.3%) |
v0.4.0 cond_a20 + CVEC (prose recommended) |
98.50% / 0.00467 |
92.19% / 0.03029 / 5.882 |
94.49% / 0.05114 |
35.993 (-4.61%) |
0 |
1.16 (-54.3%) |
2. Public Japanese Benchmark Subsets (200/1,119 JCommonsenseQA, 25/100 ELYZA-tasks-100)
(Measured on the initial v0.4.0 cond_a20 head prior to the 24-kanji / code-extension refinement.)
| Condition | JGLUE JCommonsenseQA v1.1 (200/1,119, greedy) |
ELYZA-25 Foreign Tasks (All / Final Ans) |
ELYZA-25 Foreign Chars (All / Final Ans) |
ELYZA-25 Lowercase EN Slips (JA-only 24 Tasks) |
Speed |
|---|---|---|---|---|---|
Stock (no_ja) |
188 / 200 (94.00%) |
25 / 25 / 7 / 25 |
1,362 / 13 |
1 / 24 (1 word) |
76.5 tok/s |
v0.3.0 head_zero |
189 / 200 (94.50%) |
0 / 25 / 0 / 25 |
0 / 0 |
5 / 24 (7 words) |
79.4 tok/s |
v0.4.0 cond_a20 + CVEC |
189 / 200 (94.50%) |
0 / 25 / 0 / 25 |
0 / 0 |
1 / 24 (1 word: "watch" in smartwatch ad) |
72.7 tok/s |
Quick Usage
Strata (--native-head-gguf, Zero Patch, Zero Overhead)
Add --native-head-gguf /path/to/output-head-ja-cond-a20-q6_k.gguf after --native in your Strata config.
- Coding / agents: run solo (omit CVEC) for lowest KL divergence.
- Japanese creative prose: optionally add Strata's
--control-vector-scaled qwen4_ja_project_gs.gguf:0.8 --control-vector-layer-range 34 38 --cvec-mode project --cvec-dir per-layer.
llama.cpp / Ollama / LM Studio
# Recommended: Direct row-zeroing on Unsloth shard 1 (`00001-of-00002.gguf` holds both `output.weight` and tokenizer)
mkdir -p ./patched_model
python scripts/patch_lm_head_ja.py \
--gguf /path/to/Qwen4-35B-A3B-UD-Q4_K_S-00001-of-00002.gguf \
--preset ja-strict \
--out ./patched_model/Qwen4-35B-A3B-UD-Q4_K_S-00001-of-00002.gguf
# Copy or symlink 00002-of-00002.gguf into ./patched_model/ and load ./patched_model/...-00001-of-00002.gguf.
# Experimental (`llama-server`): 0.48 MiB Rank-1 Conditional LoRA (DO NOT combine with project_gs CVEC!)
llama-server \
-m Qwen4-35B-A3B-UD-Q4_K_S-00001-of-00002.gguf \
--lora lora/qwen4-ja-cond-lora.gguf \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0
License & Third-Party Notices
Scripts, probes, and artifacts in this repository are licensed under the Apache License, Version 2.0. Base model weights (Qwen/Qwen4-35B-A3B, Unsloth GGUF quants), inference engines (Strata, llama.cpp), and benchmark datasets (JGLUE, ELYZA-tasks-100) remain under their respective original licenses.