Rust in Everything

Qwen2.5-72B-Instruct

LLM 语言模型
提示:左侧拓扑图支持「紧凑总览 / 标准观察 / 全展开+算子」及单个模块独立收起与展开

经典大尺寸开源稠密旗舰(72.7B):80 层 × 8192 维宽深主干、8:1 GQA、保留 QKV 偏置以增强 128K 长上下文位置外推能力。

01.标志性的 QKV 偏置设计:Q/K/V 线性投影均开启 Bias(O 投影无 Bias),是区分 Qwen2/2.5 与 Llama-3 / Qwen3 的核心算子特征。
02.80 层 × 8192 维满血稠密栈:FFN 中间维高达 29568,配合 152,064 超大对齐词表总计 72.71B 参数。
03.8:1 GQA (64Q : 8KV) 将 80 层大模型的 KV Cache 压缩 87.5%,使双卡 80GB 即可承载长文本服务。

Qwen/Qwen2.5-72B-Instruct

Qwen Dense (GQA)bfloat16
Source: Curated Model Atlas (Official Config)· Class: Qwen2ForCausalLM
总参数量 / 单 Token 激活
72.71B (100% Dense)
主干维度 (Layers × Hidden)
80L × 8192d
Vocab: 152064
KV Cache 压缩效率
8.0× vs MHA
2048 elems/tok/layer
上下文窗口 & 位置编码
128K ctx
RoPE θ=1M
Embedding: 1.25B (1.7%)Attention / SSM: 12.08B (16.6%)Dense FFN: 58.13B (80.0%)Output Head: 1.25B (1.7%)
Macro Forward Pass (点击任意模块钻取细节)
视图粒度:
input_ids : int64 [B, S]
h_0 : [B, S, 8192]
Layers 0–79 (×80) · 当前观测 Layer #0
0/79
xResidual Skip #1
Self-Attention
KV ÷8.0×
GQA (64Q:8KV × 128d)
RoPE θ=1M · 151.0M/layer
+h_mid = x + Mixer(Norm(x)) : [B, S, 8192]
hResidual Skip #2
Gated MLP (FFN)
726.7M/layer
Dense FFN (silu, I=29568)
+h_out = h_mid + FFN(Norm(h_mid)) : [B, S, 8192]
h_final : [B, S, 8192]
▾ Output & Decoding Stage
logits : float [B, S, 152064]
Operator Subgraph · Layer #0
x_norm [B, S, 8192]q_proj (+bias)[8192 → 8192] (64×128)k_proj (+bias)[8192 → 1024] (8×128)v_proj (+bias)[8192 → 1024] (8×128)Reshape + PosRoPE θ=1MReshape + PosQ:KV Group = 8:1★ KV Cache (K & V): 2 × [B, 8, S, 128] (2048 elems/tok/layer)Scaled Dot-Product Attention (1/√128 · Causal Mask)Softmax(Q · Kᵀ) · V → Concat [B, S, 8192]o_proj [8192 → 8192] (no bias)Output: [B, S, 8192] → Residual Add (+)
部署量化精度
上下文长度 (Context)
并发序列数 (Batch)
预估推理总显存:150.84 GiB
硬件建议:160 GB 级(2× H100 80GB / 1× H200 141GB)
模型权重: 135.43 GiB
KV Cache: 10.00 GiB
激活/工作区: 5.42 GiB
★ 架构收益:在当前 B=1、Ctx=32768 配置下,相比标准多头注意力 (MHA 需 80.00 GiB) 节省了 70.00 GiB 缓存显存!