CoolFace
Modelpublic

tencent/Sequential-Hidden-Decoding-8B-n4

sourceHugging Faceotherupdated 7mo agoView on Hugging Face
11likes80downloads
Model Card

Sequential-Hidden-Decoding-8B-n4

This is the n=4 variant of Sequential Hidden Decoding, a method that scales sequence length by n× with only additional Embedding parameters — same Transformer, more compute per token.

  • —Base model: Qwen3-8B-Base
  • —Scale: 4×
  • —Additional Embedding Params: 3.1B
  • —Training Tokens: 150B
  • —Dtype: bfloat16
Note: This is a base model (not instruction-tuned). It is intended for benchmarking, text completion, and as a foundation for downstream fine-tuning (SFT / RLHF). For conversational or instruction-following use cases, please fine-tune on your own data.

Key Idea

Prepare n independent Embedding matrices to encode the same token sequence n times, interleave the results, and feed the n×-length sequence into the same Transformer. Only the last embedding of each token computes the next-token loss, while the preceding embeddings serve as implicit reasoning steps in a continuous latent space.

Results

Benchmark# Shots8B Baseline8B scale n=28B scale n=48B scale n=8
BBH (EM)3-shot78.881.383.083.9
MMLU (EM)5-shot79.880.981.982.2
MBPP+ (Pass@1)1-shot66.769.468.769.4
MATH (LLM-judge)4-shot56.058.260.061.1
ARC-C25-shot93.994.394.494.7
Hellaswag10-shot79.783.185.085.3
GSM8K4-shot92.593.393.994.6

Serving (SGLang)

This model requires a patched version of SGLang for inference. See the project page for installation options (Docker image, forked repo, or manual patch).

bash
python -m sglang.launch_server \
    --model-path tencent/Sequential-Hidden-Decoding-8B-n4 \
    --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
python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY")
response = client.completions.create(
    model="tencent/Sequential-Hidden-Decoding-8B-n4",
    prompt="The meaning of life is",
    max_tokens=128,
    temperature=0,
)
print(response.choices[0].text)

All Models

ModelScaleEmbedding ParamsTraining Tokens
Sequential-Hidden-Decoding-8B-n22×1.9B75B
Sequential-Hidden-Decoding-8B-n44×3.1B150B
Sequential-Hidden-Decoding-8B-n88×5.6B187B

Citation

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

License

This model is released under the License Terms of Sequential-Hidden-Decoding.