Skip to content

Repository files navigation

Yeto

Yeto fine-tunes language and diffusion models across cheap, geographically scattered GPU capacity — spot instances, mixed regions, mixed clouds, even mixed hardware families.

 ┌──────────────────────────────┐
│ syncer (hot path) │
│ fragment ingest · RDA merge │
│ Nesterov outer step · bcast │
└──────┬───────┬───────┬───────┘
│ TCP (binary framing, WAN)
┌───────────────┤ ├───────────────┐
┌──────┴──────┐ ┌─────┴───────┐ ┌────┴────────┐
│ learner 0 │ │ learner 1 │ │ learner 2 │ … one island per --gpu entry
│ us-east-2 │ │ us-east-1 │ │ runpod:CA │ (PyTorch, AdamW inner opt)
└─────────────┘ └─────────────┘ └─────────────┘

Quick start

pip install "yeto[launcher] @ ."# pick the fleet yourself…
yeto launch --gpu aws:8xa100@us-east-2,runpod:8xh100@CA \
--model qwen35-9b --data org/chat-traces
# …or let the planner pick it (budget $/hr and/or a TFLOPs target)
yeto launch --model qwen35-9b --data org/chat-traces --budget 40 --confirm
yeto status | logs <run>| down <run># runs detach; Ctrl-C never kills them
  • --gpu grammar: cloud:[nodes x]<count>x<gpu>[@region], one entry per learner island.
  • Omitting --gpu invokes yeto shape: an exact solver maximizes effective TFLOPs under your budget (or minimizes cost to reach --flops), subject to live spot quotas minus usage, spot placement scores, RunPod stock, and an FSDP memory model of the model. Run yeto shape directly to see the plan, rejected shapes with reasons, and the launch line without launching.
  • --data: HF dataset id, local path (jsonl/json/parquet or save_to_disk dir), or any sky-supported object-store URI — non-HF sources ship to learners via SkyPilot file mounts.
  • --data-format: normalize OpenAI messages, ShareGPT conversations, or Alpaca instruction/input/output rows into the same chat representation before tokenization. The default, auto, detects the schema per row and reports ambiguous or malformed rows with their row number.
  • QLoRA uses --tuning lora --base-quantization nf4 --shard ddp. It stores the frozen base in bitsandbytes NF4 with double quantization and bf16 compute; pass --gpu explicitly while the fleet planner's QLoRA memory model is being calibrated.
  • Existing causal LoRA SFT artifacts can be continued with --resume-from when the recorded model, data, and recipe match, or used as a new lineage with --branch-from. yeto merge --max-shard-size 2GB ... safely folds an adapter into its base and writes deployment-ready SafeTensors shards. See docs/ADAPTER_LIFECYCLE.md.
  • --wandb: stream the fleet to Weights & Biases — one W&B group per run, one run per learner island plus one fed by the syncer's event tape, so per-island staleness, contribution, and quorum/grace timings are curves instead of a log grep. Off by default; see docs/WANDB.md.
  • --output: any sky-supported store URI or hf://org/repo — the head fetches the model from the winning learner, uploads it, and terminates itself (fully self-cleaning run). Local path or omitted: the artifact stays on the head and the head is kept up.
  • --model: any HF id (private repos work with HF_TOKEN), or an alias below.
  • Learners default to spot; the head VM (syncer + fleet controller) is a small on-demand box whose checkpoint/resume absorbs preemptions. The submitting machine can disconnect after launch.

Architecture

Fleets launch via the SkyPilot SDK; asynchronous synchronization is based on Decoupled DiLoCo (Douillard et al., arXiv 2604.21428): the syncer merges parameter fragments from independent learner islands (quorum + adaptive grace, token-weighted RDA, Nesterov outer step), so slow links and preempted islands never block training.

One protocol, one syncer, four learner backends. Every backend speaks the same fragment protocol and runs the same DiLoCo step boundary — the pull/merge/α-blend/push loop lives in one shared module (yeto/diloco_sync.py), so protocol changes land once and apply everywhere.

backendselectorscope
PyTorch (FSDP2/DDP)defaultcausal LM, LoRA/full
Diffusers--model-kind diffusionimage/video LoRA
Megatron-Core--island-backend megatronEP islands for 1T-class MoE
MLX--external-learnersApple-silicon islands

Hardware families are isolated behind yeto/accel.py (CUDA / Ascend NPU policy functions) rather than device.type branches in shared code. The terminal contract — budget cutoff, authoritative final cut, checkpoint marking — is shared by all backends (finalization.py, budget_finalization.py, final_marker.py).

Supported models

Aliases are sugar over yeto/models.py (this table is generated by scripts/gen_model_table.py; a test keeps them in sync). "Min island VRAM" is the frozen-base footprint an island's GPUs must jointly hold (bf16 base, LoRA) — add ~8 GB per GPU for activations/overhead, ×8 for full tuning; "(Hub)" means the size is resolved from safetensors metadata at plan time.

Tested — a completed Yeto fine-tuning run on real hardware:

aliasHugging Face idmin island VRAM (GB)
deepseek4flashdeepseek-ai/DeepSeek-V4-Flash568
qwen3-0.6bQwen/Qwen3-0.6B(Hub)
qwen36-27bQwen/Qwen3.6-27B54
kimi-k3moonshotai/Kimi-K3(Hub)
glm52zai-org/GLM-5.21488
laguna-s-2.1poolside/Laguna-S-2.1(Hub)
All other supported aliases (untested)
aliasHugging Face idmin island VRAM (GB)
gemma4google/gemma-4-12B-it66
qwen3-8bQwen/Qwen3-8B17
qwen35-4bQwen/Qwen3.5-4B8
qwen35-9bQwen/Qwen3.5-9B18
qwen35-9b-baseQwen/Qwen3.5-9B-Base18
qwen35-35b-a3bQwen/Qwen3.5-35B-A3B-Base70
qwen35-397b-a17bQwen/Qwen3.5-397B-A17B794
qwen36-35b-a3bQwen/Qwen3.6-35B-A3B70
llama32-1bmeta-llama/Llama-3.2-1B3
llama32-3bmeta-llama/Llama-3.2-3B7
llama31-8bmeta-llama/Llama-3.1-8B16
llama31-8b-itmeta-llama/Llama-3.1-8B-Instruct16
llama31-70bmeta-llama/Llama-3.1-70B141
llama33-70b-itmeta-llama/Llama-3.3-70B-Instruct141
gptoss-20bopenai/gpt-oss-20b42
gptoss-120bopenai/gpt-oss-120b234
kimi-k2-thinkingmoonshotai/Kimi-K2-Thinking2060
kimi-k25moonshotai/Kimi-K2.52060
kimi-k26moonshotai/Kimi-K2.62060
deepseek31deepseek-ai/DeepSeek-V3.11343
deepseek-r1deepseek-ai/DeepSeek-R11343
deepseek4prodeepseek-ai/DeepSeek-V4-Pro3200
nemotron3-nanonvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF1661
nemotron3-supernvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16240
nemotron3-ultranvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF161100
glm45-airzai-org/GLM-4.5-Air212
glm46zai-org/GLM-4.6714
llama4-scoutmeta-llama/Llama-4-Scout-17B-16E-Instruct218
llama4-maverickmeta-llama/Llama-4-Maverick-17B-128E-Instruct800
qwen3-coder-480bQwen/Qwen3-Coder-480B-A35B-Instruct960
minimax-m2MiniMaxAI/MiniMax-M2460
minimax-m3MiniMaxAI/MiniMax-M3(Hub)
kimi-k27-codemoonshotai/Kimi-K2.7-Code(Hub)
mistral-small3mistralai/Mistral-Small-3.2-24B-Instruct-250648
ornith-9bdeepreinforce-ai/Ornith-1.0-9B19
ornith-31bdeepreinforce-ai/Ornith-1.0-31B62
ornith-35bdeepreinforce-ai/Ornith-1.0-35B70
ornith-397bdeepreinforce-ai/Ornith-1.0-397B794
lfm25-230mLiquidAI/LFM2.5-230M0.5
lfm25-1bLiquidAI/LFM2.5-1.2B-Instruct3
lfm25-8b-a1bLiquidAI/LFM2.5-8B-A1B17
vibethinker-15bWeiboAI/VibeThinker-1.5B3
vibethinker-3bWeiboAI/VibeThinker-3B6
deepseek4flash-bf16RedHatAI/DeepSeek-V4-Flash-BF16568
deepseek31-bf16unsloth/DeepSeek-V3.1-BF161343
deepseek-r1-bf16unsloth/DeepSeek-R1-BF161343
gptoss-20b-bf16axolotl-ai-co/gpt-oss-20b-dequantized42
gptoss-120b-bf16axolotl-ai-co/gpt-oss-120b-dequantized234
kimi-k2-thinking-bf16unsloth/Kimi-K2-Thinking-BF162060
deepseek31-base-bf16unsloth/DeepSeek-V3.1-Base-BF161343
kimi-k2-base-bf16unsloth/Kimi-K2-Base-BF162060

Docs

docs/DESIGN.md — merge math, blending, adaptive grace, delta correction, q4 wire format, snapshots, resilience. docs/PROTOCOL.md — the learner↔syncer wire protocol. docs/PROVENANCE.md — source pinning, attestation, and artifact provenance. docs/ADAPTER_LIFECYCLE.md — strict causal LoRA SFT resume, intentional branching, safe base-model merge, and export sharding. docs/DIFFUSION.md — the generic Diffusers image/video backend, data and conditioning contracts, external adapters, export, sampling, validation, and current limitations. docs/MEGATRON.md — the Megatron-Core island backend (EP for 1T-class MoE; runs inside the NGC NeMo container). docs/MLX.md — the Apple-silicon island backend: Macs as learner islands (yeto launch --external-learners, cross Mac↔NVIDIA runs). docs/ASCEND.md — Ascend NPU islands: the accelerator abstraction, the refused CUDA-only paths, and running a pure-Ascend fleet. docs/A100_KERNELS.md — opt-in causal attention/model kernels, correctness gates, pinned dependencies, and the standalone 8xA100 throughput and memory benchmark. docs/LM_BENCHMARK.md — standalone equal-hardware causal-LM benchmark contract, workload controls, complete arm and metric tables, and reproducibility rules. docs/DIFFUSION_BENCHMARK.md — standalone equal-hardware diffusion benchmark contract, media controls, complete arm and metric tables, and reproducibility rules. docs/BENCHMARK_RESULTS.md — aggregate and per-seed results for the completed Qwen3.6, LTX-Video, and Wan2.2 benchmarks. docs/MILES_RL.md — fixed-roster Miles RL across causal-LM LoRA islands: rollout/training boundaries, recovery, export, and limitations. docs/CYBERGYM_RL.md — experimental local PPO and the CyberGym reward integration used for real environment evaluation. docs/RL_BENCHMARK.md — equal-hardware native Miles, single-island Yeto, and federated Yeto RL benchmark contract and runner. docs/RL_SSH_ACCEPTANCE.md — direct existing-host deployment, failure injection, artifact collection, and f32 AVG verification. docs/WANDB.md — opt-in W&B telemetry: the group/run topology for a fleet, the metric tables, the debugging map, and the failure policy.

Testing and CI

python3 -m pytest tests/ # includes a real syncer+learner loop
(cd syncer && cargo test)

CI runs three jobs on every PR and push to main: the Rust syncer suite, the Python suite on CPU, and a GPU smoke test on a self-hosted runner ([self-hosted, gpu] labels) — the real syncer plus two real learners training SmolLM2-135M on CUDA, with event-tape assertions that every outer step merged pushed deltas from both learners.

Four heavier harnesses (all support --dry-run):

# smoke every supported model with the auto fleet planner, tiered by
# size; sequential, self-cleaning, writes a pass/fail report
python scripts/smoke_models.py --tier small --dry-run
# causal-LM quality check against equal-hardware synchronous baselines
python scripts/compare_diloco.py --data <chat.jsonl> --settings all --dry-run
# Miles RL quality check: native, one Yeto island, and federated Yeto
python scripts/benchmark_rl.py <model/data/reward arguments> --dry-run
# diffusion quality check with an explicit, fixed media shape
python scripts/benchmark_diffusion_diloco.py \
--model Lightricks/LTX-Video --data <media-dataset> \
--height 512 --width 512 --settings all --dry-run

About

Fast and Efficient LLM Finetuning with Heterogeneous GPUs on Any Cloud

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages