Tencent Hunyuan Hy3 vs Hy4: Why 770B Parameters, 1M Context, and a 95% Cache Discount Change the Agent Math
TL;DR Routing Table: Which Workload Goes Where?
Do not do a blanket find-and-replace from hy3 to hy4 in your production config. Route traffic by verification cost and context shape:
- High-volume ticket triage, regex/JSON extraction, short summaries (<32K tokens) -
Hy3(295B / 21B) - Uncached input is RMB 1 vs. RMB 6 per 1M tokens; if a linter or JSON Schema check can validate output automatically, Hy4 is overkill - Multi-file repo refactoring (>256K tokens), end-to-end feature migrations -
Hy4(770B / 49B) - 1M context (~960K max input) swallows the full module tree; DeepSWE jumped from 28.0 to 64.3 and SWE Atlas Refactoring from 32.9 to 53.3 - Multi-step tool-calling agents where silent fabrication breaks downstream APIs -
Hy4(770B / 49B) - Blind-guessing hallucination error rate on unknown queries dropped from 23.1% down to 5.6% - UI screenshot debugging, chart extraction, desktop GUI + CLI automation -
Hy4(770B / 49B) - Hy3 is strictly text-only; native vision and Computer Use (Blender, CAD, desktop apps) only exist in Hy4 - 100K+ token static knowledge base or codebase with 10-50 follow-up queries -
Hy4with pinned prefix cache - At RMB 0.30/1M cached tokens vs. Hy3's RMB 0.25, a 20-turn session narrows the 6x input gap down to 2.03x - Self-hosted clusters with tight VRAM or limited inter-node interconnect bandwidth -
Hy3orHy4 flash(224B / 12B) - Hy4's 77 MoE layers × 256 routed experts demand heavy Expert Parallelism; Hy4 flash cuts KV cache to 1/6 of Hy4 (1/24 of Hy3)
This technical breakdown was written with AI assistance.
If you have ever handed a 30,000-line codebase migration to a mid-sized open-weight LLM, you already know the "intern trap." The model nails the primary controller logic on the first try, so you think you just saved an afternoon.
Then you run your test suite and realize it forgot to update the dependency configs, dropped three exception handlers, and silently broke an interface in an adjacent module. You spend the next two hours playing janitor.
Between July and November 2026, Tencent Hunyuan shipped three open-weight Apache 2.0 models that directly target that gap:
- Hunyuan Hy3 (July 6, 2026): 295B total / 21B active parameters, 256K context, text-only.
- Hunyuan Hy4 (November 4, 2026 official release; preview August 28): 770B total / 49B active parameters, 1M context, native vision + GUI/CLI Computer Use.
- Hunyuan Hy4 flash (November 16, 2026; open-sourced November 20): 224B total / 12B active parameters, ultra-compressed KV cache for high-throughput daily tasks.
At first glance, the API sticker shock on Hy4 looks brutal: uncached input jumped 6x (from RMB 1 to RMB 6 per million tokens) and output jumped 4.5x (from RMB 4 to RMB 18).
Look closer at the billing table, however, and you will spot the catch that makes 1M-context agents viable in production: cached input on Hy4 is RMB 0.30 per million tokens-a 95% discount off standard input, and only RMB 0.05 higher than Hy3's RMB 0.25 cache rate.
Here is the practical engineering breakdown of how Hy3, Hy4, and Hy4 flash differ-covering the 0.30 RMB cache math, the 23.1% → 5.6% hallucination drop, and the 78-layer MoE + Gated DSA architecture.
All specs, benchmark scores, and prices below are verified against Tencent Hunyuan's official release notes, Tencent Cloud Techpedia, Ascend 0Day adaptation docs, and the Hunyuan team's November 21 Reddit AMA (as of November 26, 2026), representing official disclosures and list-price calculations rather than custom head-to-head test runs.
Doing the Token Math: Why the 6x Input Jump Shrinks to 2x in Real Sessions
Let's put Tencent Cloud's official list rates (in RMB per 1M tokens) side by side:
- Hunyuan Hy3 : RMB 1.00 input | RMB 0.25 cached input (75% off) | RMB 4.00 output
- Hunyuan Hy4 : RMB 6.00 input | RMB 0.30 cached input (95% off) | RMB 18.00 output
Figure 1: Cost math across three scenarios-(1) Single 80K uncached pass, (2) 3x rework retries on Hy3 vs. 1 pass on Hy4, and (3) 20-turn Q&A over a 100K-token codebase with 19 cache hits.
Here is what happens when you plug those rates into three real engineering scenarios:
Scenario A: One-Off Uncached Batch Processing (80K Input + 2K Output)
- Hy3 single run : RMB 0.080 (input) + RMB 0.008 (output) = RMB 0.088
- Hy4 single run : RMB 0.480 (input) + RMB 0.036 (output) = RMB 0.516
- Verdict : When every prompt has a brand-new context with zero cache reuse, Hy4 costs 5.86x more . Keep stateless batch pipelines on Hy3.
Scenario B: The "Intern Rework Tax" on Multi-File Refactoring
Suppose you feed an 80K-token service module into the model for a database layer migration. Hy4 finishes the logic, config files, and unit tests in 1 pass (RMB 0.516) .
If Hy3 misses edge-case configs and requires 3 retry loops before your test suite turns green, your actual Hy3 API spend climbs to RMB 0.264 -cutting the price gap to less than 2x, before factoring in developer salary spent babysitting the prompt.
Scenario C: 20-Turn Agent / Repo Q&A on a 100K-Token Context (1 Cache Miss + 19 Hits)
- Hy3 across 20 turns : RMB 0.100 (Turn 1 miss) + RMB 0.475 (1.9M cached tokens × RMB 0.25) = RMB 0.575
- Hy4 across 20 turns : RMB 0.600 (Turn 1 miss) + RMB 0.570 (1.9M cached tokens × RMB 0.30) = RMB 1.170
- Verdict : Instead of paying 6x more for input, you pay 2.03x over 20 turns-and as a coding session stretches to 40 or 50 turns, the input cost ratio asymptotically approaches 1.2x (RMB 0.30 vs. RMB 0.25).
Production Gotcha - How a Single Timestamp Destroys Your Hy4 Budget : Prefix caching matches tokens strictly from index 0 . If your backend middleware injects Current timestamp: 2026-11-26T15:57:00Z or a per-request UUID at the top of your system message, every single request becomes a cache miss.
On a 100K-token prompt, that one line spikes your Hy4 input cost 20x (from RMB 0.30 back to RMB 6.00 per 1M tokens). Always freeze your system instructions, tool JSON schemas, and repository context at the start of the prompt, and append dynamic metadata at the very bottom of the latest user turn.
All calculations above use Tencent Cloud's official list pricing. If you are comparing long-context and cached token pricing across other chat models , or want to wire up a fallback router across Claude, GPT, DeepSeek, and GLM using a single OpenAI-compatible base_url ( https://api.crazyrouter.com/v1 ), you can inspect current model IDs and per-token rates on the Crazyrouter pricing and model catalog .
Benchmarks & The 5.6% Hallucination Metric That Matters for Agents
Why does Hy4 pass multi-file tasks on the first try where Hy3 stumbles? Look at the official cross-generation benchmark numbers released with Hy4 preview:
- DeepSWE 28.0 64.3 +36.3 pts (2.3x) End-to-end issue resolution across real software repositories
- Terminal-Bench 2.1 70.8 85.4 +14.6 pts Shell command execution, CLI tool chaining, and error recovery
- SWE Atlas Refactoring 32.9 53.3 +20.4 pts Multi-file structural refactoring without breaking cross-module contracts
- PostTrainBench 14.5 35.6 +21.1 pts (2.4x) Strict instruction following, formatting constraints, and self-correction
To keep version boundaries clear: those four benchmark jumps come from the August 28 Hy4 preview release.
For the November 4 Hy4 official production release , Tencent merged its multimodal team into Hunyuan and expanded both pre-training and reinforcement learning scale-pushing Hy4 to #2 among Chinese models on the Artificial Analysis Intelligence Index and #1 among open-weight models on AgentArena.
Instead of re-running the exact same preview table, the November 4 release notes disclosed four production metrics:
- Blind-Guessing Hallucination Rate Cut from 23.1% to 5.6% : When an agent hits an unknown fact or missing context, Hy3 would fabricate a plausible-looking answer 23.1% of the time. Hy4 cuts that forced-guessing error rate to 5.6% . In a 10-step tool-calling pipeline, a model that admits what it does not know instead of inventing fake JSON arguments saves hours of debugging.
- Financial Domain Crowd-Testing (3.04 Score) : Evaluated by 213 finance professionals across 579 real quant, equity, and fund research tasks, Hy4 scored 3.04 , outperforming DeepSeek-V4.1-Flash-1017 (2.97), Kimi K3.1 Pro (2.68), and GLM-5.3 (2.68).
- WorkBuddy Office Automation (96.15% Task Pass Rate) : Scored an average of 83.18 and ranked #1 domestically in 9 of 12 office subcategories (competitor list not disclosed; for reference, Hy3 previously lifted WorkBuddy's task success rate from 72% to 90% and cut completion time by 34%).
- Game Engines & Desktop Computer Use : Boosted GameDev (+19.1%) and GameLogic (+9.8%) over Hy4 preview across Unreal Engine, Unity, and Godot, while adding native GUI + CLI Computer Use capable of operating desktop software like Blender and CAD.
Where Hy4 is NOT the best fit : Tencent's Hunyuan team openly states that a gap still exists compared to top closed-source frontier models, and their training budget prioritizes product-driven engineering, agent workflows, multimodal perception, and office productivity over Olympiad-level pure math. If your workload is competition-level theorem proving or formal symbolic math, a dedicated reasoning specialist like DeepSeek V4 Pro is a better choice.
Architecture Deep Dive: How Tencent Built a 770B / 1M-Context MoE
After rebuilding its pre-training and RL stack from scratch in February 2026, Hunyuan has shipped a major release roughly every two months. Moving from Hy3 (295B/21B) to Hy4 (770B/49B) and Hy4 flash (224B/12B) involved four structural changes under the hood:
Figure 2: Side-by-side comparison of total/active parameters, MoE expert routing, KV cache footprint (1/6 and 1/24 compression on Hy4 flash), and API pricing.
Architectural Component Hunyuan Hy3 Hunyuan Hy4 Hunyuan Hy4 flash Total / Active Params 295B / 21B 770B / 49B 224B / 12B Layer Stack 80 layers (1 Dense + 79 MoE) 78 layers (1 Dense + 77 MoE) Lightweight MoE stack MoE Expert Topology 192 routed + 1 shared (Top-8 active) 256 routed + 1 shared (Top-8 active) LatentMoE + Engram Hidden Dimension & Residuals 4096 dim / 1 standard residual stream 6144 dim / 4 iHC hyper-connection streams Lightweight config Attention Mechanism GQA (64Q / 8KV) Gated DSA (64 heads, Top-2048 tokens) + IndexCache Sliding Window Attention (SWA) Speculative Decoding 3.8B MTP (0.3B active, +1 token) 10B MTP (+3 tokens) + 5-layer 3.3B DFly2 draft head High-throughput decoding Relative KV Cache Memory 1x baseline ~1/4 of Hy3 1/6 of Hy4 (1/24 of Hy3)
Four Engineering Takeaways from the Architecture:
- Why 4 iHC Residual Streams Matter : In a 78-layer network, a single residual stream tends to overwrite early prompt constraints during long reasoning chains. Splitting the residual pathway into 4 iHC (hyper-connection) streams preserves intermediate reasoning states across steps-which directly explains why Hy4 drops fewer constraints during 30,000-line refactors.
- How Gated DSA + IndexCache Tames 1M Context : Standard full attention scales quadratically with sequence length and suffers from "lost in the middle" recall decay. Hy4's Gated DSA uses a 32-head indexer to select at most 2,048 relevant tokens per query position, and IndexCache shares those selected indices across adjacent layers so the model does not re-index from scratch at every layer.
- Zero-VRAM-Overhead Speculative Decoding with DFly2 : Alongside its 10B MTP layer (which predicts 3 extra tokens per step for a 30%-50% speedup in vLLM), Hy4 mounts a 5-layer, 3.3B DFly2 draft model . Because DFly2 reuses the main model's sparse KV cache and indices directly, its drafting latency does not scale with context length, it requires zero separate KV cache memory , and in Prefill-Decode (PD) disaggregated deployments it only transfers a single final-layer hidden state.
- Why Tencent Refused to Drop Active Params to 5B-8B (November 21 Reddit AMA) : During their 2-hour Reddit AMA, Chief AI Scientist Yao Shunyu and the Hunyuan team explained why they avoided ultra-sparse MoE designs that activate only 5B-8B parameters out of trillions: overly sparse MoEs hog GPU VRAM while leaving compute FLOPs underutilized, and active parameters represent a hard per-token compute budget. Slashing active parameters below 8B visibly hurts reasoning depth. Instead of crippling Hy4, they built Hy4 flash (224B/12B) using Sliding Window Attention (SWA) + LatentMoE + Engram to compress KV cache to 1/24 of Hy3 , achieving 1/20 the single-task cost of Hy4 (~RMB 0.26/task across 259 tasks in Tencent's internal WorkIndex blind test).
A 3-Step Migration Checklist for Existing Hy3 Users
If you are currently running Hy3 in production, roll out Hy4 using this sequence:
- Gate Hy3 Behind Deterministic Validators : Keep 100% of your high-frequency requests on Hy3 (RMB 1/1M tokens) whenever you have a deterministic pass/fail check (JSON Schema validator, AST parser, compiler, or unit test suite). Configure your router to fall back to Hy4 only when Hy3 fails validation after one retry.
- Delete Defensive Prompt Padding on Hy4 Routes : Prompts written for Hy3 often contain hundreds of tokens of defensive repetition ("IMPORTANT: Do not omit field X, always check Y..."). Because Hy4's PostTrainBench alignment jumped 2.4x (from 14.5 to 35.6), you can strip out that defensive prose and pass a clean JSON Schema-saving input tokens on every call.
- Benchmark a 50-Case Golden Set with Prefix Caching Enabled : Before switching a long-document or agent pipeline to Hy4, audit your prompt template to guarantee the system prefix is 100% static, then run 50 representative multi-turn sessions to verify your real cache hit ratio and single-task pass rate.
References & Primary Sources (Verified November 26, 2026)
- Tencent, Tencent Hunyuan Officially Releases Hy3 , July 6, 2026.
- Tencent Hunyuan, Hy3 preview: The First Step in Rebuilding Hunyuan , April 23, 2026.
- Tencent Hunyuan Hy4 Official Release Notes, November 4, 2026 (770B
Comments
No comments yet. Start the discussion.