Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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-training only. It has nominal quota for the 8x8x8 and two 4x4x8s, 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 to hero or dev, 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-PARTS lines only. Per-pod completed step … loss: lines differ across pods. Compare ce=, never Tunix's loss.
  • Resume only on the restore-fix image (maxtext-posttrain:51f8cc4b-p907d86f3-rfb46e215e), never from step 0.
  • Use a 4x4x8 for the tiny SFT recipe (H045) (guide: What the cluster is). Since 2026-11-03 the cluster is three 4x4x8s, one 8x8x8 and hero's 8x8x48. Check the live layout before planning (command in the guide); it changes when the cluster is resliced.
  • For ici_context_parallelism > 1, set context_parallel_load_balance=False and require step-1 LOSS-PARTS CE 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 the 8x8x8 (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_RBF from JAX process 0 from step 1 (kubectl logs -f on that pod) when a rule needs every step. Polling kubectl logs loses 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 activeDeadlineSeconds kept from a preflight overlay ends the run with DeadlineExceeded and 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_size in MaxText's hf_data_processing.py), so the step waits about once per 1,000 documents per host, and more often as hosts drift apart: Small on the 8x8x8 averaged 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-dir on every host at every pod start, so a mount of post-training/ lists every run's checkpoints each time. Mount post-training/data and post-training/tokenizers separately at their old paths (k8s/narrow_mounts.py); read and write checkpoints over gs://. 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_ACCOUNT to 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, inside bash -c.

When the run answers a research question, the experiment ledger's rules apply too (olmo-post-training-ledger, ledger and storage skills).

Полный SKILL.md на GitHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить tpu с