Baseline design
The first AVQ model uses a dense decoder-only transformer trained with next-token prediction. The architecture combines established techniques rather than claiming a novel transformer invention. Each block applies pre-normalization, grouped-query causal attention, a residual connection, and a SwiGLU feedforward sublayer with its own residual connection.
Token IDs
Shared embeddings
6 × transformer blocks
Final RMSNorm
Tied output head
| Component | Role |
|---|---|
| RoPE | Rotate query and key vectors to encode relative position |
| GQA | Share key/value heads across query-head groups |
| RMSNorm | Normalize activations before each sublayer |
| SwiGLU | Gated feedforward transformation |
| Causal mask | Prevent attention to future tokens |
| Tied embeddings | Reuse the embedding matrix for output logits |
Architecture estimator
Adjust a hypothetical bias-free GQA model with half as many KV heads as query heads. Context does not add trainable RoPE parameters.
Canonical configuration
model:
architecture: decoder_transformer
hidden_size: 256
intermediate_size: 1024
num_layers: 6
vocab_size: 16384
query_heads: 8
kv_heads: 4
max_context: 2048
position_encoding: rope
normalization: rmsnorm
activation: swiglu
tie_embeddings: true
use_bias: falseRequired numerical tests
- Parameter counts match instantiated modules.
- Invalid head dimensions and shapes fail validation.
- Changing later tokens cannot alter earlier logits in evaluation mode.
- Forward and backward passes remain finite.
- Checkpoint reload preserves evaluation outputs within documented tolerance.
- Compare experimental components with a fixed baseline and equivalent budgets.