Skip to content

[docs] Replace leftover ModelSpec / parallelize.py names after #4810 - #4829

Merged
tianyu-l merged 2 commits into
pytorch:mainfrom
YeonwooSung:pr/docs-4810-stale-paths
Sep 22, 2026
Merged

tianyu-l merged 2 commits into
pytorch:mainfrom
YeonwooSung:pr/docs-4810-stale-paths

Conversation

@YeonwooSung

Copy link
Copy Markdown
Contributor

Summary

#4810 deleted ModelSpec and per-model parallelize.py. Trainer.Config.model (and Controller.Config.model) is the Suppress-annotated field. Four docs still used the old names, so copy-paste snippets fail with TypeError: unexpected keyword argument 'model_spec' or point at a file that no longer exists.

Same class of stale-path cleanup as #4805.

  • torchtitan/config/README.md: Trainer.Config(model=...) and Trainer.Config.model in the CLI-freeze paragraph
  • torchtitan/rl/README.md: Controller.Config(model=...)
  • torchtitan/overrides/README.md: FQN example model.layers.0.feed_forward
  • torchtitan/models/llama3/README.md: point at sharding.py and BaseModel.parallelize() instead of parallelize.py

Docs only. No behavior change.

Fixes #4827.

Test plan

  • Confirmed each replacement path exists on this branch (Trainer.Config.model, Controller.Config.model, llama3/sharding.py, BaseModel.parallelize)
  • Grepped the four files for leftover model_spec= Config keywords and parallelize.py

…h#4810

pytorch#4810 deleted ModelSpec and per-model parallelize.py. Trainer.Config.model
and Controller.Config.model are the Suppress-annotated fields, and Llama 3
parallelism now lives in sharding.py plus BaseModel.parallelize().

Update the copy-paste snippets and FQN examples that still used the old
names so they match the current API. Fixes pytorch#4827.
@pytorch-bot pytorch-bot Bot added ciflow/fake-pg Run 1-GPU Fake PG integration tests ciflow/rl labels Sep 22, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 22, 2026
@pytorch-bot

pytorch-bot Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@pytorch-bot

pytorch-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:

  • ciflow/rl
  • ciflow/fake-pg

Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows.

@tianyu-l tianyu-l left a comment

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.

one comment

Comment thread torchtitan/config/README.md Outdated
@@ -36,7 +36,7 @@ A different cluster usually means a different sharding layout, and therefore a d
def llama3_8b_fsdp8_tp2_h200() -> Trainer.Config:
model_spec = model_registry("8B", attn_backend="flex")

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.

Suggested change
model_spec = model_registry("8B", attn_backend="flex")
model_config = model_registry("8B", attn_backend="flex")

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.

Applied, thanks. The local is now model_config, matching Trainer.Config.model.

The Trainer.Config field is model. Use a matching local name so the
copy-paste example does not keep the old ModelSpec identifier.
@tianyu-l
tianyu-l merged commit 6efdc92 into pytorch:main Sep 22, 2026
15 of 16 checks passed
@YeonwooSung
YeonwooSung deleted the pr/docs-4810-stale-paths branch September 22, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/fake-pg Run 1-GPU Fake PG integration tests ciflow/rl 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.

[docs] Stale ModelSpec / parallelize.py names after #4810

2 participants