Opus 5.5 — 通用难度: Advanced制作路径: Coding & simulation

交互式 Transformer 架构讲解

用 Canvas 与滚动叙事讲解自注意力、多头注意力与前馈层,实时标注张量维度并高亮 token。

提示词

139 words · 867 characters
You are a senior ML educator and creative coder. Deliver ONE self-contained index.html (no build step) that explains the Transformer encoder block for developers who know matrix math but not the architecture.

Requirements:
- Dark theme, readable typography, responsive layout.
- Sections: token embedding → positional encoding → multi-head self-attention (show Q/K/V projections) → residual + layer norm → FFN → output.
- Use HTML5 Canvas or SVG for diagrams; animate attention weights on hover or scrub.
- Include a tiny 4-token demo sentence; clicking a token highlights its attention row.
- Add a "shape inspector" panel listing tensor ranks at each step (batch, seq, d_model, heads).
- No external CDN except optional fonts; inline all JS/CSS.
- Comment the code where math maps to drawing code.
- End with a checklist the reader can use to verify understanding.

工作流说明

分阶段生成:先布局再逐块实现注意力动画。每步截图留档。公式对照 Jay Alammar 或原论文核对。

看清楚,再上 Fable5

先算清成本、弄懂安全回退、选对模型档位,再做决定。注册免费账号,规格、价格或渠道一有变化就通知你。