OpenAI's Codex coding agent can now utilize the Hugging Face Skills repository to handle end-to-end machine learning and AI tasks. By integrating with Hugging Face GPUs and Model Context Protocol servers, Codex can train, evaluate, and monitor models on the Hub. The open-source extension supports production training methods such as supervised fine-tuning and direct preference optimization.
Building on our work to get Claude Code to train open source models, we are now getting Codex to go further. We gave Codex access to the Hugging Face Skills repository, which contains skills for Machine Learning and AI tasks such as training or evaluating models. With HF skills, a coding agent can:
This tutorial dives even deeper and shows you how it works and how to use it yourself. So let's get started.
Codex uses AGENTS.md files to accomplish specialized tasks, whilst Claude Code uses 'Skills'. Fortunately, 'HF-skills' is compatible with both approaches and works with major coding agents like Claude Code, Codex, or Gemini CLI.
This isn't a toy demo. The extension supports the same training methods used in production: supervised fine-tuning, direct preference optimization, and reinforcement learning with verifiable rewards. You can train models from 0.5B to 7B parameters, convert them to GGUF for local deployment, and run multi-stage pipelines that combine different techniques.
This is your chance to adjust anything. Change the output repo name, pick different hardware, or ask Codex to modify training parameters. Once you approve, the job is submitted.
For tiny models under 1B parameters , t4-small works well. These models train quickly—expect $1-2 for a full run. This is perfect for educational or experimental runs.
Codex is OpenAI's AI coding agent included in ChatGPT Plus, Pro, Business, Edu, and Enterprise plans. Codex brings AI assistance directly into your development workflow.
Dataset format and processing is the most common source of training failures and usually a significant amount of work is done in the training script. Codex can validate datasets before the job starts and either define a configuration for TRL or process the dataset separately.
Transformers is great as a standard, and we can easily convert the trained model to GGUF for local deployment. This is because the training skill contains instructions and support scripts to convert models to GGUF.
The model trains on Hugging Face GPUs while you do other things. When it's done, your fine-tuned model appears on the Hub, ready to use.
We explored this single prompt approach in the Claude Code tutorial. However, we can now go further and get OpenAI Codex to do end-to-end Machine Learning experiments. For example, Codex should be able to monitor progress, evaluate the models, and maintain an up to date training report. This will allow engineers to delegate experiments to Codex and review reports in a more hands-off way. It will also allow Codex to make more decisions on its own based on the training report and evaluation results.
The Hugging Face Skills repository includes an AGENTS.md file that Codex automatically detects and uses.
Allowing AI coding agents to autonomously manage the full fine-tuning lifecycle lowers the barrier for developers to train and deploy custom models. This hands-off approach streamlines experimentation and integrates advanced machine learning workflows directly into standard development environments.