# Repository Briefing: Imbernoulli/fantastic-ml
> Source: https://repoforai.com/repo/Imbernoulli/fantastic-ml (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Imbernoulli/fantastic-ml
- **Category**: LLMs & Inference (大模型与推理微调)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: B+ (67/100 · Maintenance 35/35 · Adoption 1/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Docker, Self-Hosted, CLI, GPU
- **Momentum**: 31 ★ total (+18 24h / +31 7d) · 0 forks
- **When to Use**: Best for: Research and evaluation teams comparing whether coding agents can turn an open ML problem into a working method that scores against implemented baselines under controlled GPU and time budgets. Use Alchemy to shortlist models before committing to full trials. Skip if: You mainly need serving latency or throughput numbers, a quick CPU-only CI gate, or a single score from a low-cost run.

## Overview
```text
### Architecture & Core Mechanics
FantasticML is a Python benchmark suite built on Harbor 0.25.0, not an inference server. Harbor reads the 48-task inventory from `dataset.toml`. Each task's `instruction.md` defines the research problem and editable files, while `task.toml` records resource requests, time limits, and the digest-pinned agent image. The agent starts with competing methods already implemented and works from the CLI within the task budget, with GPU and network access as configured.

The submitted artifact is algorithm code, not a score reported by the agent. A separate evaluation environment built from `tests/Dockerfile` runs the code across the task's scored settings and writes the reward. GPU tasks have Compose files for both phases to express GPU reservations and `/dev/shm` sizing. The `solution/` directory supplies published reference methods for the `oracle` agent, which can exercise the verifier without calling a model.

### Key Capabilities & Differentiators
The benchmark measures whether an agent can improve an ML research method, not just answer a question about it. Tasks cover topics such as early-exit self-speculative decoding, linear attention, hyperparameter transfer, and few-step diffusion solvers. Their scored settings are intended to test generalization and transfer. Each trial exposes a task-defined reward from 0 to 1 in `verifier/reward.txt` and `result.json`, with agent and verifier logs under `jobs/`. Compare scores within the same task and settings; the shared scale does not establish equivalent difficulty across tasks.

FanML-Alchemy is a lower-cost screening path. It turns experiment logs into 128 questions that ask models to rank unnamed methods by measured outcomes. Each question is presented in both listing orders, with 401 counted method pairs overall. This tests research judgment without a full GPU trial, but does not directly measure whether an agent can implement a working improvement.

### Trade-offs & Limitations
Compared with a QA benchmark, FantasticML measures more of the research workflow: the agent edits code, experiments against existing methods, and hands off a submission for independent scoring. It is not a substitute for an inference load test, which answers questions about serving throughput and latency. The higher-fidelity workflow costs more to operate: `llm-early-exit-criterion` requires two H200s, lists 37 GB of downloads, and allows 6 hours for the agent plus 6.6 hours for evaluation. A slower GPU can turn a hardware difference into a timeout, so hold the hardware and runtime budgets fixed when comparing agents.

The separate verifier reduces dependence on agent-reported outcomes but does not remove the need to enforce the benchmark's no-lookup and no-ready-made-solutions rules, especially because the agent has network access. Self-hosting gives teams control over resource scheduling and credentials; managed Daytona trades that setup for sandbox quotas and GPU availability constraints. The repository uses Apache-2.0, while bundled or referenced third-party assets retain their own licenses.

### Hardware & Deployment Guide
For local Docker, use Linux, Python 3.12+, `harbor==0.25.0`, and Git LFS; GPU tasks also require an NVIDIA driver and the NVIDIA Container Toolkit. Check each task's supported GPU models, CPU and RAM needs, image downloads, and `storage_mb` before scheduling. The documented smoke test is `harbor run -p tasks/fantastic-ml__llm-conditional-memory-design -a oracle`; it needs one H100 but no model API key. A model-backed run needs credentials for the model it calls. Git LFS scene files for `cv-3dgs-densification` can be fetched selectively.

For managed Daytona, the custom `daytona_env:DaytonaGPUEnvironment` handles GPU tasks that Harbor's built-in Daytona backend rejects when a Compose file is present. It starts separate agent and verifier sandboxes in sequence; each needs the task's resource allocation, and `/dev/shm` follows Daytona's sandbox configuration. The self-hosted alternative, `open_daytona.harbor:OpenDaytonaEnvironment`, uses rootless gVisor on Linux with unprivileged user namespaces and does not require a Docker daemon. No tagged release is listed, so pin the checkout alongside the runtime versions for comparisons.
```

## Key Capabilities
```text
- Task interface: Harbor 0.25.0 reads `dataset.toml`; each task defines its edit scope in `instruction.md` and its resources, time limits, and digest-pinned agent image in `task.toml`.
- Verification: The agent submits code, and a separate environment built from `tests/Dockerfile` runs the scored settings and writes a reward from 0 to 1.
- Environment check: The published `llm-conditional-memory-design` oracle self-test uses one H100 and needs no model API call.
- Execution backends: Run on local Docker, managed Daytona through `daytona_env:DaytonaGPUEnvironment`, or rootless open-daytona on Linux with unprivileged user namespaces.
- Cost planning: `cv-flowmaps-training` lists three H100s, 288 GB RAM, and separate 24-hour agent and 26-hour evaluation limits.
- Lightweight screening: FanML-Alchemy uses 128 experiment-derived ranking questions, presented in both listing orders, with 401 counted method pairs.
```

## Quick Start / Clone
```bash
pip install harbor==0.25.0
git lfs install
git clone https://github.com/imbernoulli/fantastic-ml.git
cd fantastic-ml
```
