这是 Sequential Hidden Decoding 8B n=8 的指令微调版本,专为对话和指令遵循场景设计。
Sequential Hidden Decoding 通过为同一 token 序列准备多个嵌入矩阵,对结果进行交错处理,并将扩展后的序列输入同一个 Transformer,从而实现序列长度的扩展。本模型是 8B n=8 版本的指令微调发布版。
该模型需要使用经过补丁的 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.pymodeling_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许可条款发布。