Skip to content

Add openai-gpt (GPT-1) contrib model port#87

Open
dhwanw wants to merge 3 commits intomainfrom
contrib/openai-gpt
Open

Add openai-gpt (GPT-1) contrib model port#87
dhwanw wants to merge 3 commits intomainfrom
contrib/openai-gpt

Conversation

@dhwanw
Copy link

@dhwanw dhwanw commented Mar 18, 2026

Description

Adds NeuronX port of OpenAI GPT-1 (117M) to the contrib models collection.

Model Information

Field Value
Model openai-community/openai-gpt
Architecture Decoder-only transformer (GPT-1)
Parameters 117M
TP Degree 1
Precision BF16

Checklist

  • Model compiles successfully on Neuron
  • Token matching validated (100% match, 200/200 tokens)
  • Performance profiled (449.3 tok/s)
  • README with architecture details, usage, validation results
  • Integration tests included

Folder Structure

contrib/models/openai-gpt/
├── README.md
├── src/
│   ├── __init__.py
│   └── modeling_openai_gpt.py
└── test/
    └── integration/
        └── test_model.py

Testing

  • Token Match: 100.0% (200/200 tokens, 10 prompts)
  • Throughput: 449.3 tok/s (TP=1, BS=1, seq_len=128)

Compatibility

  • Neuron SDK: 2.22+
  • Instance: trn1.32xlarge

🤖 Generated with Claude Code

dhwanw and others added 3 commits March 16, 2026 21:11
Validated with 100% token match (200/200 tokens across 10 prompts).
Performance: 437.4 tokens/sec on trn1 with TP=1, seq_len=128, bf16.

Key architecture: post-norm transformer, Conv1D weights, no final LayerNorm,
fused QKV attention, standard GELU activation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Not needed — validation instructions are in README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dhwanw dhwanw marked this pull request as ready for review March 19, 2026 22:14
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