メインコンテンツまでスキップ

Model Architecture

VariableValueEffect
TINYLOOP_USE_ROPE1Enable rotary position embeddings across all forward paths. Required for Llama-family models.
TINYLOOP_ROPE_THETAfloatRoPE base frequency (default 10000.0). Llama-3 uses 500000.0.
TINYLOOP_N_KV_HEADSintGQA: number of KV heads (must divide n_heads). Shrinks attn_qkv weight and KV cache.
TINYLOOP_POST_NORM1Use post-norm (LayerNorm after attention/MLP) instead of pre-norm.
TINYLOOP_USE_GELU1Use GeLU activation instead of SwiGLU. For GPT-2/BERT-style models.