To use the scripts in the gpt-oss-recipes repository, you first need to complete the following installation and setup steps:
- clone warehouse: Run it in the terminal
git clone https://github.com/huggingface/gpt-oss-recipes.git
, and then enter the repository directory. - Creating a Virtual Environment: Recommended to use Python 3.11 and
uv
tool to create a virtual environment with the commanduv venv gpt-oss --python 3.11
and activated. - Installation of dependencies: Run
uv pip install
command installs the necessary packages such as PyTorch, Transformers, etc. - Optional installation of Triton kernel: If the hardware supports MXFP4 quantization (e.g. H100 or RTX 50xx), the Triton kernel can be installed to optimize performance.
These steps ensure environmental compatibility and functionality suitable for subsequent model inference and fine-tuning operations.
This answer comes from the articleCollection of scripts and tutorials for fine-tuning OpenAI GPT OSS modelsThe