Hy3

Hy3

Hy3는 Tencent의 3세대 플래그십 Mixture-of-Experts 언어 모델로, 하이브리드 thinking, 네이티브 툴 호출, 장문 컨텍스트 추론, 저지연 서빙을 위한 Multi-Token Prediction(MTP)을 갖추고 있어요. MoE 아키텍처(192개 라우팅 전문가 + 1개 공유 전문가, 토큰당 top-8 활성, 총 295B/활성 21B(+3.8B MTP 레이어))로 dense 모델 품질을 MoE 추론 비용으로 제공해요.

256K 토큰 컨텍스트 윈도우를 지원하며 OpenAI 표준 reasoning_effort로 추론 수준을 제어하고, 내장 MTP draft 모듈로 추측 디코딩을 즉시 지원해요. BF16과 FP8 체크포인트로 제공돼요.

출처: 문서

본문

Deployment

Install SGLang

모든 방법과 하드웨어 플랫폼은 공식 SGLang 설치 가이드를 참조하세요. 아래 두 경로는 명령 패널의 Python / Docker 토글에 해당해요.

Python (pip / uv):

pip install -U uv
uv venv --python 3.12 && source .venv/bin/activate

# Install from source (main carries the suffix-aware `hunyuan` parser + the
# HYV3 model code). Once a tagged release picks it up,
# `uv pip install --prerelease=allow sglang` is enough.
git clone https://github.com/sgl-project/sglang.git
cd sglang
uv pip install --prerelease=allow -e python

이 환경에서 아래 명령 패널의 Python 출력을 실행하세요.

Docker:

# The image bundles the HYV3 model code and the suffix-aware `hunyuan` parser.
docker pull lmsysorg/sglang:dev

이미지 실행 방법은 Install → Method 3: Using Docker을 참고하고, 안쪽 sglang serve ...를 아래 명령 생성기가 만들어 주는 것으로 바꿔 끼우세요.

Note: dev 이미지는 HYV3 모델 코드, suffix-aware hunyuan reasoning/tool-call 파서, MTP draft-모듈 런타임을 번들해요. 같은 파서가 preview(suffix-less)와 shipping(suffixed) Hy3 토크나이저 모두에 동작해요. 모델별 하드코딩이 없어요.

하드웨어와 레시피를 골라 실행 명령을 생성하세요.

  • Low-Latency — 단일 사용자에게 가장 빠른 응답. 채팅에 적합해요.
  • Balanced — 여러 사용자가 동시에 있어도 좋은 속도. 일반적인 멀티 사용자 서빙에 사용해요.

패널 컨트롤 (명령 상자 상단):

  • Python / Docker — 기존 SGLang 환경의 bare sglang serve … 또는 위 Install SGLang 패널의 하드웨어별 이미지에 대한 docker run … sglang serve … 래퍼.
  • ⧉ Copy — 현재 명령(활성 프레이밍 포함)을 클립보드로 복사.
  • $ cURL — 서버가 떠 있는지 확인하는 localhost:30000 대상 샘플 요청.
  • ⚙ Env — 명령과 cURL이 공유하는 플레이스홀더(HOST_IP, PORT, HF_TOKEN, NODE_RANK, NODE0_IP) 편집. cookbook에 걸쳐 localStorage에 저장.
  • Verified / Not Verified 배지 — (hw, variant, quant, strategy, nodes) 콤보가 실제 하드웨어에서 end-to-end로 실행됐으면 초록, 이웃에서 자동 파생되어 아직 재확인되지 않았으면 노랑.

Playground

Playground는 현재 선택된 Deploy 셀 위에 추가 노브를 켤 수 있는 곳이에요. 베이스는 현재 Deploy 선택에서 실시간으로 읽어오며, 당신의 오버라이드만 변경돼요.

노브는 두 종류가 있어요:

  • 내장 SGLang 기능 — 병렬 처리 오버라이드(TP / DP-Attention), MoE 백엔드 + EP, reasoning / tool-call 파서, 추측 디코딩 프리셋, prefill/decode disaggregation, HiCache 계층.
  • Hy3 특정--tool-call-parser auto / --reasoning-parser auto (채팅 템플릿에서 Hy3의 suffix-aware hunyuan 파서를 자동 감지, 런타임에 토크나이저 vocab에서 실제 특수 토큰 해석).

초록으로 강조된 줄은 당신의 오버라이드로 추가된 것이고, 빨간 취소선 줄은 검증된 베이스에 있었지만 오버라이드가 제거한 것이에요. 오버라이드가 베이스 셀과 다르지 않으면 playground는 베이스의 Verified 배지를 상속하고, 실제 변경이 있으면 새 구성이 end-to-end로 실행되어 제출될 때까지 Not Verified로 바뀌어요.

패널 컨트롤은 Deploy 패널의 Python / Docker · ⧉ Copy · $ cURL · ⚙ Env를 재사용하고 하나가 더 있어요:

  • Submit ↗ — 사전 채워진 GitHub issue를 열어 당신의 오버라이드 콤보를 새 검증 cookbook 셀로 제출. 배지가 Not Verified일 때만 표시되며, 실제로 하드웨어에서 명령을 실행해 동작을 확인한 뒤 클릭하세요.

1. 모델 소개

Hy3는 Tencent의 3세대 플래그십 Mixture-of-Experts 언어 모델로, 하이브리드 thinking, 네이티브 툴 호출, 장문 컨텍스트 추론, 저지연 서빙을 위한 Multi-Token Prediction (MTP)을 갖추고 있어요.

주요 특징:

  • MoE 아키텍처: 192개 라우팅 전문가 + 1개 공유 전문가, 토큰당 top-8 활성. 총 295B 파라미터 중 활성 21B(+3.8B MTP 레이어)로, MoE 추론 비용으로 dense 모델 품질 제공.
  • 하이브리드 thinking: high, low, no_think 추론 모드를 OpenAI 표준 reasoning_effort로 제어해, 같은 가중치로 지연 시간과 추론 깊이를 트레이드오프.
  • 네이티브 툴 호출: 구조화된 문법으로 훈련. SGLang의 hunyuan 툴 호출 파서와 결합해 스트리밍 OpenAI 호환 함수 호출 출력.
  • 장문 컨텍스트: 저장소 규모 코드와 문서 추론용 256K 토큰 컨텍스트 윈도우(262,144 위치).
  • Multi-Token Prediction (MTP): 내장 MTP draft 모듈과 함께 제공되어 즉시 추측 디코딩 활성화.

사용 가능한 모델:

권장 생성 파라미터:

Parameter Value
temperature 0.9
top_p 1.0
reasoning_effort high / low (thinking) 또는 no_think (instant)

특수 토큰. shipping Hy3 토크나이저는 모든 특수 토큰에 공유 접미사를 추가해요 (예: 베어 <tool_calls> 대신 <tool_calls:TAG>). SGLang의 hunyuan 파서는 런타임에 토크나이저 vocab에서 실제 토큰 문자열을 해석하므로(PR #29920), 같은 레시피가 preview(suffix-less)와 shipping(suffixed) 토크나이저 모두에 동작해요. 모델별 하드코딩이 없어요. 이것이 --reasoning-parser hunyuan / --tool-call-parser hunyuan이 shipping 모델에서 바로 동작하는 이유예요.

2. 구성 팁

하드웨어 요구사항 (BF16, ~590GB 가중치):

GPU VRAM TP Notes
H200 141GB 8 BF16 single-node 최소값
B200 192GB 4 BF16 590GB → 148GB/GPU
B300 / GB300 288GB 4 BF16 590GB → 148GB/GPU; 충분한 KV 헤드룸
GB200 192GB 4 single-node 4×192GB = 768GB fits BF16 590GB

Blackwell 어텐션 백엔드. SM100/SM103 (B200 / B300 / GB200 / GB300)에서 SGLang은 HYV3의 MHA 아키텍처에 trtllm_mha 어텐션 백엔드를 자동 선택해요(플래그 불필요) — 위 실행 명령은 그 이유로 이걸 생략해요. 특정 커널 사유가 있을 때만 오버라이드하세요.

MTP (Multi-Token Prediction, EAGLE).

  • low-latency: steps=3, draft-tokens=4 → bs=1에서 가장 큰 이득.
  • balanced: MTP 비활성화 — chunked-prefill이 효율적으로 유지되도록 prefill 배치를 적당히 유지.

reasoning_effort vs thinking. Hy3 채팅 템플릿은 다른 일부 제품군이 쓰는 thinking 플래그가 아니라 reasoning_effort(high / low / no_think)로 구동돼요. 기본값은 no_think(즉시)예요. thinking을 선택하려면 요청에 reasoning_effort="high"를 전달하세요(OpenAI 표준 필드, sglang이 템플릿에 전달). reasoning_effort: max는 sglang이 거부하므로 high를 사용하세요. 평가에서 sgl-eval의 --thinking 플래그는 Hy3에 대해 reasoning_effort="high"로 변환되므로 아래 벤치마크 명령이 이를 그대로 사용해요.

3. 고급 사용

3.1 추론 (하이브리드 thinking)

Hy3는 하이브리드 thinking 모델이에요. reasoning_effort로 thinking 예산을 제어하세요:

  • high / lowreasoning_content에 점점 더 많은 chain-of-thought 포함
  • no_think — 생각을 완전히 건너뜀 (즉시 응답, content만)

배포 시 reasoning parser를 활성화해 thinking 섹션이 reasoning_content로 분리되게 하세요:

sglang serve \
  --model-path tencent/Hy3 \
  --tp 8 \
  --reasoning-parser auto \
  --tool-call-parser auto

예제: thinking (reasoning_effort=high)

from openai import OpenAI

client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")

response = client.chat.completions.create(
    model="tencent/Hy3",
    messages=[{"role": "user", "content": "Solve step by step: What is 15% of 240?"}],
    reasoning_effort="high",
    max_tokens=2048,
)

msg = response.choices[0].message
print("=============== Thinking =================")
print(msg.reasoning_content)
print("=============== Content =================")
print(msg.content)
=============== Thinking =================
We need to solve: "What is 15% of 240?" Step by step. 15% means 15/100 = 0.15. Multiply 0.15 by 240.
10% of 240 = 24, 5% is half of 10% = 12, so sum = 36. So answer is 36.
=============== Content =================
To find 15% of 240, follow these steps:

1. 15% = 15/100 or 0.15.
2. Multiply 240 by 0.15: 0.15 × 240 = 36.
3. Check: 10% of 240 = 24, 5% = 12, 15% = 36.

Thus, 15% of 240 is 36.

예제: instant mode (reasoning_effort=no_think)

response = client.chat.completions.create(
    model="tencent/Hy3",
    messages=[{"role": "user", "content": "Give me a one-line summary of relativity."}],
    reasoning_effort="no_think",
    max_tokens=256,
)

print("Content:", response.choices[0].message.content)
Content: Relativity is Einstein's theory that space, time, mass, and gravity are interconnected and relative, not fixed, fundamentally changing our understanding of the universe.

3.2 툴 호출

Hy3는 스트리밍 OpenAI 호환 툴 호출을 지원해요. 두 파서를 함께 활성화하세요 — reasoning parser가 툴 호출 파서 실행 전에 thinking 토큰을 제거해요:

sglang serve \
  --model-path tencent/Hy3 \
  --tp 8 \
  --reasoning-parser auto \
  --tool-call-parser auto

예제: 비스트리밍 툴 호출

from openai import OpenAI

client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")

tools = [
    {
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get the current weather for a city.",
            "parameters": {
                "type": "object",
                "properties": {
                    "city": {"type": "string"},
                    "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]},
                },
                "required": ["city"],
            },
        },
    }
]

response = client.chat.completions.create(
    model="tencent/Hy3",
    messages=[{"role": "user", "content": "What's the weather in Beijing? Use fahrenheit."}],
    tools=tools,
)

msg = response.choices[0].message
print("Reasoning:", msg.reasoning_content)
print("Content:  ", msg.content)
for tc in msg.tool_calls or []:
    print(f"Tool Call: {tc.function.name}")
    print(f"  Arguments: {tc.function.arguments}")
Reasoning: None
Content:   I'll get the current weather for Beijing in Fahrenheit for you.
Tool Call: get_weather
  Arguments: {"city": "Beijing", "unit": "fahrenheit"}

예제: 스트리밍 툴 호출 (증분 인자 델타)

from openai import OpenAI

client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")

stream = client.chat.completions.create(
    model="tencent/Hy3",
    messages=[{"role": "user", "content": "What's the weather in Beijing? Use fahrenheit."}],
    tools=tools,
    stream=True,
)

tool_buffer = {}
for chunk in stream:
    delta = chunk.choices[0].delta
    if delta.content:
        print(delta.content, end="", flush=True)
    for tc in delta.tool_calls or []:
        buf = tool_buffer.setdefault(tc.index, {"name": "", "args": ""})
        if tc.function and tc.function.name:
            buf["name"] += tc.function.name
        if tc.function and tc.function.arguments:
            buf["args"] += tc.function.arguments

for idx, buf in tool_buffer.items():
    print(f"\nTool[{idx}] {buf['name']}({buf['args']})")
I'll check the current weather in Beijing for you using Fahrenheit.
Tool[0] get_weather({"city": "Beijing", "unit": "fahrenheit"})

더 알아보기 (Learn more)