Skip to content

Comments

Add multihost inference support for TPU#2759

Draft
ahmeda14960 wants to merge 1 commit intomainfrom
multihost-inference
Draft

Add multihost inference support for TPU#2759
ahmeda14960 wants to merge 1 commit intomainfrom
multihost-inference

Conversation

@ahmeda14960
Copy link
Contributor

@ahmeda14960 ahmeda14960 commented Feb 12, 2026

The main document to look at is lib/levanter/CODEX_REFACTOR_KV.md this is where I had codex write high level plans I would approve.

it would then write more details and logging to lib/levanter/CODEX_INFERNCE_MXX.md where MXX is milestone M1 M2 etc. Seems to work!

sample command:

python infra/launch.py
--tpu_name
--tpu_type v5p-32
--node_count 4
--zone us-central1-a
-- python -m levanter.main.sample_lm_multihost
--config_path lib/levanter/config/sampler/sample_llama8b_multihost_real_128prompts_2048_m10_hostdp_wandb_v5p32.yaml

Brings over the multihost inference work from fix/simpo-multihost-inference,
excluding all SimPO/preference dataset changes.

Core changes:
- Inference engine overhaul: page-based KV cache, multi-round generation,
  DCN axis handling, sync barriers
- JIT scheduler for paged attention with page allocation
- Multihost sampling entrypoint (sample_lm_multihost.py) with per-round
  reset, host-level data parallelism, prompt sharding, WandB logging
- Attention layer changes for paged KV cache and TPU RPA support
- KV cache restructuring for physical page management across hosts
- 180 sampler config YAMLs organized by milestone (m2-m11)
- Tests for engine, scheduler, page table, KV cache, and multihost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant