Skip to content

[contrib] Add OLMoE-1B-7B-0924 NeuronX port#78

Open
dhwanw wants to merge 3 commits intomainfrom
contrib/OLMoE-1B-7B-0924
Open

[contrib] Add OLMoE-1B-7B-0924 NeuronX port#78
dhwanw wants to merge 3 commits intomainfrom
contrib/OLMoE-1B-7B-0924

Conversation

@dhwanw
Copy link

@dhwanw dhwanw commented Mar 17, 2026

Description

NeuronX Distributed Inference port of allenai/OLMoE-1B-7B-0924, a 7B-parameter Mixture of Experts model with 1B active parameters per token. OLMoE uses 64 experts with top-8 routing, Q/K normalization (RMSNorm applied per-head after Q/K projection), and SwiGLU expert MLPs.

Model Information

Model Name: OLMoE-1B-7B-0924
Model Architecture: Decoder-only Mixture of Experts transformer -- 64 experts with top-8 routing, 16 MHA heads, 16 layers, Q/K RMSNorm, RoPE, SwiGLU MLP experts
Purpose: Text generation with sparse MoE architecture (1B active of 7B total parameters)

Checklist

Required Components

  • Accuracy Test (test/integration/test_model.py)
    • Validates model generation and coherence
    • Performance benchmarks (TTFT, throughput)
    • Test can compile and run the model on Neuron
  • README.md with the following sections:
    • Usage Example: Clear code example showing how to use the model
    • Compatibility Matrix: Table showing tested Neuron SDK versions and instance types
    • Example Checkpoints: Links to compatible model checkpoints
    • Testing Instructions: Command to run the test suite for the model
  • Source Code (src/)
    • Modeling code following NxD Inference patterns

Optional Components

  • Unit Tests (CPU or Neuron-based)

Folder Structure

/contrib/models/OLMoE-1B-7B-0924/
  README.md
  /src
    modeling_olmoe.py
  /test
    /integration
      test_model.py

Testing

Model was compiled and tested with TP=1, batch_size=1, seq_len=128, bfloat16 on trn1.32xlarge.

Test Results:

Test Status Result
Smoke Test ✅ PASS Model loads successfully
Greedy Token Matching ✅ PASS 81.0% average (7/10 prompts at 100%)
Teacher-Forced Match ✅ PASS 98.0% average
Throughput ✅ PASS 2.9 tok/s

Compatibility

Tested with:

  • Neuron SDK Version(s): 2.22
  • Instance Type(s): trn1.32xlarge
  • PyTorch Version: 2.9
  • Python Version: 3.10
  • Configuration: TP=1, batch_size=1, seq_len=128, bfloat16

Additional Information

  • 64 experts with top-8 routing: Uses MoENeuronConfig for compilation. Expert routing is deterministic (softmax + top-k selection).
  • Q/K normalization: Applies RMSNorm to Q and K projections after splitting heads, similar to OLMo and Qwen3 architectures.
  • Standard RoPE: Full rotary embeddings on all 128 head dimensions, standard LLaMA-style half-split convention.
  • Lower throughput expected: 64 experts with top-8 routing results in significant compute per token despite only 1B active parameters.

Related Issues

N/A

vLLM Integration

  • This model/feature is intended for use with vLLM
  • Documentation includes vLLM registration instructions

By submitting this PR, I confirm that:

  • I have read and followed the contributing guidelines
  • This is a community contribution and may have limited testing compared to officially-supported models
  • The code follows best practices and is well-documented
  • All required components listed above are included

dhwanw and others added 3 commits March 9, 2026 17:54
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use consistent CE/TG column table format across all contrib models.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dhwanw dhwanw marked this pull request as ready for review March 19, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant