Rust in Everything

Llama-3.3-70B-Instruct

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

现代开源标准稠密 Transformer 工业基准(70.6B):80 层无偏置 Pre-RMSNorm + 8:1 GQA + SwiGLU,追平 Llama-3.1-405B 核心指令表现。

01.最纯粹的现代 Decoder-Only 教科书结构:全网络零线性偏置 (`attention_bias=false, mlp_bias=false`)、双残差 Pre-RMSNorm (`eps=1e-5`)。
02.80 层 × 8192 维对称设计:64 个 Query 头配 8 个 KV 头(8× KV 显存压缩),SwiGLU 中间维 `28672 = 3.5 × 8192`。
03.128,256 词表与平滑分段频率缩放 (`rope_type = llama3`, `theta = 500,000`) 原生覆盖 128K 上下文。

meta-llama/Llama-3.3-70B-Instruct

Llama / GQA Densebfloat16
Source: Curated Model Atlas (Official Config)· Class: LlamaForCausalLM
总参数量 / 单 Token 激活
70.55B (100% Dense)
主干维度 (Layers × Hidden)
80L × 8192d
Vocab: 128256
KV Cache 压缩效率
8.0× vs MHA
2048 elems/tok/layer
上下文窗口 & 位置编码
128K ctx
RoPE θ=500K (llama3 ×8.0)
Embedding: 1.05B (1.5%)Attention / SSM: 12.08B (17.1%)Dense FFN: 56.37B (79.9%)Output Head: 1.05B (1.5%)
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 θ=500K (llama3 ×8.0) · 151.0M/layer
+h_mid = x + Mixer(Norm(x)) : [B, S, 8192]
hResidual Skip #2
Gated MLP (FFN)
704.6M/layer
Dense FFN (silu, I=28672)
+h_out = h_mid + FFN(Norm(h_mid)) : [B, S, 8192]
h_final : [B, S, 8192]
▾ Output & Decoding Stage
logits : float [B, S, 128256]
Operator Subgraph · Layer #0
x_norm [B, S, 8192]q_proj (no bias)[8192 → 8192] (64×128)k_proj (no bias)[8192 → 1024] (8×128)v_proj (no bias)[8192 → 1024] (8×128)Reshape + PosRoPE θ=500K (llama3 ×8.0)Reshape + 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)
预估推理总显存:146.67 GiB
硬件建议:160 GB 级(2× H100 80GB / 1× H200 141GB)
模型权重: 131.42 GiB
KV Cache: 10.00 GiB
激活/工作区: 5.26 GiB
★ 架构收益:在当前 B=1、Ctx=32768 配置下,相比标准多头注意力 (MHA 需 80.00 GiB) 节省了 70.00 GiB 缓存显存!