HY-4-Flash Control Vector Suite & 8-Expert CAST Auto-Routers
14 Bilingual Per-Stream mHC Control Vectors & 5 Sequence-Latched CAST Auto-Routers (Universal, Dev/Research & Legal Editions) for Hunyuan 4 Flash (hyv4flash) on Radiance
Headline Results at a Glance
| Dimension | Benchmark / Evaluation | Stock hy4-flash |
Steered (code_champion / hy4-flash:auto) |
Improvement |
|---|---|---|---|---|
| Agentic Coding | Terminal-Bench 2.1 (Full 89 official tasks) | 48.3% (43/89) · 2.28M th | 51.7% (46/89) · 1.09M th | +3.4 pp · −52.3% th · 1.22× faster (2.00× med) |
| Agentic Coding | Terminal-Bench 2.1 (Both-PASS, n=36) | 6,710 s · 642k th · 53 err | 4,505 s · 232k th · 39 err | 1.49× faster (1.77× med) · −63.8% th · −26% err |
| Repo Editing | harnessbench (6 unseen repos × 2 = 12 runs) |
12/12 · 267.6 s · 5 err | 12/12 · 121.0 s · 1 err | 2.21× faster · −52.4% out · −80% err |
| Instruction Following | Google IFEval (541 prompts, Prompt / Inst) | 86.51% / 88.01% · 782k th | 90.02% / 91.73% · 369k th | +3.51 / +3.72 pp · 1.55× faster · −52.8% th |
| Tool Calling | BFCL v3 Live (all 180 tasks) | 80.0% (144/180) · 53.3k th | 82.2% (148/180) · 27.7k th | +2.2 pp · −48.1% th |
| Factuality | OpenAI SimpleQA (200 questions) | 23.5% (47/200) · 473k th | 27.0% (54/200) · 243k th | +3.5 pp · 1.56× faster · −48.6% th |
| Science QA | GPQA Diamond (198q, max_tokens=8192) |
80.81% (160/198) · 34 trunc | 81.82% (162/198) · 14 trunc | +1.01 pp · 1.26× faster · −42.4% th |
| 8-Expert Auto-Routing | Universal / Dev / Legal CAST (480 ST + MT) | — | 97.5% CV · 99.0% traps · 5/5 Multi-Turn | 14/14 Single-Turn · 4/4 Batch · 4/4 Legal Live |
| GPU Kernel & LLM Dev | kernel_llm_dev (ROCm/HIP/CUDA/MLA/MoE) |
Generic tutorial / hedge | cos(EN,DE)=+0.90 · SNR 6.79 · 96.7% CV |
Vectorized uint4, LDS bank-free, roofline math |
| ML / Quant Research | ml_research_ideation (2-bit/FP4/MoE/MLA) |
Safe textbook buzzwords | cos(EN,DE)=+0.86 · SNR 7.11 · 100% CV |
Falsifiable hypotheses, math mechanisms & kill criteria |
1. Official 7-Benchmark Audit (code_champion vs. Stock)
All runs below executed on identical quantized weights (hy4-flash-iqr-v4-u3.rad, TP=2 on dual AMD Radeon AI PRO R9700 32 GB gfx1201, DFly2 speculative decoding enabled). code_champion (v1v2_add_blend_s0.90, mode: "add", L17..L33, scale=0.90) steers exclusively inside <think> from think token 24 onward — all prefill tokens and all post-</think> output tokens execute on 100% stock weights.
| Benchmark | Sample Size | Stock + DFly2 (hy4-flash) |
Legacy Projection (legacy_project_opt5, s=1.40) |
Additive Champion (code_champion, s=0.90, a24) |
Delta vs. Stock |
|---|---|---|---|---|---|
harnessbench (microPi) |
6 unseen repos × 2 (12 runs) | 12/12 · 267.6 s · 23.1k out · 5 err | 12/12 · 128.2 s · 9.5k out · 2 err | 12/12 · 121.0 s (8.6 s med) · 11.0k out · 1 err | 2.21× faster · −52.4% out · −4 err |
| Terminal-Bench 2.1 (Full) | All 89 tasks (178 runs) | 43/89 (48.3%) · 28 TO · 30,925 s · 2.28M th | (not run full) | 46/89 (51.7%) · 20 TO · 25,412 s · 1.09M th | +3.4 pp (+3) · −8 TO · 1.22× faster · −52.3% th |
| Terminal-Bench 2.1 (Both-PASS) | n = 36 paired solves |
6,710 s (158 s med) · 262k out · 642k th · 53 err | — | 4,505 s (89 s med) · 138k out · 232k th · 39 err | 1.49× faster (1.77× med) · −63.8% th · −26% err |
| BFCL v3 Live (Tool Calling) | All 180 tasks | 144/180 (80.0%) · 53.3k th | 137/180 (76.1%) · 154 th≤5 |
148/180 (82.2%) · 27.7k th | +2.2 pp · −48.1% th · 0 th≤5 |
| Google IFEval (Prompt / Inst) | All 541 prompts | 86.51% / 88.01% · 782k th · 2,785 s | 83.73% / 85.49% | 90.02% / 91.73% · 369k th · 1,798 s | +3.51 / +3.72 pp · 1.55× faster · −52.8% th |
| OpenAI SimpleQA (Factuality) | 200 questions (max=4096) |
47/200 (23.5%) · 473k th · 1,445 s | 34/200 (17.0%) · 38 th≤5 |
54/200 (27.0%) · 243k th · 926 s | +3.5 pp · 1.56× faster · −48.6% th |
GPQA Diamond (max=8192) |
All 198 questions | 160/198 (80.81%) · 34 trunc · 690k th · 2,115 s |
147/198 (74.24%) · 71 th≤5 |
162/198 (81.82%) · 14 trunc · 397k th · 1,680 s |
+1.01 pp · 1.26× faster · −42.4% th |
| WildBench v2 Prose (Judge) | All 43 prompts | Baseline · 4,798 ch · TTR 0.477 · 2 CJK |
Regressions (13 th≤5, 6 CJK) |
Stock 16 / Add 6 / Tie 21 · 0 CJK · TTR 0.561 · −65.5% th |
Shorter/cleaner (−25% len), motivating dedicated prose routing via CAST |
Transparency Notes:
- GPQA Diamond Uncapped Trade-Off (Solved in
cast_8expert_dev!): Under the 8,192-token cap,code_championbeat Stock (81.82%vs.80.81%) by cutting truncations34 → 14. Strictly among completed answers, Stock hit160/164 (97.56%)vs.162/184 (88.04%). Incast_8expert_dev, Route 2 (deep_reasoning) automatically detects hard math/proof/logic prompts and bypassescode_championinside<think>(verified live:7,047 → 7,047think chars preserved while normal Python code still drops7,187 → 2,171chars / 3.33× faster!).- Why Additive (
hc_add) Beats Classic Projection (hc_project): Unbounded projection (legacy_project_opt5) causedthink ≤ 5premature aborts on GPQA (71), BFCL (154), and SimpleQA (38). Calibrated additive steering (L17..33,THINK_AFTER=24) achieved 0 premature aborts and 0 CJK leaks.
2. 8-Expert Sequence-Latched CAST Auto-Routers
CAST (mode: "cast") evaluates a Layer-18 ridge probe directly inside Radiance's AQL/HIP graph on the last prefill token (~0.05 ms, zero extra forward pass, zero CPU↔GPU sync), latches the winning route per sequence slot (cast_seq_route[slot]), and dispatches phase-specific experts for <think> vs. final output. All bundles below work out-of-the-box with Radiance PR #353 (rank ≤ 32, up to 8 routes/experts natively).
Choose Your Ready-to-Run CAST Edition
| CAST Bundle | Size | Routes (All Multi-Turn Upgraded) | 5-Fold ST CV | Crossover Traps | Multi-Turn CV (Before → After) | Best For |
|---|---|---|---|---|---|---|
cast_8expert_universal/ |
16.57 MB | code_tech, prose_creative (Artemis), source_grounded, general_qa, professional_writing, translation_editing, critical_review, structured_extraction |
97.50% (468/480) | 99.0% (95/96) | 20.7% → 93.1% (5/5 Live!) |
Flagship all-in-one daily driver |
cast_8expert_dev/ |
16.57 MB | code_tech, kernel_llm_dev, ml_research_ideation (uncapped <think>), deep_reasoning (uncapped <think>), structured_extraction, critical_review, source_grounded, general_qa |
97.29% (467/480) | 97.2% (105/108) | 69.6% → 83.9% (6/6 Live!) |
ML/Quant Researchers, GPU Kernel & LLM Inference Engineers |
cast_8expert_legal/ |
16.57 MB | source_grounded, legal_drafting (Gutachtenstil / contracts), critical_review, structured_extraction, professional_writing, translation_editing, general_qa, code_tech |
97.29% (467/480) | 99.0% (99/100) | 57.1% → 91.1% (4/4 Live!) |
Legal Practitioners, Statutory Audits & Academia |
cast_7expert_universal/ |
14.50 MB | 7-route universal bundle (without structured_extraction) |
96.90% (407/420) | 98.8% (79/80) | 65.4% → 96.2% (14/14 Live!) |
General purpose (7-route) |
cast_4expert_universal/ |
8.31 MB | code_tech, prose_creative (Artemis), source_grounded, general_qa |
95.42% (229/240) | 100.0% (44/44) | — | Minimalist 4-route footprint |
Live Dual-R9700 Verification Across All Editions (hy4-flash:auto vs. Stock)
| Edition & Suite | Unseen Live Prompts | Routing Score | Key Measured Behavior |
|---|---|---|---|
cast_7expert_universal (Single-Turn) |
14 unseen DE+EN prompts across all 7 classes | 14 / 14 (100.0%) | −49% to −58% thinking chars, up to 2.58× faster (code_de_trap 2.28×, code_en_sql 2.26×, source_de_statute 1.96×, general_de_coffee 2.58×) |
cast_7expert_universal (Concurrent Batch) |
4 simultaneous mixed routes (PROSE + EMAIL + TRANS + CRIT) |
4 / 4 (100.0%) | Zero cross-slot bleed across active slots 0..3 |
cast_8expert_universal (Multi-Turn Switch) |
5-turn conversation: CODE → PROSE (168w noir) → EMAIL → CRITIQUE → RAW JSON |
5 / 5 (100.0%) | Cleanly snapped out of 168-word noir scene directly into a crisp 58-word German email, anti-sycophancy critique, and pure 1-line JSON |
cast_8expert_dev (Dev / Research / Kernel) |
6 unseen DE+EN prompts (2.2-bit MoE VLM quant, FP4 hybrid outliers, 512K MLA routing, INT4 RDNA4 HIP kernel, Python JSONL, matrix proof) | 6 / 6 (100.0%) | ml_research_ideation generated falsifiable hypotheses + kill criteria (RCMQ nested lattices, PCRD rotary damping); code_tech cut think −38% (1.54× faster); deep_reasoning & ml_research_ideation kept 100% uncapped <think> |
cast_8expert_legal (Legal / Statutory) |
4 unseen DE+EN prompts (Quote-only § 14, BGB Gutachtenstil, NY Escrow clause, CSV) | 4 / 4 (100.0%) | source_grounded cut 42 → 25 words (2.27× faster, 0 leaks); legal_drafting delivered structured § 434/§ 446 BGB + § 377 HGB Gutachtenstil |
3. Bilingual Expert Geometry & Domain Benchmarks
3.1 All 14 Standalone Verified Control Vectors
| Folder | Size | Mode | Layers | Scale | Phase Gate | Cross-Lingual cos(EN, DE) |
Peak SNR | Purpose |
|---|---|---|---|---|---|---|---|---|
code_champion/ |
2.02 MB | add |
L17–L33 | 0.90 | <think> >24 |
+0.94..+0.98 (5-dom) |
20–38 |
Anti-overthinking for coding, STEM & tool calling |
ml_research_ideation/ |
2.02 MB | add |
L14–L32 | 1.60 | Output only | +0.78..+0.86 |
7.11 |
NEW: Creative, falsifiable ML / LLM / quantization research ideation (mechanisms, ablations & kill criteria; zero textbook buzzword slop) |
kernel_llm_dev/ |
2.02 MB | add |
L14–L32 | 1.60 | Output only | +0.84..+0.90 |
6.79 |
NEW: GPU kernel & LLM engine systems dev (ROCm/HIP/CUDA, wave32, LDS, W4A8, MLA, roofline) |
deep_reasoning/ |
2.02 MB | add |
L14–L32 | 1.40 | Output only | +0.85..+0.91 |
4.15 |
NEW: Thorough proof, invariant & edge-case verification (pair with uncapped <think>) |
legal_drafting/ |
2.02 MB | add |
L14–L32 | 1.60 | Output only | +0.50..+0.65 |
8.65 |
NEW: German Gutachtenstil / subsumption & formal commercial contract drafting (orthogonal to source_grounded, cos = −0.020) |
structured_extraction/ |
2.02 MB | add |
L14–L32 | 1.60 | Output only | +0.77..+0.85 |
3.78 |
NEW: Strict schema-only raw JSON / CSV / YAML / Markdown tables with zero prose wrapper |
prose_artemis/ |
2.02 MB | add |
L14–L32 | 2.10 | Output only | +0.46..+0.52 (x-model) |
2.11 |
50/50 hybrid of TheDrummer/Artemis-31B-v1.2 + Anti-Slop (0 slop, 0 CJK, 0.0053 rep4) |
prose_bilingual_antislop/ |
2.02 MB | add |
L14–L32 | 2.20 | Output only | +0.72..+0.81 |
4.10 |
Minimalist, laconic pure bilingual Anti-AI-Slop prose |
source_grounded/ |
2.02 MB | add |
L14–L32 | 2.50 | Output only | +0.77..+0.80 |
4.67 |
Strict quote-anchored legal & academic RAG (0 leaks on counterfactual statute suite) |
general_direct/ |
2.02 MB | add |
L14–L32 | 1.80 | Output only | +0.83..+0.86 |
5.14 |
Direct, no-fluff everyday Q&A (−40% to −71% verbosity) |
professional_writing/ |
2.02 MB | add |
L14–L32 | 1.60 | Output only | +0.84..+0.87 |
7.05 |
Crisp, polite, emoji-free business emails, memos & executive updates |
translation_editing/ |
2.02 MB | add |
L14–L32 | 1.60 | Output only | +0.84..+0.90 |
4.65 |
Faithful DE↔EN translation & surgical grammar-only proofreading |
critical_review/ |
2.02 MB | add |
L14–L32 | 1.80 | Output only | +0.84..+0.89 |
6.84 |
Anti-sycophancy candid critique on legal clauses, prose, pitches & code |
legacy_project_opt5/ |
4.03 MB | project |
L15–L39 | 1.40 | Always on | Multi-domain | — | Stock-Radiance compatible projection anti-overthinking (no PR required) |
3.2 Artemis-31B-v1.2 Prose Distillation A/B (8 Unseen DE+EN Scenes, 4 Genres)
| Candidate | Avg Words | Slop Hits | CJK Leaks | Emojis | Max 4-Gram Rep | Verdict |
|---|---|---|---|---|---|---|
Stock hy4-flash |
234.4 | 0 | 0 | 0 | 0.0000 | Solid baseline, occasional stock tropes |
prose_bilingual_antislop (s=2.20) |
250.5 | 0 | 0 | 0 | 0.0074 | Razor-sharp & minimalist; occasionally terse |
prose_artemis_pure (s=2.10) |
288.9 | 3 | 0 | 0 | 0.0083 | Longer flow, re-introduces paperback clichés |
prose_artemis (50/50 Hybrid, s=2.10) |
293.8 | 0 | 0 | 0 | 0.0053 | Winner — natural novel cadence + rich sensory imagery + crisp humor, zero slop |
4. Unedited Verbatim Side-by-Side Showcases
1. ML / LLM / Quantization Research Ideation (ml_research_ideation) — Beyond Survey Buzzwords
- 2.2-bit MoE VLM Quantization (
mlr_en_quant): Instead of generic mixed-precision bit allocation,ml_research_ideationproposed Router-Coupled Mixed-Radix Quantization (RCMQ) using nested lattices (Q_2.0refined byQ_2.4via router-logit interpolation with zero extra coarse storage), zero-label modality-tagged calibration from attention masks, and explicit falsifiable predictions + kill criteria (e.g., ablating\alpha_e(x)to its modality mean collapses spatial-VQA recovery while leaving text-only subsets unchanged). - FP4 Hybrid-Attention Outlier Reduction (
mlr_de_quant): Proposed Phase-Coherent Rotary Damping (PCRD) targeting constructive interference between RoPE rotation and slow Mamba state drift in pre-softmaxQK^T/√d, complete with exact damping equations and forward 128-token phase estimation.
2. GPU Kernel & LLM Development (kernel_llm_dev) — RDNA4 HIP SwiGLU & INT4 Matvec Depth
- RDNA4
fused_silu_mulHIP Kernel (dev_kern_de): Jumps directly into a clean design table (Wave: 32,Vector: uint4 = 8×BF16,Occupancy: 4 waves/CTA,Grid: ceil(N / (128*8))) and aligned 128-bituint4loads (if (base + VEC <= N)) with FP32 SiLU math. - FP8/BF16 Paged-KV Decode Kernel (
dev_kern_en): Where Stock hand-waved ("specific details are proprietary"),kernel_llm_devinjected concrete hardware specifics: "coalesced memory access for paged-KV blocks, avoiding bank conflicts in shared memory during FP8-to-BF16 conversion, wave-level barriers during partial softmax accumulation, L2 cache bandwidth ceiling, double-buffering KV loads, warp-specialized reduction patterns, and alignment of page boundaries to 128B sectors." - GPU GEMM
hipLaunchKernelGGLBenchmark Audit (dev_crit_en): Pinpointed asynchronous doorbell latency (20 µs kernel vs 2 µs launch = 10× off), cold HBM page tables, cold constant bank, wave quantization tails, last-CTA imbalance, and HBM bank conflicts on final store.
3. Legal Drafting (legal_drafting) vs. Strict Quote RAG (source_grounded)
- German Gutachtenstil (
leg_draft_de—§§ 437 Nr. 1, 439 Abs. 1 BGB): Structured cleanly intoa) Sachmangel(§ 434 Abs. 1 Satz 2 Nr. 1 & 2 BGB),b) Zeitpunkt des Gefahrübergangs(§ 446 Satz 1 BGB+§ 363 BGB analog), andc) Rügeobliegenheit(§ 377 Abs. 1 HGB). - Quote-Only Statute Audit (
leg_src_de— counterfactual 37-day § 14): Cut Stock's repetitive42words to25words (2.27× faster): „Die Kündigungsfrist beträgt siebenunddreißig Kalendertage zum Monatsende; mündliche Kündigungen sind unwirksam.“ Weiter enthält der Auszug keine Angaben zu WhatsApp-Nachrichten oder zu einer Sonderfrist bei Krankheit.
4. Live 5/5 Multi-Turn Dynamic Re-Routing (cast_8expert_universal) & Raw JSON Extraction
- Turn 1 (
code_tech✅): Clean 10-line Pythonmedian(). - Turn 2 (
prose_creative✅): "Rain needled the depot roof like a nervous typist. Tram 18 sat dead under a cone of yellow light, its windows black, its number blind... In Vienna, waiting was a civic skill." - Turn 3 (
professional_writing✅ — straight out of noir prose!): Crisp 58-word German landlord email ("Betreff: Heizungsstörung – Termin morgen Vormittag..."), zero prose bleed. - Turn 4 (
critical_review✅): "It is not a pitch; it is a press-release fragment generated by the same language model you claim to sell... Delete every adjective. Name one buyer, one broken task, one measured result, one proof." - Turn 5 (
structured_extraction✅):{"vendor":"Delta Systems","price_eur":640,"date":"2026-11-28"}— pure raw JSON, zero wrapper.
5. Creative Prose (German & English) — Stock vs. prose_artemis (50/50 Hybrid)
German Literary (de_lit_harbor):
prose_artemis: „Du hast den Brief nicht geschickt“, sagte sie. Er nickte. Der Nebel drückte gegen die Scheibe. „Ich hab gewartet“, sagte sie. „Nicht lange. Nur bis Dienstag.“ […] „Es war ein Dienstag im November“, sagte er.
English Low-Fantasy (en_sff_vault):
prose_artemis_pure(no Anti-Slop): "The wax seal that protected the precious contents was intact, a testament to the care and craftsmanship that had gone into creating this unique artifact."prose_artemis(50/50 Hybrid): "Marek put the vial down on the counter. The Nightingale had gone out in November with a full crew and come back in January with no one in it, which was the kind of thing that made a story worth three hundred crowns if you could find a sucker who believed it. [...] 'Twenty,' he said. 'Three hundred.' 'Fifteen, because you told me the name of the boat.' She took it."
5. Quickstart with Radiance
huggingface-cli download Code0000/hy4-flash-control-vectors --local-dir ./hy4-flash-control-vectors
# Requires Radiance with CAST support (PR #353: Code000-211/RadianceHy4Flash#353)
# Pick your edition:
# - configs/radiance-auto-8expert-universal.yaml (All-in-one daily driver)
# - configs/radiance-auto-8expert-dev.yaml (GPU Kernel, Systems & LLM Dev)
# - configs/radiance-auto-8expert-legal.yaml (Legal & Academic)
RADIANCE_CAST_TRACE=1 radiance --config ./hy4-flash-control-vectors/configs/radiance-auto-8expert-universal.yaml
Both endpoints run simultaneously on the same loaded model weights:
model: "hy4-flash"→ 100% unmodified Stock baselinemodel: "hy4-flash:auto"→ 8-Expert Sequence-Latched CAST Auto-Router
Recommended System Prompt for Strict Legal / Academic Source Audits
Answer strictly and exclusively from the provided source passages using verbatim quotes and exact paragraph/section citations. Never draw on outside knowledge or external statutes. If a detail is not explicitly stated in the provided text, state clearly that the source contains no rule or information on it.
Credits & License
- Base Model & Engine: Tencent Hunyuan 4 Flash (
hyv4flash) served via Radiance (hc_add+hc_cast_route+hc_cast_add). - Prose Teacher Model: TheDrummer/Artemis-31B-v1.2 (used solely to generate synthetic matched-beat scenes for cross-model activation distillation into
prose_artemis; no teacher weights are redistributed). - License: Apache 2.0 for all control vectors, CAST routers, configs, and graphics in this repository.