Archive of AI

Source Snapshot / 2025-06-27-hunyuan-a13b-open-source-1

tencent/Hunyuan-A13B-Instruct

Linked event: 2025-06-27 · Tencent Hunyuan Open-Sources 80B/13B Hybrid Reasoning Model Hunyuan-A13B, Excluding EU, UK, and South Korea in License

Publisher
Hugging Face
Archived
2026-11-23
Capture Method
Direct page capture
HTTP / SHA-256
200 / 59fa4f770cda6b2e
Original URL
Open source ↗
Wayback Backup
Wayback archive ↗
This page preserves a plain-text static snapshot against link rot. When citing figures, tables, or full legal terms, verify against the original URL and Wayback Machine archive.

Hugging Face

Search models, datasets, users... ⌘K

Hunyuan-A13B-Instruct

Tencent 13.8k

Text Generation

Transformers

hunyuan_v1_moe

conversational

Eval Results

License: tencent-hunyuan-a13b

Model card Files Files and versions

Copy to bucket

Use this model

🤗 Hugging Face  |

🖥️ Official Website  |

🕖 HunyuanAPI  |

🤖 ModelScope

Technical Report |

Welcome to the official repository of Hunyuan-A13B, an innovative and open-source large language model (LLM) built on a fine-grained Mixture-of-Experts (MoE) architecture. Designed for efficiency and scalability, Hunyuan-A13B delivers cutting-edge performance with minimal computational overhead, making it an ideal choice for advanced reasoning and general-purpose applications, especially in resource-constrained environments.

Model Introduction

With the rapid advancement of artificial intelligence technology, large language models (LLMs) have achieved remarkable progress in natural language processing, computer vision, and scientific tasks. However, as model scales continue to expand, optimizing resource consumption while maintaining high performance has become a critical challenge. To address this, we have explored Mixture of Experts (MoE) architectures. The newly introduced Hunyuan-A13B model features a total of 80 billion parameters with 13 billion active parameters. It not only delivers high-performance results but also achieves optimal resource efficiency, successfully balancing computational power and resource utilization.

Key Features and Advantages

Compact yet Powerful: With only 13 billion active parameters (out of a total of 80 billion), the model delivers competitive performance on a wide range of benchmark tasks, rivaling much larger models.

Hybrid Reasoning Support: Supports both fast and slow thinking modes, allowing users to flexibly choose according to their needs.

Ultra-Long Context Understanding: Natively supports a 256K context window, maintaining stable performance on long-text tasks.

Enhanced Agent Capabilities: Optimized for agent tasks, achieving leading results on benchmarks such as BFCL-v3, τ-Bench and C3-Bench.

Efficient Inference: Utilizes Grouped Query Attention (GQA) and supports multiple quantization formats, enabling highly efficient inference.

Why Choose Hunyuan-A13B?

As a powerful yet computationally efficient large model, Hunyuan-A13B is an ideal choice for researchers and developers seeking high performance under resource constraints. Whether for academic research, cost-effective AI solution development, or innovative application exploration, this model provides a robust foundation for advancement.

Related News

2025.6.27 We have open-sourced Hunyuan-A13B-Pretrain , Hunyuan-A13B-Instruct , Hunyuan-A13B-Instruct-FP8 , Hunyuan-A13B-Instruct-GPTQ-Int4 on Hugging Face. In addition, we have released a technical report and a training and inference operation manual, which provide detailed information about the model’s capabilities as well as the operations for training and inference.

Note: The following benchmarks are evaluated by TRT-LLM-backend on several base models.

Hunyuan-Large

Hunyuan-A13B

Hunyuan-A13B-Instruct has achieved highly competitive performance across multiple benchmarks, particularly in mathematics, science, agent domains, and more. We compared it with several powerful models, and the results are shown below.

OpenAI-o1-1217

AIME 2024AIME 2025MATH

74.379.296.4

85.781.594.0

87.376.894.3

GPQA-DiamondOlympiadBench

LivecodebenchFullstackbenchArtifactsBench

63.964.638.6

65.971.644.6

70.765.644.6

BBHDROPZebraLogic

83.792.278.7

88.990.380.3

89.191.184.7

InstructionFollowing

IF-EvalSysBench

TextCreation

LengthCtrlInsCtrl

ComplexNLUWord-Task

BFCL v3 τ-BenchComplexFuncBench C3-Bench

67.860.447.658.8

56.943.841.155.3

70.844.640.651.7

78.354.761.263.5

Use with transformers

Our model defaults to using slow-thinking reasoning, and there are two ways to disable CoT reasoning.

Pass "enable_thinking=False" when calling apply_chat_template.

Adding "/no_think" before the prompt will force the model not to use perform CoT reasoning. Similarly, adding "/think" before the prompt will force the model to perform CoT reasoning.

The following code snippet shows how to use the transformers library to load and apply the model.

It also demonstrates how to enable and disable the reasoning mode ,

and how to parse the reasoning process along with the final output.

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name_or_path = os.environ['MODEL_PATH']

# model_name_or_path = "tencent/Hunyuan-A13B-Instruct"

tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True)

model = AutoModelForCausalLM.from_pretrained(model_name_or_path, device_map="auto",trust_remote_code=True) # You may want to use bfloat16 and/or move to GPU here

messages = [

{"role": "user", "content": "Write a short summary of the benefits of regular exercise"},

text = tokenizer.apply_chat_template(

tokenize=False,

enable_thinking=True

model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

model_inputs.pop("token_type_ids", None)

outputs = model.generate(**model_inputs, max_new_tokens=4096)

output_text = tokenizer.decode(outputs[0])

think_pattern = r'<think>(.*?)</think>'

think_matches = re.findall(think_pattern, output_text, re.DOTALL)

answer_pattern = r'<answer>(.*?)</answer>'

answer_matches = re.findall(answer_pattern, output_text, re.DOTALL)

think_content = [match.strip() for match in think_matches][0]

answer_content = [match.strip() for match in answer_matches][0]

print(f"thinking_content:{think_content}\n\n")

print(f"answer_content:{answer_content}\n\n")

Fast and slow thinking switch

This model supports two modes of operation:

Slow Thinking Mode (Default): Enables detailed internal reasoning steps before producing the final answer.

Fast Thinking Mode: Skips the internal reasoning process for faster inference, going straight to the final answer.

Switching to Fast Thinking Mode:

To disable the reasoning process, set enable_thinking=False in the apply_chat_template call:

enable_thinking=False

For deployment, you can use frameworks such as TensorRT-LLM, vLLM, or SGLang to serve the model and create an OpenAI-compatible API endpoint.

image: https://hub.docker.com/r/hunyuaninfer/hunyuan-a13b/tags

TensorRT-LLM

Docker Image

We provide a pre-built Docker image based on the latest version of TensorRT-LLM.

To Get Started, Download the Docker Image:

From Docker Hub:

docker pull hunyuaninfer/hunyuan-a13b:hunyuan-moe-A13B-trtllm

From China Mirror(Thanks to CNB):

First, pull the image from CNB:

docker pull docker.cnb.cool/tencent/hunyuan/hunyuan-a13b:hunyuan-moe-A13B-trtllm

Then, rename the image to better align with the following scripts:

docker tag docker.cnb.cool/tencent/hunyuan/hunyuan-a13b:hunyuan-moe-A13B-trtllm hunyuaninfer/hunyuan-a13b:hunyuan-moe-A13B-trtllm

start docker

docker run --name hunyuanLLM_infer --rm -it --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 --gpus=all hunyuaninfer/hunyuan-a13b:hunyuan-moe-A13B-trtllm

Prepare Configuration file:

cat >/path/to/extra-llm-api-config.yml <<EOF

use_cuda_graph: true

cuda_graph_padding_enabled: true

cuda_graph_batch_sizes:

print_iter_log: true

Start the API server:

trtllm-serve \

/path/to/HunYuan-moe-A13B \

--host localhost \

--port 8000 \

--backend pytorch \

--max_batch_size 32 \

--max_num_tokens 16384 \

--tp_size 2 \

--kv_cache_free_gpu_memory_fraction 0.6 \

--trust_remote_code \

--extra_llm_api_options /path/to/extra-llm-api-config.yml

Inference from Docker Image

We provide a pre-built Docker image containing vLLM 0.8.5 with full support for this model. The official vllm release is currently under development, note: cuda 12.4 is require for this docker.

docker pull hunyuaninfer/hunyuan-infer-vllm-cuda12.4:v1

docker pull docker.cnb.cool/tencent/hunyuan/hunyuan-a13b/hunyuan-infer-vllm-cuda12.4:v1

[...内容已截断,完整版请查看原文或 Wayback 快照]