/ Модель

Характеристики

Контекст
32 768 токенов
Параметры
3,1 млрд
Размер весов
161 ГБ
Лицензия
Своя лицензия
Архитектура
hunyuan · MoE
Библиотека
transformers
Опубликована
27 июн 2025

Hunyuan-A13B-Pretrain

Генерация текстаТекст → текст15 профессий

Базовая MoE-модель Tencent для генерации текста, диалогов и решения задач на рассуждение, математику и код.

558скачиваний за 30 дней23лайкавеса обновлены8 июл 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Hunyuan-A13B-Pretrain — базовая большая языковая модель Tencent на архитектуре Mixture of Experts (MoE), предназначенная для генерации текста, рассуждений и общих языковых задач. В README для семейства Hunyuan-A13B указано 80 млрд параметров всего и 13 млрд активных параметров; метаданные именно этого репозитория указывают 3,1 млрд параметров. Карточка также описывает режимы быстрого и пошагового рассуждения, Grouped Query Attention и поддержку длинного контекста, но приводит для семейства 256 тыс. токенов, тогда как метаданные репозитория указывают нативный контекст 32 768 токенов.

Модель подходит для диалоговых приложений, генерации и продолжения текста, решения задач на рассуждение, математику и код, а также для агентных сценариев с вызовом инструментов. Репозиторий содержит веса safetensors и рассчитан на работу через Transformers; для сервинга README также упоминает TensorRT-LLM, vLLM и SGLang. В README упоминаются возможности семейства и результаты варианта Instruct, которые не следует считать подтверждёнными оценками именно этого pretrain-чекпойнта.

Лицензия указана как other; README ссылается на LICENSE, но конкретные условия в предоставленных данных не раскрыты.

Сценарии применения

  • создание и продолжение текстов
  • построение диалогового языкового сервиса
  • решение задач на логику и рассуждение
  • генерация и разбор кода
  • ответы на вопросы по длинному контексту
  • создание агентных приложений с вызовом инструментов

Ограничения

Метаданные репозитория указывают контекст 32 768 токенов, тогда как README описывает 256 тыс. токенов для семейства; эти значения относятся к разным источникам и область действия семейного значения не уточнена. Конкретные условия лицензии в предоставленных данных не приведены.

Для каких профессий подходит15

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

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.

Benchmark

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

ModelHunyuan-LargeQwen2.5-72BQwen3-A22BHunyuan-A13B
MMLU88.4086.1087.8188.17
MMLU-Pro60.2058.1068.1867.23
MMLU-Redux87.4783.9087.4087.67
BBH86.3085.8088.8787.56
SuperGPQA38.9036.2044.0641.32
EvalPlus75.6965.9377.6078.64
MultiPL-E59.1360.5065.9469.33
MBPP72.6076.0081.4083.86
CRUX-I57.0057.63-70.13
CRUX-O60.6366.2079.0077.00
MATH69.8062.1271.8472.35
CMATH91.3084.80-91.17
GSM8k92.8091.5094.3991.83
GPQA25.1845.9047.4749.12

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.

TopicBenchOpenAI-o1-1217DeepSeek R1Qwen3-A22BHunyuan-A13B-Instruct
MathematicsAIME 2024AIME 2025MATH74.379.296.479.87094.985.781.594.087.376.894.3
ScienceGPQA-DiamondOlympiadBench7883.171.582.471.185.771.282.7
CodingLivecodebenchFullstackbenchArtifactsBench63.964.638.665.971.644.670.765.644.663.967.843
ReasoningBBHDROPZebraLogic80.490.28183.792.278.788.990.380.389.191.184.7
InstructionFollowingIF-EvalSysBench91.882.588.377.783.474.284.776.1
TextCreationLengthCtrlInsCtrl60.174.855.96953.373.755.471.9
NLUComplexNLUWord-Task64.767.164.576.359.856.461.262.9
AgentBFCL v3 τ-BenchComplexFuncBench C3-Bench67.860.447.658.856.943.841.155.370.844.640.651.778.354.761.263.5

 

Use with transformers

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

  1. Pass "enable_thinking=False" when calling apply_chat_template.
  2. 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
import os
import re

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"},
]
tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt",
                                                enable_thinking=True # Toggle thinking mode (default: True)
                                                )
                                                
outputs = model.generate(tokenized_chat.to(model.device), 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")

Deployment

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:

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

docker pull hunyuaninfer/hunyuan-a13b:hunyuan-moe-A13B-trtllm
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:
- 1
- 2
- 4
- 8
- 16
- 32
print_iter_log: true
EOF
  • 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

vllm

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.8 is require for this docker.

  • To get started:
docker pull docker.cnb.cool/tencent/hunyuan/hunyuan-a13b:hunyuan-moe-A13B-vllm 
or
docker pull hunyuaninfer/hunyuan-a13b:hunyuan-moe-A13B-vllm
  • Download Model file:

    • Huggingface: will download automicly by vllm.
    • ModelScope: modelscope download --model Tencent-Hunyuan/Hunyuan-A13B-Instruct
  • Start the API server:

model download by huggingface:

docker run  --privileged --user root  --net=host --ipc=host \
        -v ~/.cache:/root/.cache/ \
        --gpus=all -it --entrypoint python  hunyuaninfer/hunyuan-a13b:hunyuan-moe-A13B-vllm
 \
         -m vllm.entrypoints.openai.api_server --host 0.0.0.0 --port 8000 \
         --tensor-parallel-size 4 --model tencent/Hunyuan-A13B-Instruct --trust-remote-code 

model downloaded by modelscope:

docker run  --privileged --user root  --net=host --ipc=host \
        -v ~/.cache/modelscope:/root/.cache/modelscope \
        --gpus=all -it --entrypoint python   hunyuaninfer/hunyuan-a13b:hunyuan-moe-A13B-vllm \
         -m vllm.entrypoints.openai.api_server --host 0.0.0.0 --tensor-parallel-size 4 --port 8000 \ 
         --model /root/.cache/modelscope/hub/models/Tencent-Hunyuan/Hunyuan-A13B-Instruct/ --trust_remote_code  

SGLang

Docker Image

We also provide a pre-built Docker image based on the latest version of SGLang.

To get started:

  • Pull the Docker image
docker pull docker.cnb.cool/tencent/hunyuan/hunyuan-a13b:hunyuan-moe-A13B-sglang
or
docker pull hunyuaninfer/hunyuan-a13b:hunyuan-moe-A13B-sglang
  • Start the API server:
docker run --gpus all \
    --shm-size 32g \
    -p 30000:30000 \
    --ipc=host \
    docker.cnb.cool/tencent/hunyuan/hunyuan-a13b:hunyuan-moe-A13B-sglang \
    -m sglang.launch_server --model-path hunyuan/huanyuan_A13B --tp 4 --trust-remote-code --host 0.0.0.0 --port 30000

Contact Us

If you would like to leave a message for our R&D and product teams, Welcome to contact our open-source team . You can also contact us via email (hunyuan_opensource@tencent.com).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

vLLM

Нельзя запустить

Модели нужен vLLM (несколько GPU), но архитектура HunYuanMoEV1ForCausalLM ему неизвестна.

Класс архитектуры
HunYuanMoEV1ForCausalLM
Ревизия весов
edcb495

0 моделей