Tencent's latest Hunyuan Hy4 preview takes an actuary-like approach to large models: it carries 770B total parameters but precisely awakens only 49B of them per request, while stretching context memory to 1M tokens and offering cache pricing as low as 0.3 RMB per million tokens. During its development, the model even learned to write code to optimize its own low-level operators.
Key points
1. 770B total / 49B active: how the math works
Traditional dense models force every parameter through computation on each request, exploding VRAM and latency. Hy4 uses fine-grained Mixture-of-Experts (MoE):
- A lightweight router dynamically selects only the relevant expert subnetworks (e.g., a front-end code expert, a geometry expert, a long-document audit expert) while the rest stay dormant.
- Active ratio = 49B / 770B ≈ 6.36%.
- The 770B base acts as an encyclopedic knowledge reservoir (rare theorems, obscure programming languages, cross-industry logic), while per-inference FLOPs stay in mid-size model territory—fast generation, low per-query serving cost.
- A complete industrial-scale code repository plus architecture history
- Hundreds of pages of financial audits and contracts for cross-validation
- Multi-turn agent histories
- Fully open weights, dual-track access via cloud and local deployment
- Hugging Face: https://huggingface.co/tencent/Hy4-preview
- GitHub: https://github.com/Tencent-Hunyuan/Hy4
- API platforms: Tencent Cloud TokenHub, OpenRouter
- Launch companion products: WorkBuddy, CodeBuddy, Tencent Yuanbao app, ima.copilot
2. 1M context: swallowing an entire software project in one pass
Prior context windows (32K/128K) forced developers to chop codebases or reports into fragments via RAG, losing cross-file logical references. Hy4's 1M-token window (~1.5 million Chinese characters) can ingest:
This enables end-to-end global causal reasoning instead of fragmented retrieval.
3. Recursive self-improvement: the model "repairs its own machine tools"
During development, Hy4 ran a self-evolution flywheel:
1. Self-generated exams: the model autonomously synthesized complex multi-step reasoning and software-engineering samples, filtering out low-quality noise to strengthen reasoning depth. 2. Operator-level self-optimization: it analyzed communication bottlenecks in MoE cross-GPU communication and helped optimize GPU operator fusion, boosting end-to-end inference throughput by 31.8%.
4. Pricing: 0.3 RMB cache hits crush agent costs
| Item | Price | | :--- | :--- | | Input | ¥6.00 / million tokens | | Output | ¥18.00 / million tokens | | Cache hit | ¥0.30 / million tokens (5% of input price) |
Prompt caching reuses precomputed KV states for repeated system prompts and long code prefixes. Example: a 200K-token project context over 100 rounds costs ~120 RMB without caching vs. ~6 RMB with cache hits—a ~20x cost reduction that makes resident agents economically viable.