InternLM Releases Sage Evolve 1.0, an Open-Source Automated Post-Training Framework
InternLM has released Sage Evolve 1.0, which uses agents to automatically perform diagnosis, planning, data construction, training, and evaluation, creating a post-training research loop that continuously improves models. The framework supports four Agent CLIs and five open-source training frameworks, and covers 13 text benchmarks in 35B post-training; experimental states, hypotheses, and results can be persisted and distilled into reusable skills.
Why read this
SelectedAI score 64
It connects diagnosis, data construction, training, and evaluation into a recoverable automated loop, providing a clear engineering framework for reproducing agent-driven post-training experiments.
Topics
Body · AI translation
BranchesTagsOpen more actions menu
NameNameLast commit messageLast commit date
CONTRIBUTING.mdCONTRIBUTING.md
pyproject.tomlpyproject.toml
Repository files navigation Sage Evolve
An automated post-training loop where agents run diagnosis → planning → data construction → training → evaluation to improve models, evaluation suites, and research skills across iterations.
Interactive demos and 35B benchmark results: sage-evolve.github.io
Overview
Sage Evolve 1.0 turns post-training into an automated research loop driven by black-box dynamic observation. Given a target capability, research agents diagnose failure modes, propose a controlled experiment, ingest and validate training data, run training on open-source trainers, and evaluate the resulting checkpoint.
Dual-loop co-evolution: Fixed benchmarks give a stable baseline, while Sage Atlas maintains a dynamic capability matrix to surface new weak spots. Once gains flatten on the current set, the observation loop expands coverage and raises difficulty. Test sets stay isolated from training; agents only see black-box evaluation feedback.
Persistent memory and skills: Hypotheses, experiment trees, outcomes, and operational fixes are written to disk after each round and periodically distilled back into reusable skills.
35B-scale results: Tested on 35B post-training across 13 text benchmarks (long-context understanding, multi-document reasoning, instruction following, coding, translation, and writing). See the Project Page for full numbers and interactive traces.
In code, orchestration is kept separate from domain scripts:
Component Location Responsibility
Engine src/core, src/execution (sage-evolve) 7-stage pipeline, state.json persistence, resume, and artifact checks
Harnesses src/harness Adapters for claude_code, codex, opencode, and deepseek
Skills skills/ /SKILL.md (10 skills) Data ingestion, JSONL validation, training launch, evaluation, planning, and experiment memory
Backends oss-sft-runner, oss-eval-runner Wrappers for 5 training frameworks (xtuner, verl, slime, miles, areal) and self-eval
2026-12: Unified all 5 open-source training frameworks (xtuner, verl, slime, miles, areal) under skills/oss-sft-runner.
2026-11: Added support for 4 Agent CLIs (Claude Code, Codex, OpenCode, DeepSeek Harness) and an optional LLM Supervisor.
Features
Black-box dynamic observation: Evolves models purely from black-box evaluation signals, dynamically expanding coverage and difficulty while isolating test sets from training.
Closed-loop experiment tree: Automates multi-round diagnosis → planning → data → training → evaluation, tracking single-variable hypotheses and parent-child lineage.
Memory & skill evolution: Persists experiment outcomes and failure diagnoses across rounds, distilling verified strategies into reusable skills.
Multi-harness & multi-trainer: Runs the same evolution loop across 4 Agent CLIs (Claude Code, Codex, OpenCode, DeepSeek) and 5 open-source training frameworks (XTuner, verl, slime, miles, AReaL).
Examples
Textbook navigation & knowledge application
Navigates a multi-chapter textbook on demand, looks up relevant theorems, and puts together a complete proof.
Cross-document integration & reasoning
Cross-checks conflicting claims across 22 long documents, verifying scope and separating enacted rules from proposals.
Iterative self-evolution trajectory
Tracks multi-round experiment trees from the V00 baseline (44.00%), recording verified gains, unsupported hypotheses, observation updates, and distilled skills.
Supported Backends
Training Frameworks
Supports 5 open-source training frameworks via inputs.training.framework (xtuner, verl, slime, miles, areal). See docs/training-frameworks.md for environment setup and upstream repositories.
xtuner (default) ✅ InternLM/xtuner torchrun framework_root (or xtuner_path) campaign.example.json
verl ✅ verl-project/verl torchrun framework_root campaign.verl.example.json
slime ✅ THUDM/slime + Megatron-LM in-run Ray + Megatron framework_root, megatron_root, model_args_file, torch_dist_root campaign.slime.example.json
miles ✅ radixark/miles + Megatron-LM in-run Ray + Megatron framework_root, megatron_root, model_args_file, torch_dist_root campaign.miles.example.json
areal ✅ areal-project/AReaL AREAL_SPMD_MODE=1 torchrun framework_root campaign.areal.example.json
Agent CLIs
Supports 4 Agent CLIs via harness (claude_code, codex, opencode, deepseek). See src/harness/ and examples/README.md for full configuration options.
codex (default) ✅ codex Native schema output, sandbox & auto-approve src/harness/codex.py
claude_code ✅ claude Permission modes, custom base_url & per-stage overrides src/harness/claude_code.py
opencode ✅ opencode provider/model, --auto, final_output.json validation src/harness/opencode.py
deepseek ✅ dsh --profile / --patch (Node >= 24.9.0), final_output.json validation src/harness/deepseek.py
Quick Start
1. Install
Requires Python >= 3.11 and at least one supported Agent CLI (claude, codex, opencode, or dsh) in PATH. The engine under src/ uses only the Python standard library.
pip install -e . sage-evolve --help
You can also run python3 -m src from the repo root without installing. If you use public dataset ingestion, install its optional dependencies with pip install -r skills/new-data-public-ingestion/requirements-data-pipeline.txt.
2. Write a campaign config
Copy a framework template into experiments/ (so the relative skills_root: "../skills" resolves cleanly) and fill in your local paths. Full schema: examples/README.md.
mkdir -p experiments # Default template is xtuner; see also campaign.{verl,slime,miles,areal}.example.json cp examples/campaign.example.json experiments/campaign.json $EDITOR experiments/campaign.json
# Keep credentials in env vars or gitignored local files, never in campaign JSON export HF_TOKEN= # optional, for HF downloads cp skills/oss-eval-runner/configs/secrets.json.example \ skills/oss-eval-runner/configs/secrets.json # optional, for self-eval
3. Run the pipeline
sage-evolve run --config experiments/campaign.json # single iteration sage-evolve run --config experiments/campaign.json --auto-advance --max-iterations 5 # multiple iterations
Or run it from an interactive claude / codex / opencode / dsh session: "Run the Sage Evolve pipeline with config /abs/path/to/experiments/campaign.json".
4. Status, resume, and expert interrupts
sage-evolve status --config experiments/campaign.json sage-evolve expert-note --config experiments/campaign.json --message "Focus next round on multi-doc reasoning."
Progress is persisted in /state.json; re-run sage-evolve run (with --watch, --retry-blocked, or --retry-failed) to resume. See docs/startup-guide.md for the full walkthrough.
Repository Layout
src/ Orchestration engine (core / harness / execution / monitoring / interaction) skills/ 10 modular skills (SKILL.md + scripts/ + references/) examples/ Campaign templates for all 5 training frameworks, schema docs, and stage reference script/ Stage gate and preflight helpers docs/ Bilingual startup guide, training framework setup guides, and figures
Documentation
Topic Doc Notes
Startup guide docs/startup-guide.md Setup, config, running, and recovery (Simplified Chinese)
Training frameworks docs/training-frameworks.md Environment setup & upstream repos for all 5 trainers (Simplified Chinese)
Config schema examples/README.md Campaign JSON fields and validation rules (Simplified Chinese)
Contributing & License
Pull requests are welcome — see CONTRIBUTING.md. Released under the Apache License 2.0; upstream frameworks, base models, and datasets follow their own licenses.
Citation
@misc{sageevolve, author = {{InternLM}}, title = {{Sage Evolve: A Self-Evolving Post-Training Framework Driven by Blackbox Dynamic Observation}}, version = {0.1.0}, year = {2026}, url = {https://sage-evolve.github.io/} }
AboutNo description, website, or topics provided.
ResourcesReadmeLicense
ContributingContributingActivityCustom properties
Stars0 stars
Watchers0 watching
Forks0 forksReport repository
AI Trends