writing/blog/2026/07
BlogJul 7, 2026·6 min read

Tencent Hy3: Developer Guide to the 295B Open-Source MoE Model

Tencent released Hy3, a 295B open-source MoE model with only 21B active parameters, Apache 2.0 license, 256K context, and SWE-Bench Verified score of 78.0.

Tencent released Hy3 on July 6, 2026 — a 295B Mixture-of-Experts model that activates only 21B parameters per token, ships under the Apache 2.0 license, and scores 78.0 on SWE-Bench Verified. It joins the short list of open-source models that genuinely challenge closed-source frontiers for coding and reasoning tasks.

This guide covers the architecture, benchmarks, and practical deployment with TypeScript examples.

What Is Hy3?

Hy3 (Hunyuan 3) is Tencent's latest open reasoning and agent model. The headline specs:

  • 295B total parameters, 21B active per token via sparse MoE
  • 192 experts with top-8 routing — only 8 experts fire per token
  • 3.8B Multi-Token Prediction (MTP) layer for speculative decoding
  • 256K context window for large codebases and long documents
  • BF16 precision with an FP8 variant for reduced memory
  • Apache 2.0 license — commercially permissive, globally usable

The MoE design is the key cost lever: each forward pass activates far fewer parameters than the total count suggests. You get model quality closer to a 295B dense model while paying inference costs closer to a 21B model.

Benchmarks

Hy3 posts strong results across coding, reasoning, and agent evaluation:

BenchmarkHy3 Score
SWE-Bench Verified78.0
SWE-Bench Pro57.9
Terminal-Bench 2.171.7
GPQA Diamond90.4
USAMO 202672.0
IMOAnswerBench90.0

In Tencent's internal reliability improvements between the April preview and the July release:

  • Hallucination rate dropped from 12.5% to 5.4%
  • Multi-turn intent tracking error rate dropped from 17.4% to 7.9%

For context, GLM-5.2 (roughly 744B total / 40B active) still leads on some coding benchmarks, but Hy3's smaller hardware footprint makes it more accessible for self-hosted deployments.

Self-Hosting with vLLM

Hy3 requires 8 GPUs (NVIDIA H20-3e, H200, or AMD MI300X/MI325X with at least 141 GB VRAM each). The official deployment uses vLLM.

Option 1: Docker (Fastest Start)

docker run --gpus all \
  -p 8000:8000 \
  --ipc=host \
  -e VLLM_FLASHINFER_ALLREDUCE_BACKEND=trtllm \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  vllm/vllm-openai:hy3 tencent/Hy3 \
    --tensor-parallel-size 8 \
    --tool-call-parser hy_v3 \
    --reasoning-parser hy_v3 \
    --enable-auto-tool-choice \
    --served-model-name hy3

Multi-Token Prediction speeds up generation by predicting multiple tokens per step:

export VLLM_FLASHINFER_ALLREDUCE_BACKEND=trtllm
vllm serve tencent/Hy3 \
  --tensor-parallel-size 8 \
  --speculative-config.method mtp \
  --speculative-config.num_speculative_tokens 2 \
  --tool-call-parser hy_v3 \
  --reasoning-parser hy_v3 \
  --enable-auto-tool-choice \
  --served-model-name hy3

AMD MI300X Deployment

AMD users set these environment variables before serving:

export VLLM_ROCM_USE_AITER=1
export VLLM_ROCM_USE_AITER_MOE=1
export VLLM_ROCM_USE_AITER_MHA=1
export VLLM_ROCM_USE_AITER_RMSNORM=1
export VLLM_ROCM_USE_AITER_LINEAR=1
 
vllm serve tencent/Hy3 \
  --tensor-parallel-size 8 \
  --tool-call-parser hy_v3 \
  --reasoning-parser hy_v3 \
  --enable-auto-tool-choice \
  --served-model-name hy3 \
  --gpu-memory-utilization 0.90

TypeScript Integration

Hy3 exposes an OpenAI-compatible API, so the standard openai TypeScript SDK works out of the box — just point baseURL at your vLLM endpoint.

Installation

npm install openai

Basic Chat Completion

import OpenAI from "openai";
 
const client = new OpenAI({
  baseURL: "http://localhost:8000/v1",
  apiKey: "EMPTY",
});
 
const response = await client.chat.completions.create({
  model: "hy3",
  messages: [
    { role: "system", content: "You are a helpful coding assistant." },
    { role: "user", content: "Write a TypeScript function to parse JSON safely." },
  ],
  temperature: 0.9,
  top_p: 1.0,
  max_tokens: 4096,
});
 
console.log(response.choices[0].message.content);

Deep Reasoning Mode

For complex tasks — math proofs, architecture decisions, difficult debugging — activate chain-of-thought with reasoning_effort: "high":

const thinkingResponse = await client.chat.completions.create({
  model: "hy3",
  messages: [
    {
      role: "user",
      content: "Design a distributed rate limiter for 10,000 req/s with Redis.",
    },
  ],
  temperature: 0.9,
  top_p: 1.0,
  max_tokens: 8192,
  // @ts-expect-error — Hy3-specific extra body
  extra_body: {
    chat_template_kwargs: {
      reasoning_effort: "high",
      interleaved_thinking: true,
    },
  },
});
 
const message = thinkingResponse.choices[0].message;
// @ts-expect-error — reasoning_content is Hy3-specific
console.log("Reasoning:", message.reasoning_content);
console.log("Answer:", message.content);

The three reasoning_effort modes:

ModeWhen to Use
no_thinkFast, direct answers — Q&A, simple completions
lowLight reasoning — code reviews, summaries
highDeep chain-of-thought — math, architecture, hard bugs

Setting interleaved_thinking: true allows the model to reason between tool calls — useful for multi-step agent tasks where intermediate reasoning improves each tool invocation.

Tool Calling

Hy3 supports the standard OpenAI function calling format:

const tools: OpenAI.ChatCompletionTool[] = [
  {
    type: "function",
    function: {
      name: "run_tests",
      description: "Execute the test suite and return results",
      parameters: {
        type: "object",
        properties: {
          pattern: {
            type: "string",
            description: "Test file glob pattern",
          },
        },
        required: ["pattern"],
      },
    },
  },
];
 
const agentResponse = await client.chat.completions.create({
  model: "hy3",
  messages: [
    { role: "user", content: "Run all tests in src/ and summarize failures." },
  ],
  tools,
  tool_choice: "auto",
  // @ts-expect-error — Hy3-specific extra body
  extra_body: {
    chat_template_kwargs: {
      reasoning_effort: "high",
      interleaved_thinking: true,
    },
  },
});

FP8 Variant for Lower Memory Usage

For teams with tighter GPU budgets, the FP8 model (tencent/Hy3-FP8) reduces memory requirements with a small accuracy trade-off:

vllm serve tencent/Hy3-FP8 \
  --tensor-parallel-size 8 \
  --tool-call-parser hy_v3 \
  --reasoning-parser hy_v3 \
  --enable-auto-tool-choice \
  --served-model-name hy3-fp8

Benchmark the FP8 variant before committing:

vllm bench serve \
  --model tencent/Hy3-FP8 \
  --dataset-name random \
  --random-input-len 8192 \
  --random-output-len 1024 \
  --max-concurrency 32 \
  --num-prompts 160 \
  --served-model-name hy3-fp8

When to Choose Hy3

Hy3 fits teams that want:

  • Full data control — self-hosted, no data leaving your infrastructure
  • Commercial freedom — Apache 2.0, no geographic restrictions
  • Long-context tasks — 256K window handles large codebases, legal documents, research papers
  • Agentic workflows — interleaved reasoning + tool calls designed for multi-step agents
  • Cost efficiency — 21B active parameters, not 295B, means manageable inference costs relative to quality

The main constraint is hardware: 8 high-VRAM GPUs is a real capital investment. Teams that can't self-host and don't need full data control may find API-hosted alternatives more practical.

Summary

Tencent Hy3 is the strongest open-source option for coding and STEM reasoning today. Apache 2.0 licensing, an OpenAI-compatible API, and a configurable reasoning depth make it straightforward to integrate with any TypeScript project that already uses the OpenAI SDK. Point baseURL at your vLLM endpoint and you're up and running in minutes.

The model card and vLLM recipes are at github.com/Tencent-Hunyuan/Hy3.