Update OLMo-2-1B-Instruct with ShardedRMSNorm for TP Q-K norm#38
Open
sdeeptan-aws wants to merge 4 commits intoaws-neuron:mainfrom
Open
Update OLMo-2-1B-Instruct with ShardedRMSNorm for TP Q-K norm#38sdeeptan-aws wants to merge 4 commits intoaws-neuron:mainfrom
sdeeptan-aws wants to merge 4 commits intoaws-neuron:mainfrom
Conversation
aws-yishanm
reviewed
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updated OLMo-2-0425-1B-Instruct contrib model with correct post-layer normalization architecture, ShardedRMSNorm for Q-K normalization with tensor parallelism, validated modeling code, tests, and README. The model initially had 0% token match with TP>1 due to RMSNorm variance being computed over the sharded dimension instead of the full dimension. Implementing an all-reduce for correct variance computation fixed accuracy to 100%.
Model Information
Model Name: OLMo-2-0425-1B-Instruct
Model Architecture: Decoder-only transformer (OLMo2 with post-layer normalization and Q-K RMSNorm)
Purpose: Text generation
Checklist
Required Components
test/integration/test_model.py)src/)Optional Components
Folder Structure
Testing
Model was compiled and tested with TP=2, batch_size=1, seq_len=128, bfloat16. Multi-prompt validation achieved 100% token match on 6 of 7 prompts. The critical fix was implementing
ShardedRMSNormfor Q-K normalization that usesreduce_from_tensor_model_parallel_regionto compute variance over the full dimension when TP>1.Test Results:
Multi-Prompt Accuracy:
Compatibility
Tested with:
Additional Information
ShardedRMSNorm— naive TP computes variance over the sharded dimension (e.g., 512) instead of the full dimension (e.g., 4096), causing sqrt(TP_degree) scaling error in normalized values.reduce_from_tensor_model_parallel_region, then divides by full dimension size for correct variance.Related Issues
N/A
vLLM Integration
By submitting this PR, I confirm that: