What problem does it solve?
ml-intern is an open-source AI agent that autonomously researches, writes, and ships ML related code using the HuggingFace ecosystem to conduct post-training experiments, literature review, dataset discovery, training scripts, and iterative evaluation. It enables automated Cortex Gemma-4-e4b fine-tuning, ablation studies, and hyperparameter sweeps without writing a bespoke harness.
Core Features & Use Cases
- Single-agent loop with a max 300 iterations, ToolRouter covering HF docs/papers/datasets/repos and GitHub search, sandbox execution, MCP server tools
- ContextManager with auto-compaction at 170k tokens
- Doom-loop detector to inject corrective prompts on repeated patterns
- Provider-agnostic backends via litellm
- Outputs: final session uploaded to HF Hub with trace, trained artifacts, and model cards
- Use cases: Cortex fine-tunes, overnight ablations, literature synthesis, and dataset discovery
Quick Start
Run ml-intern to start an autonomous post-training experiment workflow.