Hy4 flash
Tencent's most cost-effective Hy4 model: a 220B Mixture-of-Experts with only 12B active per token, reading text, images and PDFs across a 1M-token context. Reasoning is on by default and can be switched off for fast, cheap answers — built for everyday productivity, extraction and agent steps at volume.

- Tools
- Vision
- PDF input
- Reasoning
- Structured output
- Reasoning
- Always on
reasoning_effort- none
- low
- medium
- high
- xhigh
- Tool choice
required
Use Hy4 flash in VS Code, Cursor and Antigravity
DEVUP Code, the DEVUP AI extension, is free to install. Requests are paid from your DEVUP balance.
Hy4 flash

Hy4 flash is the low-cost member of Tencent's Hy4 generation. It takes text and a single image, writes text, and works across a context of just over a million tokens — while activating only about 12B of its 220B parameters for each token.
Tencent positions it for everyday productivity work: deep search, document processing, slide creation, simple frontend demos and computer use. On Tencent's internal productivity benchmark it lands slightly above Hy4 preview, and Tencent reports a cost per task many times lower than either Hy4 preview or Hy4.
It reasons before answering by default, and — unlike its larger sibling — that reasoning can be switched off cleanly.
Weights are open under the Tencent Hy License 1.0.
At a glance
| Model type | Mixture-of-Experts, text and image understanding |
| Total parameters | 220B, of which 63.5B are Engram n-gram tables |
| Active per token | 11.3B text + 0.43B vision |
| Layers | 42 — one dense, 41 MoE |
| Experts | 512 routed (LatentMoE) + 1 shared, 16 active per token |
| Attention | Sparse attention and sliding-window attention, interleaved 1:3 |
| Vision encoder | Adapted from SigLIP2-So400m, 0.43B |
| Input | Text, one image per request, PDF |
| Output | Text |
| Maximum context size | 1,048,576 tokens |
| Maximum output | 1,048,576 tokens |
| Reasoning | On by default, can be disabled |
| License | Tencent Hy License 1.0 |
Input and output are counted against the same 1,048,576-token window, so a long prompt leaves less room for the reply.
Getting started
curl https://api.devupai.com/v1/chat/completions \
-H "Authorization: Bearer $DEVUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "tencent/Hy4-flash",
"messages": [
{ "role": "user", "content": "Turn these meeting notes into a list of decisions, owners and deadlines." }
]
}'Python, using the OpenAI client:
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ["DEVUP_API_KEY"],
base_url="https://api.devupai.com/v1",
)
response = client.chat.completions.create(
model="tencent/Hy4-flash",
messages=[
{"role": "user", "content": "Turn these meeting notes into a list of decisions, owners and deadlines."}
],
temperature=0.9,
top_p=1.0,
)
print(response.choices[0].message.content)Node.js:
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.DEVUP_API_KEY,
baseURL: "https://api.devupai.com/v1",
});
const response = await client.chat.completions.create({
model: "tencent/Hy4-flash",
messages: [
{ role: "user", content: "Turn these meeting notes into a list of decisions, owners and deadlines." },
],
temperature: 0.9,
top_p: 1.0,
});
console.log(response.choices[0].message.content);The sampling values above — temperature: 0.9, top_p: 1.0 — are the ones Tencent recommends.
Reasoning
Without any parameter, Hy4 flash thinks first and answers second. The thinking comes back in a field of its own, apart from content, and its length is reported in usage.completion_tokens_details.reasoning_tokens. Those tokens are billed as output.
Switching it off
Send reasoning_effort: "none" for a direct answer:
response = client.chat.completions.create(
model="tencent/Hy4-flash",
reasoning_effort="none",
messages=[{"role": "user", "content": "What is 2+2? Answer with the number only."}],
)
# content: "4" reasoning_tokens: 0We verified this returns a clean content with no reasoning in it. For lookups, rewrites, classification and short extraction, none is the cheapest and fastest way to run this model.
The Hugging Face model card also mentions no_think. This endpoint does not accept it — it is refused with HTTP 422. Use none.
Effort levels
low, medium, high and xhigh are accepted, and all of them keep reasoning on. They are not a graded scale. Run three times each on the same counting problem:
| Level | Reasoning tokens per run |
|---|---|
low | 303 · 259 · 370 |
high | 316 · 686 · 158 |
xhigh | 505 · 361 · 400 |
The spread inside a single level is wider than the gap between levels, and every run answered correctly. In practice there are two settings: reasoning on (leave the parameter out) and reasoning off (none).
Leave room for the thinking
With reasoning on, the thinking and the answer share max_tokens. If the cap is too low the reply can end before the answer starts. Allow a few thousand tokens for anything non-trivial, and treat finish_reason: "length" as a sign to raise it.
Images
Send an image as an image_url content part — a hosted link or a base64 data URI.
import base64
with open("screenshot.png", "rb") as f:
img = base64.b64encode(f.read()).decode()
response = client.chat.completions.create(
model="tencent/Hy4-flash",
max_tokens=1500,
messages=[{
"role": "user",
"content": [
{"type": "text", "text": "Which button on this screen submits the form?"},
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{img}"}},
],
}],
)Tencent's usage notes allow one image per request. Several screenshots mean several requests.
PDF documents
PDFs go in as file content parts:
import base64
with open("invoice.pdf", "rb") as f:
pdf = base64.b64encode(f.read()).decode()
response = client.chat.completions.create(
model="tencent/Hy4-flash",
reasoning_effort="none",
max_tokens=1500,
messages=[{
"role": "user",
"content": [
{"type": "text", "text": "Give the invoice number, the issue date and the total due."},
{"type": "file", "file": {
"filename": "invoice.pdf",
"file_data": f"data:application/pdf;base64,{pdf}",
}},
],
}],
)Straight extraction like this rarely needs reasoning, which is why the example turns it off.
Tool calling
Tools use the standard tools format. The model can choose freely, can be required to call some tool with tool_choice: "required", or can be pointed at one function by name.
tools = [{
"type": "function",
"function": {
"name": "search_orders",
"description": "Find a customer's orders by email",
"parameters": {
"type": "object",
"properties": {"email": {"type": "string"}},
"required": ["email"],
},
},
}]
response = client.chat.completions.create(
model="tencent/Hy4-flash",
max_tokens=3000,
messages=[{"role": "user", "content": "What did sara@example.com order last week?"}],
tools=tools,
tool_choice={"type": "function", "function": {"name": "search_orders"}},
)
call = response.choices[0].message.tool_calls[0]
print(call.function.name, call.function.arguments)The reply ends with finish_reason: "tool_calls". On agent turns, give max_tokens enough headroom for the reasoning that precedes the call — a cap that is too tight can cut the turn off before the call is emitted.
Structured output
json_schema and json_object are both honoured.
curl https://api.devupai.com/v1/chat/completions \
-H "Authorization: Bearer $DEVUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "tencent/Hy4-flash",
"reasoning_effort": "none",
"messages": [
{ "role": "user", "content": "Classify this ticket and rate its urgency from 1 to 5: \"Payment page shows error 500 for all users since 09:00.\"" }
],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "ticket",
"strict": true,
"schema": {
"type": "object",
"properties": {
"category": { "type": "string" },
"urgency": { "type": "integer" }
},
"required": ["category", "urgency"],
"additionalProperties": false
}
}
}
}'High-volume labelling and extraction are where this model fits best. Pair json_schema with reasoning_effort: "none" and the output is short, fast and machine-readable.
Prompt caching
Repeated input is billed at a much lower cached rate. Keep the parts that do not change — system prompt, tool definitions, reference material — at the very beginning, and append the parts that do. A value that changes on every call, placed early, defeats the cache for everything after it.
Architecture
Hy4 flash keeps Hy4's overall design and changes three things to cut memory and compute.
Hybrid attention. Sparse attention layers that select up to 2,048 relevant positions are interleaved with sliding-window layers that look only at the last 512 tokens, one to three. Most layers therefore never touch the full context. Tencent reports a KV cache one-sixth the size of Hy4's and one twenty-fourth of Hy3's.
LatentMoE. Each of the 41 MoE layers holds 512 routed experts that operate in a compressed latent space; a token uses 16 of them plus one shared expert.
Engram. A 63.5B-parameter table of learned bigram and trigram representations, looked up by hashing at four points in the network. It adds knowledge capacity without adding compute per token, which is why the total parameter count is far above what each token actually uses.

A built-in 0.85B drafter, DFly2, speeds up decoding through speculative generation, reusing the main model's KV cache and sparse indices so its overhead stays flat as context grows.
| Property | Value |
|---|---|
| Hidden size | 3,072 |
| Layer pattern | 2 × sparse, then 10 × (3 × sliding-window → sparse) |
| Sparse / sliding-window layers | 12 / 30 |
| Attention heads (sparse / sliding-window) | 32 / 64 |
| Attention formulation | Multi-head Latent Attention |
| Sliding window | 512 tokens |
| MoE latent dimension | 1,536 |
| Dense FFN intermediate size | 13,824 |
| Vision encoder | 27 layers, hidden size 1,152, 16 × 16 patches |
| Multimodal position encoding | Interleaved MRoPE |
| Vocabulary | 120,832 |
Benchmarks
All figures here are Tencent's own, from evaluations Tencent designed and ran.

| Evaluation | Result |
|---|---|
| WorkIndex — internal benchmark of everyday productivity tasks | Hy4 flash 42.1 · Hy4 preview 39.7 · Hy4 51.4 |
| Cost per WorkIndex task | About 1/13 of Hy4 preview and 1/20 of Hy4 |
| Blind user evaluation — 85 users, 259 tasks | 2.79 / 4 satisfaction, against 2.81 for Claude Haiku 5.5 |
| Output length after reinforcement learning | Average end-to-end output tokens cut by about half |
In the blind evaluation, Tencent also reports the lowest cost per task and the shortest median completion time among the models tested.

The chart above covers seven public agent and reasoning benchmarks: DeepSWE, ProgramBench, Terminal-Bench 4.0, APEX-Agents, AutomationBench, Humanity's Last Exam and OSWorld 2.1. The complete scores are in the benchmark appendix.
When to choose it
Choose Hy4 flash for volume and speed: document processing, extraction and classification, search-and-summarise pipelines, routine agent steps, screenshot reading and first-pass drafting. With reasoning_effort: "none" it is a fast general-purpose worker; with reasoning on it handles multi-step tasks that a non-reasoning model would get wrong.
Choose Hy4 instead for complex, long-horizon software engineering, research-level reasoning and hard visual questions. Tencent states directly that Hy4 has the higher ceiling for that work.
A common pattern is to use both: Hy4 flash for the many cheap steps of a pipeline, Hy4 for the few hard ones.
Common pitfalls
| Symptom | Cause | Fix |
|---|---|---|
HTTP 422 on reasoning_effort: "no_think" | Not accepted on this endpoint | Use "none" |
| Simple requests are slower and cost more than expected | Reasoning is on by default | Send reasoning_effort: "none" |
high or xhigh does not think harder than low | The levels are not graded on this model | Treat reasoning as on or off |
Empty content with finish_reason: "length" | Reasoning consumed the token cap | Raise max_tokens, or turn reasoning off |
| Agent turn ends without a tool call | Same cause | Raise max_tokens |
| Unexpected results with several images | Tencent supports one image per request | Send one image per request |
Limits to keep in mind
Hy4 flash trades ceiling for cost. Expect it to fall short of Hy4 on long, intricate coding tasks and on the hardest reasoning and vision problems.
Most of its published results come from Tencent's own internal benchmarks and user studies. They are a useful signal, but not an independent measurement — run your own task before committing to it at scale.
Like any language model it can produce confident, wrong statements. Verify facts that matter, and keep a person in the loop for consequential decisions.
References
- Hy4 flash model card — specifications, usage notes and benchmark charts.
- Hy4 flash research page — Tencent's overview of the model.
- Source repository — code, deployment and fine-tuning guides.
- Tencent Hy License 1.0 — the license governing the weights.