Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Collection of scripts and notebooks for OpenAI's latest GPT OSS models
| Date | Stars |
|---|---|
| 2026-07-31 | 506 |
| 2026-08-02 | 506 |
| 2026-08-03 | 506 |
| 2026-08-05 | 506 |
| 2026-08-06 | 506 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# OpenAI GPT-OSS Recipes

Collection of scripts demonstrating different optimization and fine-tuning techniques for OpenAI's GPT-OSS models (20B and 120B parameters).
**Resources**
- [Blog - Welcome GPT-OSS: the new open-source model family from OpenAI](https://huggingface.co/blog/welcome-openai-gpt-oss)
- [Cookbook - Fine-tuning with GPT-OSS and Hugging Face](https://cookbook.openai.com/articles/gpt-oss/fine-tune-transfomers)
- [OpenAI GPT-OSS 20B model](https://huggingface.co/openai/gpt-oss-20b)
- [OpenAI GPT-OSS 120B model](https://huggingface.co/openai/gpt-oss-120b)
- [Release collection on Hugging Face](https://huggingface.co/collections/openai/gpt-oss-68911959590a1634ba11c7a4)
## Scripts
- `generate_tp.py` - Model with Tensor Parallelism.
- `generate_flash_attention.py` - Model with Flash Attention + Tensor Parallelism.
- `generate_tp_continuous_batching.py` - Model with Flash Attention + Tensor Parallelism and Continuous Batching.
- `generate_all.py` - Model with all optimizations: Expert Parallelism, Tensor Parallelism, Flash Attention.
- `sft.py` - Script for fine-tuning the model using supervised fine-tuning (SFT). Supports both full-parameter training and LoRA training.
### Model Configuration
All generation scripts support both 20B and 120B models. To switch between model sizes, simply edit the `model_path` variable at the top of each script:
```python
# Model configuration - uncomment the model size you want to use
model_path = "openai/gpt-oss-120b" # 120B model (default)
# model_path = "openai/gpt-oss-20b" # 20B model - uncomment this line and comment the line above
```
The scripts automatically configure the appropriate device mapping and settings based on the selected model size.
## Installation
First create a virtual environment using e.g. `uv`:
```sh
uv venv gpt-oss --python 3.11 && source gpt-oss/bin/activate && uv pip install --upgrade pip
```
Next install PyTorch and Triton kernels:
```sh
uv pip install torch==2.8.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu128
```
If your hardware supports the MXFP4 quantization format, you can also install Triton kernels for optimized performance:
```sh
uv pip install git+https://github.com/triton-lang/triton.git@main#subdirectory=python/triton_kernels
```
Finall install the remaining dependencies:
```sh
uv pip install -r requirements.txt
```
## Usage
### Inference
> [!IMPORTANT]
> Before running any script, edit the `model_path` variable to select your desired model size (20B or 120B).
Run a generation script:
```bash
python generate_<script_name>.py
```
or for distributed:
```bash
torchrun --nproc_per_node=x generate_<script_name>.py
```
### Training
For full-parameter training on one node of 8 GPUs, run:
```bash
# Eager attention
accelerate launch --config_file configs/zero3.yaml sft.py --config configs/sft_full.yaml
# FlashAttention3
accelerate launch --config_file configs/zero3.yaml sft.py --config configs/sft_full.yaml --attn_implementation kernels-community/vllm-flash-attn3
```
For LoRA training on one GPU, run:
```bash
python sft.py --config configs/sft_lora.yaml
```
To change the dataset or training hyperparameters, either modify the `sft_lora.yaml` or `sft_full.yaml` files or pass them as command line arguments e.g.:
```bash
accelerate launch --config_file configs/zero3.yaml \
sft.py --config configs/sft_full.yaml \
--dataset_name DATASET_NAME
```
Excerpt of 3,536 characters
Read on GitHubvb · @openai
25
@huggingface · Switzerland
22
Sergio Paniego Blanco · @huggingface · Spain
5
Pedro Cuenca · Spain
3
Quentin Gallouédec · @huggingface · Canada
2
Aritra Roy Gosthipaty · @huggingface · India
1
Mehdi
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:66bfbd45e6f1f92a, llm:Repository description: 'Collection of scripts and notebooks for OpenAI's latest GPT OSS models' (Jupyter Notebook language).
matched fp:66bfbd45e6f1f92a, llm:Repository description: 'Collection of scripts and notebooks for OpenAI's latest GPT OSS models' (Jupyter Notebook language).
matched fp:66bfbd45e6f1f92a, llm:Repository description: 'Collection of scripts and notebooks for OpenAI's latest GPT OSS models' (Jupyter Notebook language).