tpu
БесплатноБез исполняемых скриптовНе проверенRun or debug post-training (SFT) on Ai2's TPU v4 cluster gke-tpu-v4 with MaxText + Tunix. Use before launching, resuming, watching, exporting or deleting…
от allenai★ 3 954 звезды на GitHubОб этом скилле
TPU post-training
The runbook is docs/algorithms/tpu_sft_guide.md; read it before acting. Scripts, overlays and images are in
scripts/tpu/maxtext/, and the cluster's own rules are in allenai/olmo-gcp-infra's README.
Rules an agent follows:
- Queue
post-trainingonly. It has nominal quota for the8x8x8and two4x4x8s, and Kueue never preempts a job running within its own queue's nominal quota; hero and dev reclaim only what we borrow (guide: What the cluster is). Never submit toheroordev, and never hold a slice in a way that delays hero. - Delete nothing on GCS (
gs://ai2-olmo-dev): checkpoints, data and exports belong to the run's owner. Deleting your own failed JobSet object is fine; save its pod logs first. - Read loss from
LOSS-PARTSlines only. Per-podcompleted step … loss:lines differ across pods. Comparece=, never Tunix'sloss. - Resume only on the restore-fix image (
maxtext-posttrain:51f8cc4b-p907d86f3-rfb46e215e), never from step 0. - Use a
4x4x8for the tiny SFT recipe (H045) (guide: What the cluster is). Since 2026-11-03 the cluster is three4x4x8s, one8x8x8and hero's8x8x48. Check the live layout before planning (command in the guide); it changes when the cluster is resliced. - For
ici_context_parallelism> 1, setcontext_parallel_load_balance=Falseand require step-1LOSS-PARTSCE to match an HF forward of the same batch within 1e-3 before training. With load balancing on, dense Olmo 3 7B's CE was off by +0.39 (cp4) and +1.98 (cp8); with it off, cp4 matched (guide: Traps). - Stop a run by deactivating its Kueue workload (
spec.active=false, command in the guide). Suspending the JobSet does nothing while it is admitted. - Pick the mesh from the guide's measured table (Changing the recipe). On the
8x8x8, a short sweep of the parallelism split, batch, vocab tiling and XLA collective flags found only data 8 x fsdp 8 faster for tiny (+8%), and small fits only its one config. Don't set--xla_tpu_enable_async_ragged_all_to_all: it corrupts an MoE router gate's gradient (~1e33) while the forward loss stays normal, every few steps on the8x8x8(guide: Changing the recipe). Run any new slice well past step 20 before trusting it. A new slice or mesh needs an xprof of one TPU step first (in-loop all-gathers cost 140x once), and its own same-slice control. - Stream
REQUIRED_RBFfrom JAX process 0 from step 1 (kubectl logs -fon that pod) when a rule needs every step. Pollingkubectl logsloses steps at kubelet's log rotation, and the agent account cannot read Cloud Logging. Find that pod from the logs at each launch: it is not always the first pod, and it changes between launches. - Give a production JobSet no job deadline, or one at least 1.5x its projected wall time (startup plus steps x mean
seconds per step). An
activeDeadlineSecondskept from a preflight overlay ends the run withDeadlineExceededand no final save. - Regular 20-60 s steps on the streaming loader are its read-ahead, not gcsfuse. Each data host tokenizes in
blocks of 1,000 documents on one reader thread, behind a 128-row buffer (
prefetch_buffer_sizein MaxText'shf_data_processing.py), so the step waits about once per 1,000 documents per host, and more often as hosts drift apart: Small on the8x8x8averaged 7.4 s per step against 4.7 s steady. Raising the buffer to 2,048 rows (MAXTEXT_HF_PREFETCH_ROWS=2048, abhishekraok/maxtext from ef157c29) removed the waits without changing a batch (ledger H267, Amendment 5); prepacked step files avoid them too. - Mount only the folders a job reads, never one that holds checkpoints. gcsfuse's metadata prefetch lists
everything under
only-diron every host at every pod start, so a mount ofpost-training/lists every run's checkpoints each time. Mountpost-training/dataandpost-training/tokenizersseparately at their old paths (k8s/narrow_mounts.py); read and write checkpoints overgs://. Jobs launched with a wide mount keep it until relaunched. - Stagger big-slice launches. Two slices loading at once hit the GCS egress quota.
- Keep one slice shape per experiment. The data order depends on the host count, so arms and their control share a shape.
- Set
CLOUDSDK_CORE_ACCOUNTto the agent service account in every process that calls kubectl or gcloud, background watchers included. The user login lapses daily and kubectl then fails silently. - Kill processes by PID, not
pkill -f, insidebash -c.
When the run answers a research question, the experiment ledger's rules apply too (olmo-post-training-ledger,
ledger and storage skills).
Установить tpu в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tpu?
Run or debug post-training (SFT) on Ai2's TPU v4 cluster gke-tpu-v4 with MaxText + Tunix. Use before launching, resuming, watching, exporting or deleting anything on the TPUs, or when choosing a slice, queue, image or mesh for a TPU run.
Как установить скилл tpu?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tpu запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic