Embedding
[B, S] → [B, S, hidden_dim]
[ from Standard ]
Maps token IDs to dense vectors. The entry point for most architectures.
[ PARAMETERS ]
vocab_size(int)— Vocabulary size (e.g., 32000)
hidden_dim(int)— Embedding dimension (e.g., 4096)
All available components in Otter, organized by category. Each block is extracted from a production model and validated for dimension compatibility.
Maps token IDs to dense vectors. The entry point for most architectures.
Root Mean Square Layer Normalization. Faster than LayerNorm with similar results.
Rotary Position Embeddings. Applied to Q/K in attention for relative positions.
Multi-head attention with grouped key-value heads. Balances quality and efficiency.
Feed-forward network with SiLU activation and gating. Standard in modern LLMs.
Routes tokens to top-k experts. Core of Mixture-of-Experts architectures.
Projects hidden states to vocabulary logits. Typically with tied embeddings.