Skip to content

[docs] Fix leftover snapshot paths, metrics dual-log, and model guide - #4563

Open
YeonwooSung wants to merge 2 commits into
pytorch:mainfrom
YeonwooSung:pr/docs-drift-paths-and-model-guide
Open

[docs] Fix leftover snapshot paths, metrics dual-log, and model guide#4563
YeonwooSung wants to merge 2 commits into
pytorch:mainfrom
YeonwooSung:pr/docs-drift-paths-and-model-guide

Conversation

@YeonwooSung

Copy link
Copy Markdown
Contributor

Summary

Leftover docs that no longer match main after the recent README / script-path cleanups:

  • docs/debugging.md still described memory snapshots as ./outputs/memory_snapshot/iteration_x. Code defaults are profiling/memory_snapshot/step_{step:012d} (and _exit on OOM) under the dump folder.
  • docs/metrics.md said W&B wins if both backends are enabled. _build_metric_logger attaches both loggers.
  • docs/checkpoint.md had one convert_from_hf.py example still on the old scripts/ path.
  • torchtitan/models/README.md still mentioned apply_moe_ep_tp, a CP context manager in train.py, and per-model pipeline.py.

Docs only. No runtime change.

Test plan

  • Cross-checked each sentence against profiler.py, metrics.py, conversion scripts, and current model/PP/CP entry points
  • Visual review of the four files

debugging.md still described pre-move memory snapshot paths.
metrics.md said W&B wins over TensorBoard; both loggers attach.
checkpoint.md had one convert_from_hf example on the old scripts/ path.
models/README.md still mentioned apply_moe_ep_tp, a train.py CP
context manager, and per-model pipeline.py.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 10, 2026
Comment thread torchtitan/models/README.md Outdated
- apply training techniques in the following order
- `model.parallelize(parallel_dims)` — auto-recursive declarative sharding driven by `sharding_config` (TP, SP, attention `local_map`). Replaces per-model `parallelize_module` plan dicts.
- (MoE models) `apply_moe_ep_tp` for expert-parallel + TP on MoE experts (not yet config-based).
- (MoE models) expert-parallel sharding via `apply_fsdp_to_decoder` plus `sharding_config` / expert meshes (there is no `apply_moe_ep_tp` helper).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove description of things that doesn't exist, aka "(there is no apply_moe_ep_tp helper)"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrased in 37bae3d to describe what is there rather than what is not: model.parallelize applies the EP axes declared in sharding_config, and apply_fsdp_to_decoder takes ep_degree / edp_mesh for the expert FSDP mesh.

Comment thread torchtitan/models/README.md Outdated
- apply PP
- NOTE: language-model CP goes through `Decoder.preprocess_inputs` -> `prepare_context_parallel_input`. Ideally no extra work is needed to enable CP.
- Pipeline parallelism (optional if model size is small)
- apply PP via `pipeline_llm` / `pipeline_vlm` in `torchtitan/distributed/pipeline_parallel.py` (no per-model `pipeline.py`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be updated soon, so let's not change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted the pipeline.py section to its current text in 37bae3d, leaving it for the upcoming update. The CP NOTE just above it is still changed -- Decoder.preprocess_inputs calls prepare_context_parallel_input and there is no longer a CP context manager in train.py. Happy to drop that line too if it is part of the same upcoming change.

Describe the MoE expert sharding path positively instead of noting the
absence of apply_moe_ep_tp: model.parallelize handles the EP axes from
sharding_config, and apply_fsdp_to_decoder takes ep_degree / edp_mesh.

Revert the pipeline.py section, which is being updated upstream.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants