Update Pythia-2.8B GPTNeoX model with validated accuracy#41
Open
sdeeptan-aws wants to merge 1 commit intoaws-neuron:mainfrom
Open
Update Pythia-2.8B GPTNeoX model with validated accuracy#41sdeeptan-aws wants to merge 1 commit intoaws-neuron:mainfrom
sdeeptan-aws wants to merge 1 commit intoaws-neuron:mainfrom
Conversation
aws-yishanm
approved these changes
Feb 19, 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 Pythia-2.8B contrib model with GPTNeoX architecture support. The model implements three key non-standard features: parallel residual connections (MLP uses original residual, not attention output), interleaved QKV weight layout (per-head interleaved, not concatenated), and partial RoPE on only 20 of 80 head dimensions (rotary_pct=0.25). Validation achieves 100% token match on deterministic prompts.
Model Information
Model Name: Pythia-2.8B
Model Architecture: Decoder-only transformer (GPTNeoX with parallel residual, interleaved QKV)
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. Three key architectural features validated against HuggingFace reference:
[head0_Q, head0_K, head0_V, head1_Q, ...]— correctly deinterleaved during state dict conversionTest Results:
Multi-Prompt Accuracy:
Compatibility
Tested with:
Additional Information
hidden_states = residual + attn(ln1(x)) + mlp(ln2(residual))— the MLP must use the original residual, not the attention output. Using attention output is a common mistake that causes severe accuracy degradation[head0_Q, head0_K, head0_V, head1_Q, head1_K, head1_V, ...]which is different from the standard concatenated[Q_all, K_all, V_all]layout. Must reshape as(num_heads, 3, head_dim, hidden_size)to deinterleavenn.LayerNormwith bias and eps=1e-5Related Issues
N/A
vLLM Integration
By submitting this PR, I confirm that: