--- language: - en license: cc-by-4.0 size_categories: - n<1K pretty_name: XStack task_categories: - other tags: - code - agents - jax - pytorch - tpu - repository-migration - benchmark - agent-traces - trajectories configs: - config_name: default default: true data_files: - split: test path: data/test.parquet - config_name: traces data_files: - split: cells path: traces/cells.parquet ---

XStack: A Benchmark for ML Repo Migration

Linrong Cai, Taiming Lu, Haozhe Chen, Zhuang Liu

Princeton University

📄 Paper  |  💻 Code  |  📊 Agent traces

The agent gets the PyTorch source, a TPU machine and the prompt and hands in a JAX repository; a fresh machine grades it against the source's published result, two judges read the transcript, and a failed blind turn gets one frozen phase-2 turn.

XStack asks a coding agent to migrate a whole machine-learning repository from PyTorch to JAX and make it work at the source's own scale. Each of the 20 tasks is a real repository at a pinned commit. The agent gets the source, a bare TPU machine and one prompt, and is never told the metric, the bar or the dataset. A fresh machine runs the migration at full scale and compares its headline number with the source's published result, two judges read the transcript, and the exported weights must load into the source model. A failed blind turn gets one more turn with the code frozen and the recipe stated.

Pass rate per agent over the 20 repositories. Claude Opus 5 passes 75%, GPT-5.6-sol 45%, every other agent at most 40%.

Seven agents on the 20 tasks: Claude Opus 5 passes 75%, GPT-5.6-sol 45%, every other agent at most 40%. Every run is in this dataset. ## What is here ```text data/test.parquet the 20 tasks: source, pinned commit, prompt, phase-2 message, hidden criteria migrations/.tar.gz the seven agents' hand-ins for one task, one folder per model, with a manifest traces/cells.parquet one row per run: model, task, verdicts, weight-load check, failure class, tokens, cost traces/cells//_/_e2e/ prompt.txt, phase2.txt what the agent was told trajectory.jsonl the full transcript, both turns migration_final.tar.gz the hand-in: code and text files only grade/ the metrics file and the log tail of each graded turn judges/, readers/ the correctness and cheat judges' answers (three runs each), the failure judge's answer meta.json, turns.jsonl the cell's record and the verdict of each turn ``` `data/test.parquet` is the default config (split `test`); `traces/cells.parquet` is the `traces` config (split `cells`); both also exist as `test.jsonl` and `cells.csv`. The traces are about 2 GB in 2,800 files. Transcripts are the Codex CLI rollout for the Codex agents and the Claude Code stream-json trace for the others. Credential values, token-shaped strings, IP addresses and our cluster's names and paths are replaced by placeholders such as `` and ``; nothing else was edited. ## Load ```python from datasets import load_dataset from huggingface_hub import hf_hub_download, snapshot_download repo = "zlab-princeton/XStack" tasks = load_dataset(repo, split="test") # 20 tasks cells = load_dataset(repo, "traces", split="cells") # 140 runs cell = next(c for c in cells if c["model"] == "claude-opus-5" and c["repo"] == "nanogpt") snapshot_download(repo, repo_type="dataset", allow_patterns=f"traces/cells/{cell['cell_id']}/*") # one run hf_hub_download(repo, "migrations/nanogpt.tar.gz", repo_type="dataset") # one task's seven hand-ins ``` To run an agent on a task, give it `prompt`, the repository at `source_commit` and a TPU machine it sets up itself. Keep `criteria` and `phase2` out of its reach; `phase2` is sent only after a failed blind turn. The [harness](https://github.com/zlab-princeton/XStack) does this and grades the result. ## Tasks | task | domain | source | |---|---|---| | `mingpt` | language modeling | [minGPT @ 37baab7](https://github.com/karpathy/minGPT/tree/37baab71b9abea1b76ab957409a1cc2fbfba8a26) | | `makemore` | language modeling | [makemore @ 988aa59](https://github.com/karpathy/makemore/tree/988aa59e4d8fefa526d06f3b453ad116258398d4) | | `lora` | fine-tuning | [LoRA @ c4593f0](https://github.com/microsoft/LoRA/tree/c4593f060e6a368d7bb5af5273b8e42810cdef90) | | `ast` | audio classification | [AST @ 31088be](https://github.com/YuanGongND/ast/tree/31088be8a3f6ef96416145c4b8d43c81f99eba7a) | | `x_transformers` | language modeling | [x-transformers @ dfd829b](https://github.com/lucidrains/x-transformers/tree/dfd829b8c1e291ad03c95f509fc874d55f3da40d) | | `llama2c` | language modeling | [llama2.c @ 350e04f](https://github.com/karpathy/llama2.c/tree/350e04fe35433e6d2941dce5a1f53308f87058eb) | | `modded_nanogpt` | language modeling | [modded-nanoGPT @ 1b51e26](https://github.com/KellerJordan/modded-nanogpt/tree/1b51e26d304f647c7c12201b3f1513ee5a429ec4) | | `airbench` | image classification | [airbench @ 4c1b6d1](https://github.com/KellerJordan/cifar10-airbench/tree/4c1b6d1e3889b037efadcfd5c0ea65b246592362) | | `simcse` | sentence embeddings | [SimCSE @ 49fa580](https://github.com/princeton-nlp/SimCSE/tree/49fa580a853752ede55b8c76d9debf748e214d3f) | | `generative_recommenders` | recommendation | [HSTU @ fb0ba64](https://github.com/meta-recsys/generative-recommenders/tree/fb0ba644be8dd1c7b072199c9c8bc6ce3adaf3d8) | | `s4` | long-sequence modeling | [S4 @ e757cef](https://github.com/state-spaces/s4/tree/e757cef57d89e448c413de7325ed5601aceaac13) | | `tdmpc2` | reinforcement learning | [TD-MPC2 @ e9f5932](https://github.com/nicklashansen/tdmpc2/tree/e9f59321933cbc8e11a002b842adc7d4ffae8ff1) | | `nanochat_core` | language modeling | [nanochat @ dc54a1a](https://github.com/karpathy/nanochat/tree/dc54a1a3077cab11d68fac4c5d1cd5c51f5d8c7a) | | `tensorf` | neural fields | [TensoRF @ 6a1e23b](https://github.com/apchenstu/TensoRF/tree/6a1e23b10b9521221049aec843ab370a747a7982) | | `nanogpt` | language modeling | [nanoGPT @ 3adf61e](https://github.com/karpathy/nanoGPT/tree/3adf61e154c3fe3fca428ad6bc3818b27a3b8291) | | `nanovlm` | vision-language | [nanoVLM @ 6ba9082](https://github.com/huggingface/nanoVLM/tree/6ba9082e16f1fc8c21a1f8d0c54b26c9233c8771) | | `deepspeech` | speech recognition | [deepspeech @ b88a631](https://github.com/SeanNaren/deepspeech.pytorch/tree/b88a631ef6b96553e16bbaa5bd6a621435bed278) | | `tgn` | temporal graph learning | [TGN @ d55bbe6](https://github.com/twitter-research/tgn/tree/d55bbe678acabb9fc3879c408fd1f2e15919667c) | | `patchtst` | time-series forecasting | [PatchTST @ 204c21e](https://github.com/yuqinie98/PatchTST/tree/204c21efe0b39603ad6e2ca640ef5896646ab1a9) | | `tabr` | tabular learning | [TabR @ 17baa90](https://github.com/yandex-research/tabular-dl-tabr/tree/17baa9082506f8e7a0f8d11bb1e08212926a1507) | ## Fields of a task | Field | Meaning | |---|---| | `task_id`, `name`, `domain` | The task, its display name and what the repository does | | `source_repo`, `source_commit`, `source_at_commit`, `source_license`, `source_drop`, `source_tree_sha256` | The repository, the pinned commit and a link to it, its license, the paths not vendored, and a hash of the file list | | `prompt`, `contract_lines`, `phase2` | The phase-1 prompt and its task-specific lines, and the phase-2 message, all verbatim | | `pipeline`, `graded_quantity`, `bar`, `bar_cmp`, `bar_value`, `bar_value_2`, `bar_kind` | What is graded, the bar (`at least` or `at most` a value, or a band) and where it comes from | | `dataset`, `seed`, `grade_cmd`, `expected_grade_wall_h`, `criteria` | What the grading machine runs, how long it takes, and the hidden criteria in full | ## License [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). The repositories the tasks point to keep their own licenses (`source_license`). The migrations and traces are model output written against those repositories; the sources are not included. ## Citation ```bibtex @article{cai2026xstack, title = {XStack: A Benchmark for ML Repo Migration}, author = {Cai, Linrong and Lu, Taiming and Chen, Haozhe and Liu, Zhuang}, year = {2026} } ```