tencent_hunyuan/Sequential-Hidden-Decoding-8B-n8-Instruct
模型介绍文件和版本Pull Requests讨论分析
下载使用量0

Sequential-Hidden-Decoding-8B-n8-Instruct

这是 Sequential Hidden Decoding 8B n=8 的指令微调版本,专为对话和指令遵循场景设计。

  • 基础模型:Sequential-Hidden-Decoding-8B-n8
  • 底层架构:Qwen3-8B-Base
  • 规模:8x
  • 上下文长度:131072
  • 数据类型:bfloat16

核心思想

Sequential Hidden Decoding 通过为同一 token 序列准备多个嵌入矩阵,对结果进行交错处理,并将扩展后的序列输入同一个 Transformer,从而实现序列长度的扩展。本模型是 8B n=8 版本的指令微调发布版。

部署(SGLang)

该模型需要使用经过补丁的 SGLang 版本进行推理。有关安装选项,请参见 项目页面。

python -m sglang.launch_server \
    --model-path tencent/Sequential-Hidden-Decoding-8B-n8-Instruct \
    --trust-remote-code \
    --tp-size 1 \
    --port 30000 --host 0.0.0.0 \
    --chunked-prefill-size -1 \
    --attention-backend fa3 \
    --mem-fraction-static 0.82 \
    --max-running-requests 32 \
    --context-length 131072 \
    --cuda-graph-max-bs 128 \
    --cuda-graph-bs 1 2 4 8 16 32 64 128

注意: Sequential Hidden Decoding 模型在内部处理 n× 长度的序列,因此 --chunked-prefill-size -1、--attention-backend fa3 以及保守的批处理大小对于稳定性和性能至关重要。

聊天使用方法

这是一个指令微调模型。使用 /v1/chat/completions 端点:

from openai import OpenAI

client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")
response = client.chat.completions.create(
    model="tencent/Sequential-Hidden-Decoding-8B-n8-Instruct",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain the idea of hidden decoding in simple terms."},
    ],
    max_tokens=512,
    temperature=0.7,
)
print(response.choices[0].message.content)

文件

本仓库包含 trust_remote_code 所需的自定义架构文件:

  • configuration_qwen3_scale_seq.py
  • modeling_qwen3_scale_seq.py

相关模型

模型类型说明
Sequential-Hidden-Decoding-8B-n2基础2倍缩放基础模型
Sequential-Hidden-Decoding-8B-n4基础4倍缩放基础模型
Sequential-Hidden-Decoding-8B-n8基础8倍缩放基础模型
Sequential-Hidden-Decoding-8B-n8-Instruct指令微调经过指令微调的8倍缩放模型

引用

@article{hidden_decoding_2026,
  title   = {Hidden Decoding: Scaling Sequence Length in Pretraining},
  year    = {2026},
  url     = {https://welm.weixin.qq.com/posts/hidden_decoding/}
}

许可协议

本模型依据Sequential-Hidden-Decoding许可条款发布。