> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server.

# gpt-oss-20b

> Use gpt-oss-20b with NeMo AutoModel for language model fine-tuning, with documented checkpoints, runnable recipes, setup guidance, and model reference details.

[GPT-OSS](https://huggingface.co/openai/gpt-oss-20b) is OpenAI's open-weight model family featuring QuickGELU activations and activation clamping for training stability.

The documented workflows cover full-parameter fine-tuning, LoRA, packed sequences, and a DGX Spark LoRA configuration.

Set up NeMo AutoModel with the [latest container](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/nemo-automodel) or follow the [installation instructions](/get-started/installation).

## Fine-Tune gpt-oss-20b

From the repository root, run:

```bash
uv run automodel --nproc-per-node=8 examples/llm_finetune/gpt_oss/gpt_oss_20b.yaml
```

## Choose a Workflow

| Goal                                          | Start Here                                                                                                                                              |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Full-parameter fine-tuning                    | Use the [full-parameter recipe](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/llm_finetune/gpt_oss/gpt_oss_20b.yaml).                     |
| LoRA fine-tuning                              | Use the [LoRA recipe](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/llm_finetune/gpt_oss/gpt_oss_20b_peft.yaml).                          |
| Fine-tuning with 1,024-token packed sequences | Use the [packed-sequence recipe](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/llm_finetune/gpt_oss/gpt_oss_20b_te_packed_sequence.yaml). |
| LoRA fine-tuning on DGX Spark                 | Use the [DGX Spark recipe](https://github.com/NVIDIA-NeMo/Automodel/blob/main/examples/llm_finetune/gpt_oss/gpt_oss_20b_single_gpu_peft.yaml).          |

## Model Reference

### Model Architecture

| Property                  | Value                                   |
| ------------------------- | --------------------------------------- |
| Task                      | Text Generation                         |
| Architecture              | `GptOssForCausalLM`                     |
| Parameters                | 21B total / 3.6B active                 |
| Hugging Face Organization | [openai](https://huggingface.co/openai) |

### Available Models

| Model       | HF ID                                                             |
| ----------- | ----------------------------------------------------------------- |
| GPT-OSS 20B | [`openai/gpt-oss-20b`](https://huggingface.co/openai/gpt-oss-20b) |

## Related Resources

* [LLM Fine-Tuning Guide](/recipes-e2e-examples/sft-peft)