Open
Conversation
- Google Gemma 2 9B with GQA (16 heads, 8 KV heads), head_dim=256 - 42 decoder layers, RMSNorm, GELU tanh, tied embeddings - Final logit softcapping (30.0) - Custom Gemma2NeuronConfig for model-specific settings - Validated: 99.38% teacher-forced / 84.69% greedy (TP=8, seq_len=128, bf16) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
47.1 tok/s, CE MBU=1.3%/MFU=0.6%, TG MBU=2.3%/MFU=0.0% Profiled on trn1.32xlarge, TP=8, seq_len=128, BF16. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove redundant config overrides (sliding_window, attn_logit_softcapping already force-set in add_derived_config), simplify overly defensive exception handling in test helper, extract duplicate compilation logic into compile_if_needed(), and remove unused GenerationConfig import. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Adds NeuronX port of Gemma 2 9B (model_type=gemma2) to the contrib models collection.
Model Information
Checklist
Folder Structure
Testing
Note: Uses custom
Gemma2NeuronConfigwithattn_cls=NeuronGemma2Attention. Attention logit softcapping disabled (NKI kernel limitation). Sliding window disabled (head_dim=256 exceeds NKI limit of 128). Final logit softcapping (30.0) omitted from forward pass since tanh is monotonic and doesn't affect greedy argmax.Compatibility
🤖 Generated with Claude Code