explaingit

huggingface/ml-intern

9,399PythonAudience · dataComplexity · 3/5LicenseSetup · moderate

TLDR

ML Intern is an open-source command-line AI assistant for machine learning work, give it a task in plain English and it writes and runs the code, with built-in access to Hugging Face models, datasets, and cloud GPU workspaces.

Mindmap

mindmap
  root((ml-intern))
    What it does
      Plain-English ML tasks
      Writes and runs code
    Run modes
      Interactive chat
      Headless single task
      Sandbox GPU mode
    AI backends
      Hugging Face router
      Anthropic Claude
      OpenAI
      Ollama or vLLM
    Features
      Session trace saving
      Slack notifications
      HF ecosystem access
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Tell ML Intern in plain English to fine-tune a language model on your dataset and let it handle writing and running all the code

USE CASE 2

Kick off a GPU-intensive training job in a Hugging Face Spaces sandbox and get a Slack notification when it finishes or needs approval

USE CASE 3

Run batch ML experiments from a shell script using headless mode without any manual intervention

Tech stack

PythonHugging FaceOllamavLLM

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a Hugging Face account and API token, GPU sandbox mode requires Hugging Face Spaces access.

Use freely for any purpose including commercial, as long as you keep the copyright and license notices (Apache 2.0).

In plain English

ML Intern is a command-line tool that acts as an AI assistant specifically for machine learning work. You give it a task in plain English, such as "fine-tune a language model on my dataset," and it figures out the steps, writes code, and executes them. It has built-in access to Hugging Face's ecosystem of tools, including research papers, open datasets, documentation, and cloud computing resources. The tool runs in two modes. Interactive mode opens a chat session where you type requests and the agent responds and takes action. Headless mode lets you pass a single instruction as a command and walk away. You can point it at different AI models to power the reasoning, including models from Anthropic, OpenAI, locally running models via Ollama or vLLM, and various models available through the Hugging Face router. By default, the tool runs code directly on your local machine, reading and writing files in your project folder. If you need GPU resources or want to test code in an isolated environment, you can switch to sandbox mode, which creates a private cloud workspace on Hugging Face Spaces. This is useful for running training jobs that would be too slow or impractical on a laptop. Every session is automatically saved to a private dataset on your Hugging Face account, so you can review what the agent did, what tools it called, and how the model responded. You can make these traces public or keep them private. There is also optional Slack integration that sends you status updates when the agent needs approval or finishes a task, which is handy if you kick off a long job and step away. The project is open source under the Apache 2.0 license and is maintained by the Hugging Face team.

Copy-paste prompts

Prompt 1
Using ml-intern, fine-tune the SmolLM2-135M model on my CSV dataset at ./data/train.csv, show the exact command and any config file I need to set up first
Prompt 2
How do I configure ml-intern to use a locally running Ollama model instead of the default Hugging Face router?
Prompt 3
I want to run ml-intern in sandbox mode so jobs execute on Hugging Face Spaces GPU instead of my laptop, walk me through the setup
Prompt 4
Set up ml-intern Slack integration so it sends me a message when an agent task needs my approval or finishes a long job
Open on GitHub → Explain another repo

← huggingface on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.