A technical analysis reveals that using bfloat16 for Rotary Position Embeddings (RoPE) in Large Language Models can lead to a significant loss of positional information. Due to bfloat16's limited precision for integers, positions beyond 256 tokens are rounded, causing adjacent tokens to be treated as the same position. This rounding drastically reduces the accuracy of attention mechanisms, with a synthetic test showing top-1 accuracy dropping from nearly 100% to 3.5% over an 8,192-token sequence. The issue stems from the rounding of position IDs before they are used in trigonometric calculations, while rounding the final cosine and sine tables has a negligible impact. AI
IMPACT This finding highlights a critical precision issue in bfloat16 that could degrade LLM performance on long contexts, necessitating careful implementation of positional embeddings.
RANK_REASON Technical analysis of a specific implementation detail in LLM architecture. [lever_c_demoted from research: ic=1 ai=1.0]
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →