maxtext
AGENTS.md2.5k starsChanged 4 days agoApache-2.0View on GitHub
Shared engineering, JAX/sharding, and testing invariants for authoring and reviewing MaxText changes. * Single Canonical Path: Reuse established MaxText layers, sharding helpers (maybe_shard_with_logical, sharding.constrain), remat tags (checkpoint_name), and logging (max_logging) instead of adding duplicate utilities or hardcoded tunables. Fix issues at the owning layer (config validation, input pipeline, sharding rules, or shared layer) rather than patching callers, and update callers directly when refactoring instead of leaving single-use wrappers or pass-through shims. (Exception: under src/maxtext/m3/models/, each model family intentionally defines self-contained…
Trending
Less talk lately.about the whole repository
Who's talking about AI-Hypercomputer/maxtext
- ROCm/jax-titan“General Adapters”GitHub · Nov 19, 2026 · 1 reactions
- google/tunix“Let the dist_rl rollout node load MaxText checkpoints without weight sync”GitHub · Nov 19, 2026 · 1 reactions
- google/tunix“Stacked on #2979 (`uwlei/rl-4600-final-tunix` @ `54f488d8`); **retarget base branch to `atwigg/mlperf` once …”GitHub · Oct 21, 2026 · 1 reactions
- google/tunix“[MLPerf RL 397B]Supersedes #2884, #2948, #2913, and #2940 onto `atwigg/mlperf`.”GitHub · Oct 21, 2026 · 1 reactions
- AI-Hypercomputer/tpu-recipes“Add recipe for training Maxtext Qwen3.5-35B-A3B with v6e-256 #recipebot”GitHub · Oct 20, 2026 · 1 reactions
The biggest 5 of 50 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 50
Talked about on GitHub (50 times).
On GitHub · 50
- Nov 19, 2026General Adapters — ROCm/jax-titan1 reaction · 2 comments
- Nov 19, 2026Let the dist_rl rollout node load MaxText checkpoints without weight sync — google/tunix1 reaction · 1 comment
- Oct 21, 2026Stacked on #2979 (`uwlei/rl-4600-final-tunix` @ `54f488d8`); **retarget base branch to `atwigg/mlperf` once #2979 merges**. — google/tunix1 reaction · 2 comments
- Oct 21, 2026[MLPerf RL 397B]Supersedes #2884, #2948, #2913, and #2940 onto `atwigg/mlperf`. — google/tunix1 reaction · 2 comments
- Oct 20, 2026Add recipe for training Maxtext Qwen3.5-35B-A3B with v6e-256 #recipebot — AI-Hypercomputer/tpu-recipes1 reaction
45 more on GitHub
- Oct 15, 2026orchestrator: compact routed_experts wire packing with uint10/uint8 encoding and unrouted-token stripping — google/tunix1 reaction · 1 comment
- Oct 6, 2026feat(maxtext): bump commit pin for RBF overflow logging — google/tunix1 reaction · 1 comment
- Sep 30, 2026Add ROLLOUT_FP8 / TRAINER_FP8 switches for FP8 MoE in all recipe launchers — google/tunix1 reaction · 1 comment
- Sep 30, 2026feat(recipes): add FP8_MOE environment variable directly to mlperf recipes — google/tunix1 reaction · 1 comment
- Sep 19, 2026Migrate Llama 3.1 8B on Trillium (v6e-8) to Cluster Toolkit — AI-Hypercomputer/tpu-recipes1 reaction
- Oct 25, 2025Feature Enhancement: Add Advanced Post-Training and Fine-Tuning Capabilities to Simply — google-deepmind/simply1 reaction
- Dec 2, 2026With `weight_sync_config.mode: none` (evaluation), a MaxText vLLM rollout had no way to load real weights because config resolution required Raiden weight sync. Add checkpoint loading support for both unscanned and scanned MaxText checkpoints on the stock `dist_rl` rollout node, plus opt-in Pathways — google/tunix0 reactions · 1 comment
- Oct 30, 2026[AutoPGLE] Let the host run ahead and enqueue work — jax-ml/jax0 reactions
- Oct 20, 2026Migrate MaxText E2E checkpoint conversion (to-mt and to-hf) to CPU cluster — GoogleCloudPlatform/ml-auto-solutions0 reactions
- Oct 19, 2026Layer streaming: measure saving the attention projections instead of recomputing the whole layer — MakazhanAlpamys/Soup0 reactions · 3 comments
- Oct 16, 2026Migrate MaxText E2E checkpoint conversion (to-mt and to-hf) to CPU cluster — CIeNET-International/ml-auto-solutions-30 reactions · 1 comment
- Oct 14, 2026update maxtext pin — google/tunix0 reactions · 1 comment
- Oct 13, 2026recipes: opt-in Raiden trainer knobs for the pathways-worker and trainer client — google/tunix0 reactions · 2 comments
- Oct 12, 2026Documentation Link Check Failed - 2026-10-12 — gitrajav/maxtext0 reactions
- Oct 10, 2026recipes: add USE_BATCHED_RPA_LONG_CTX_KERNEL switch (default true) -> attention=vllm_batched_rpa_long_ctx — google/tunix0 reactions · 2 comments
- Oct 8, 2026feat(multipod): Add DAG `maxtext_distillation` with Cluster Toolkit — GoogleCloudPlatform/ml-auto-solutions0 reactions
- Oct 7, 2026feat(multipod): Add DAG `maxtext_distillation` with Cluster Toolkit — CIeNET-International/ml-auto-solutions-30 reactions · 1 comment
- Oct 7, 2026 feat(multipod): add `maxtext_distillation` DAG with Cluster Toolkit — GoogleCloudPlatform/ml-auto-solutions0 reactions
- Oct 5, 2026Documentation Link Check Failed - 2026-10-05 — gitrajav/maxtext0 reactions
- Oct 3, 2026[Add] MaxText (AI-Hypercomputer/maxtext) — PyTorchKR/landscape0 reactions
- Oct 3, 20263. MaxText: run one small pinned configuration after lower-level checks — egesamuray/jax-rocm-systems-lab0 reactions
- Sep 28, 2026Documentation Link Check Failed - 2026-09-28 — gitrajav/maxtext0 reactions
- Sep 21, 2026Documentation Link Check Failed - 2026-09-21 — gitrajav/maxtext0 reactions
- Sep 21, 2026feat(multipod): Add test_scope param to `maxtext_e2e_tests` — GoogleCloudPlatform/ml-auto-solutions0 reactions
- Sep 21, 2026feat(multipod): Add test_scope param to `maxtext_e2e_tests` — CIeNET-International/ml-auto-solutions-30 reactions · 5 comments
- Sep 19, 2026[RL] Sever autodiff graph with jnp.where on masked/padded tokens in G… — google/tunix0 reactions
- Sep 17, 2026# Description — matrawybarte-lgtm/gpc0 reactions
- Sep 15, 2026fix(checkpointing, infra): orchestrator save interval, save-sync serialization, memory requests, and fail-fast — google/tunix0 reactions
- Sep 14, 2026Documentation Link Check Failed - 2026-09-14 — gitrajav/maxtext0 reactions
- Sep 7, 2026Documentation Link Check Failed - 2026-09-07 — gitrajav/maxtext0 reactions
- Aug 31, 2026Documentation Link Check Failed - 2026-08-31 — gitrajav/maxtext0 reactions
- Aug 24, 2026feat: support multimodal models and eager loading in checkpoint conversion — GoogleCloudPlatform/accelerated-platforms0 reactions
- Aug 24, 2026Documentation Link Check Failed - 2026-08-24 — gitrajav/maxtext0 reactions
- Aug 22, 2026feat: RLVllmSampler weight sync via Raiden, bound in-process in the EngineCore worker — vllm-project/tpu-inference0 reactions · 1 comment
- Aug 18, 2026Update MaxText E2E TPU DAG checkpoint paths for reduced step count — GoogleCloudPlatform/ml-auto-solutions0 reactions
- Aug 17, 2026Documentation Link Check Failed - 2026-08-17 — gitrajav/maxtext0 reactions
- Aug 10, 2026Documentation Link Check Failed - 2026-08-10 — gitrajav/maxtext0 reactions
- Jul 20, 2026Update maxtext_moe_tpu_e2e DAG: hf access token & refactor — GoogleCloudPlatform/ml-auto-solutions0 reactions
- Jul 17, 2026[Maxtext] [Tunix] New Weight Sync for Post-train, maxtext -> maxtext — google/tunix0 reactions
- Jul 16, 2026feat: Restrict DAG `maxtext_e2e_tests` to GitHub schedule events — GoogleCloudPlatform/ml-auto-solutions0 reactions
- Jul 16, 2026feat: Restrict DAG `maxtext_e2e_tests` to GitHub schedule events — CIeNET-International/ml-auto-solutions-30 reactions · 2 comments
- Jun 9, 2026add qwen3.5 35b to xlml tests — GoogleCloudPlatform/ml-auto-solutions0 reactions
- May 21, 2026Remove collect_stack_trace config from checkpointing test — GoogleCloudPlatform/ml-auto-solutions0 reactions
- Feb 24, 2026Experiment: cast pallas xent dW to bf16 (keep fp32 accum) and validate speed + numerics — marin-community/marin0 reactions · 2 comments
- Feb 20, 2026Add Qwen3-Next tests to MaxText_MoE DAG — GoogleCloudPlatform/ml-auto-solutions0 reactions
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,196 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- maxtext-goodputSkill
- maxtext-pr-uploadSkill
- maxtext-remat-estimatorSkill
- model-bringup-m3Skill
- model-bringupSkill
- update-changelogSkill
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Clean Dependencies & Cross-File Contracts: Use concrete types rather than Any, untyped dict bags, or lazy-import hacks that disguise upward …
- Distinctive: line 33
Focused Scope & High-Signal Comments: Keep changes small and single-concern (~400-500 net logic lines max.
- Very specific: line 41
JIT Purity & Multi-Host Safety: Avoid Python branching on traced arrays, side effects inside jit, unintended recompilation from …
- Very specific: line 68
CPU & TPU Test Efficiency: Keep unit tests fast by using minimal model dimensions/expert counts/topologies, jitting init and execution …
- Very specific: line 81
Domain Guides, Skills & Self-Review: Follow matching checklists in .agents/review/ (workflows.md, config-checkpoint.md, kernels.md, …
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MaxText AI Agent Guidelines
Shared engineering, JAX/sharding, and testing invariants for authoring and reviewing MaxText changes.
1. Architecture, Configs, and Error Handling
- Single Canonical Path: Reuse established MaxText layers, sharding helpers
(
maybe_shard_with_logical,sharding.constrain), remat tags (checkpoint_name), and logging (max_logging) instead of adding duplicate utilities or hardcoded tunables. Fix issues at the owning layer (config validation, input pipeline, sharding rules, or shared layer) rather than patching callers, and update callers directly when refactoring instead of leaving single-use wrappers or pass-through shims. (Exception: undersrc/maxtext/m3/models/, each model family intentionally defines self-contained attention, MLP, and decoder blocks rather than sharing cross-model layers; seesrc/maxtext/m3/README.md.) - Typed Pydantic Configs (Fail-Fast): Declare config keys in
src/maxtext/configs/orsrc/maxtext/m3/configs/and readconfig.<field>directly — never usegetattr(config, "flag", default)ordict.get(...)fallback defaults (unless indexing dynamic attribute names), redundantisinstance/Nonechecks on guaranteed types, blankettry/except Exceptionblocks, or silent fallbacks. Release files, GCS handles, profiler sessions, and background threads via context managers ortry/finally. - Clean Dependencies & Cross-File Contracts: Use concrete types rather than
Any, untypeddictbags, or lazy-import hacks that disguise upward or circular dependencies. When changing signatures, config keys, or parameter shapes/ranks/names, update all consumers: checkpoint conversion, LoRA and quantization rules, and optimizer metadata such as Muon dimension numbers (muon_utils.get_muon_weight_dimension_numbersandmaxtext_muon_utils.get_maxtext_muon_weight_dimension_numbers). Declare new third-party imports in requirements files (requirements_sync_test.py). - Focused Scope & High-Signal Comments: Keep changes small and
single-concern (~400-500 net logic lines max; split preparatory refactors from
features) without unused speculative parameters. Comment non-obvious why
(
stop_gradient/custom VJPs,with_sharding_constraint, donated buffers,rematpolicies, compiler workarounds), not line-by-line code narration.
2. JAX, Distributed Execution, and Performance
- JIT Purity & Multi-Host Safety: Avoid Python branching on traced arrays,
side effects inside
jit, unintended recompilation from missing/wrong static arguments, host-device syncs in training or decode loops, materialized or replicated large intermediates instead of sharded ones, extra collectives, Python loops wherejax.lax.scanapplies, multi-host races (e.g., every host writing the same file), or unsynchronized state shared with async checkpointing or data-loading threads.
3. Testing Standards
- Spec-Level, Collectible Tests: Name test files
*_test.pyor*_tests.py(pytest.iniignorestest_*.py) withtest*methods. Assert observable end-to-end outcomes and regression cases that fail if the requirement is unmet — never add production shims forSimpleNamespace/MagicMock, assert onlyassert_called/is not None/ shapes / "runs without crashing", or test only disabled/single-device/prefill-only paths when sharding or decode is in scope. - Execution Environment & JAX Pitfalls: CPU CI runs with 4 fake devices
(
--xla_force_host_platform_device_count=4); tests skipping below >4 devices or markedtpu_only/gpu_onlyare skipped on CPU, and CPU op emulators (e.g., forjax.lax.ragged_all_to_all) do not replace atpu_onlytest of the real op. UseassertRaisesRegexrather than bareassertRaises(ValueError)around sharded code, compare gradients as well as outputs in layout/sharding/kernel parity tests, and match tuple-shaped collectives in HLO regexes (e.g.,r"\b(all-gather|all-reduce)(?:-start)?\("). - CPU & TPU Test Efficiency: Keep unit tests fast by using minimal model
dimensions/expert counts/topologies, jitting init and execution
(
nnx.jit/jax.jit), usinglinen_wrappers.init_variablesto skip discardedToLinen.initforwards, usingeval_shapefor HLO/jaxpr/dtype checks, caching shared parity references per class, settingmegablox=False(orhardware="cpu") in non-kernel CPU MoE tests, avoidingtpu_onlyon pure-CPUdot_producttests, splitting monolithic TPU classes and>4-device CPU-mesh subprocesses (tests/utils/cpu_mesh_child.py) (see.agents/review/testing.md).
4. Formatting, Domain Guides, and Workflows
- Style & License: Include the Apache 2.0 license header on
.pyfiles and use 2-space indentation with max line length 122 (pyink,pylintrc). - Domain Guides, Skills & Self-Review: Follow matching checklists in
.agents/review/(workflows.md,config-checkpoint.md,kernels.md,performance.md,testing.md), check.agents/skills/for task workflows (see.agents/README.md), and run a read-only self-review against.agents/review/protocol.mdbefore requesting review.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

