腾讯/Hy4-preview 770B-A49B 模型权重发布

Reddit r/LocalLLaMA 模型

摘要

腾讯发布Hy4-preview,这是一款新的旗舰AI模型,采用混合专家架构,总参数为770B,每个token激活49B参数,具备如Gated DeepSeek Sparse Attention和identity Hyper-Connections等先进技术。

暂无内容
查看原文
查看缓存全文

缓存时间: 2026/08/28 07:40

tencent/Hy4-preview · Hugging Face

来源:https://huggingface.co/tencent/Hy4-preview
中文 (https://huggingface.co/tencent/Hy4-preview/blob/main/README_CN.md) | English

许可证 (https://huggingface.co/tencent/Hy4-preview#license) HuggingFace (https://huggingface.co/tencent/Hy4-preview) ModelScope (https://modelscope.cn/models/Tencent-Hunyuan/Hy4-preview) cnb.cool (https://cnb.cool/ai-models/tencent/Hy4-preview) GitCode (https://ai.gitcode.com/tencent_hunyuan/Hy4-preview)

🖥️ 官方网站 (https://aistudio.tencent.com/) | 💬 GitHub (https://github.com/Tencent-Hunyuan/Hy4-preview)


https://huggingface.co/tencent/Hy4-preview#table-of-contents 目录


https://huggingface.co/tencent/Hy4-preview#model-introduction 模型介绍

Hy4 preview 是腾讯混元团队开发的新一代混合专家(MoE)旗舰模型。模型总参数量为770B,每个token激活49B参数。主干网络包含78层,其中第一层采用标准稠密前馈网络(FFN),其余77层替换为MoE层,每层包含256个路由专家和1个共享专家;每个token激活前8个路由专家及共享专家。此外,主干网络内建1层原生多token预测(MTP)层(总参数10B,激活0.7B),用于推测解码。

在架构方面,受DeepSeek与GLM启发,注意力模块采用门控DeepSeek稀疏注意力机制(Gated DSA)结合索引缓存(IndexCache),实现跨层稀疏索引重用。残差路径使用恒等超连接(iHC)扩展层间信息流动。

https://huggingface.co/tencent/Hy4-preview#model-specifications 模型规格

下表仅列出主干网络参数,不含MTP层。

属性
架构混合专家(MoE)
总参数量770B
激活参数量49B
层数78
隐藏维度6144
注意力类型门控DSA
注意力头数64
查询压缩维度2048
键值压缩维度512
索引器头数/头维度32 / 128
索引器 top-k2048
残差流数量4
路由专家数256
共享专家数1
每token激活路由专家数8
MoE中间层维度2048
FFN中间层维度18432
上下文长度1M
词表大小120832

https://huggingface.co/tencent/Hy4-preview#a-new-flagship-generation 新一代旗舰模型

我们从模型规模、上下文长度和训练数据三个维度对 Hy4 preview 进行了扩展。更强的预训练与大幅增加的后训练轮次共同促成了能力的又一步跃升——这是我们在迭代中测得的最大一代增益,足以将 Hy4 preview 推至开源前沿。

https://huggingface.co/tencent/Hy4-preview#built-for-productivity 为生产力而构建

我们与腾讯内部顶尖专家(如软件工程师、游戏开发、金融分析和安全专家)合作,围绕他们的工作流构建训练数据。最终得到一个在这些团队日常任务上显著提升的模型:

软件工程:更擅长理解、规划、调试与验证长周期开发任务,在前端工作的视觉审美与交互质量上亦有提升。

办公与分析:将散落在多个文件中的杂乱上下文转化为可共享的工件——文档、表格和演示文稿,能更精准地处理数据分析、方程与金融模型。

游戏开发:将单一提示转化为可运行的原型,并与游戏引擎流畅协作,使开发者能在多轮交互中持续优化复杂项目。

科学研究:在艰深研究问题上具备更强的理解、推理与问题解决能力,在AI研究、分子动力学、凝聚态物理和纯数学领域均取得扎实进展。

我们还持续与腾讯产品(如 CodeBuddy 和 WorkBuddy)协同设计 Hy4 preview,使模型能力的提升直接体现在用户实际工作中。为此,我们进行了一项盲评对照测试:163名内部专家对203项工程任务的模型输出进行了评分。Hy4 preview 略优于 GLM 5.3(平均分2.99 vs 2.92,胜率46.8% / 平局12.8% / 负率40.4%)和 Kimi K3(2.99 vs 2.94,胜率51.2% / 平局7.9% / 负率40.9%)。

https://huggingface.co/tencent/Hy4-preview#benchmark-appendix 基准测试附录

https://huggingface.co/tencent/Hy4-preview#known-limitations 已知局限

这是 Hy4 的早期版本。在预训练和后训练阶段仍有较大提升空间,我们发布时已知一些问题,包括在复杂任务上推理时间超出必要、容易过度验证自身工作等。我们将快速迭代改进。与 Hy3 preview 类似,我们宁愿早期发布并收集反馈——正是这种方法使 Hy3 大幅改进,我们也将用同样的方式完善 Hy4。我们还将继续与腾讯产品及内部专家紧密合作,在推动模型智能边界的同时,使其更加普及和易得。

https://huggingface.co/tencent/Hy4-preview#news 新闻动态

  • 🔥 我们在 Hugging Face (https://huggingface.co/tencent/Hy4-preview)、ModelScope (https://modelscope.cn/models/Tencent-Hunyuan/Hy4-preview)、GitCode (https://ai.gitcode.com/tencent_hunyuan/Hy4-preview) 和 CNB (https://cnb.cool/ai-models/tencent/Hy4-preview) 开源了 Hy4 previewHy4 preview-FP8 模型权重。

https://huggingface.co/tencent/Hy4-preview#model-links 模型链接

https://huggingface.co/tencent/Hy4-preview#quickstart 快速开始

先通过 vLLM (https://huggingface.co/tencent/Hy4-preview#vllm) 或 SGLang (https://huggingface.co/tencent/Hy4-preview#sglang) 部署 Hy4 preview,然后调用兼容 OpenAI 的 API:

from openai import OpenAI

client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="EMPTY")

response = client.chat.completions.create(
    model="hy4-preview",
    messages=[
        {"role": "user", "content": "你好!请简要介绍一下你自己。"},
    ],
    temperature=0.9,
    top_p=1.0,
)
print(response.choices[0].message.content)

推荐参数temperature=0.9top_p=1.0推理模式:默认为 "high"(深度思维链),适用于数学、编程和推理等复杂任务。若需直接回答,可传入 extra_body={"chat_template_kwargs": {"reasoning_effort": "no_think"}}

详见下文 部署 部分,了解如何启动 API 服务。

https://huggingface.co/tencent/Hy4-preview#deployment 部署

生产环境服务推荐使用 vLLM (https://github.com/vllm-project/vllm) 或 SGLang (https://docs.sglang.io/)。

https://huggingface.co/tencent/Hy4-preview#vllm vLLM

从源码构建 vLLM:

uv venv --python 3.12 --seed --managed-python
source .venv/bin/activate
git clone https://github.com/vllm-project/vllm.git
cd vllm
uv pip install --editable . --torch-backend=auto

启动启用 MTP 的 vLLM 服务:

vllm serve tencent/Hy4-preview-FP8 \
  --tensor-parallel-size 8 \
  --speculative-config.method mtp \
  --speculative-config.num_speculative_tokens 3 \
  --attention-backend FLASHMLA_SPARSE \
  --tool-call-parser hy_v4 \
  --reasoning-parser hy_v4 \
  --enable-auto-tool-choice \
  --port 8000 \
  --served-model-name hy4-preview

或使用官方预构建镜像 vllm/vllm-openai:hy4-preview

docker run --gpus all \
  -p 8000:8000 \
  --ipc=host \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  vllm/vllm-openai:hy4-preview tencent/Hy4-preview-FP8 \
    --tensor-parallel-size 8 \
    --speculative-config '{"num_speculative_tokens":3,"method":"mtp"}' \
    --attention-backend FLASHMLA_SPARSE \
    --tool-call-parser hy_v4 \
    --reasoning-parser hy_v4 \
    --enable-auto-tool-choice \
    --port 8000 \
    --served-model-name hy4-preview

https://huggingface.co/tencent/Hy4-preview#sglang SGLang

使用官方预构建镜像 lmsysorg/sglang:hy4-preview(支持多架构,x86 和 Arm):

docker pull lmsysorg/sglang:hy4-preview

docker run --gpus all --ipc=host -p 8000:8000 lmsysorg/sglang:hy4-preview \
  python3 -m sglang.launch_server \
    --model tencent/Hy4-preview-FP8 \
    --tp-size 8 \
    --reasoning-parser auto \
    --tool-call-parser auto \
    --speculative-algorithm NEXTN \
    --speculative-num-steps 3 \
    --speculative-eagle-topk 1 \
    --speculative-num-draft-tokens 4 \
    --port 8000 \
    --served-model-name hy4-preview

https://huggingface.co/tencent/Hy4-preview#finetuning 微调

Hy4 preview 提供完整的模型微调流程。详细文档请参阅:微调指南

https://huggingface.co/tencent/Hy4-preview#quantization 量化

我们提供 AngelSlim (https://github.com/tencent/AngelSlim),一个更易用、全面且高效的大模型压缩工具包。AngelSlim 支持大规模多模态模型的全套压缩工具,包括常见量化算法、低比特量化和推测采样。

https://huggingface.co/tencent/Hy4-preview#license 许可证

Hy4 preview 以 Apache License 2.0 发布。详见 LICENSE

https://huggingface.co/tencent/Hy4-preview#contact-us 联系我们

如有任何问题或建议,欢迎通过邮件联系我们的研发与产品团队:

📧 [email protected]


Hy4 preview 由腾讯混元团队开发。

相似文章

tencent/Hy3

Simon Willison's Blog

腾讯发布了Hy3,这是一个295B参数的混合专家模型,拥有21B活跃参数,基于Apache 2.0许可证,性能优于相同规模模型,并能与参数规模大2-5倍的开源模型相抗衡。