Repository navigation
[docs] Replace leftover ModelSpec / parallelize.py names after #4810 - #4829
Merged
Merged
Conversation
…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.
YeonwooSung
requested review from
fegin,
felipemello1,
pzhan9,
tianyu-l,
wconstab and
wwwjn
as code owners
September 22, 2026 02:22
|
|
|
The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:
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
approved these changes
Sep 22, 2026
| @@ -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") | |||
Contributor
There was a problem hiding this comment.
Suggested change
| model_spec = model_registry("8B", attn_backend="flex") | |
| model_config = model_registry("8B", attn_backend="flex") |
Contributor
Author
There was a problem hiding this comment.
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
approved these changes
Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#4810 deleted
ModelSpecand per-modelparallelize.py.Trainer.Config.model(andController.Config.model) is the Suppress-annotated field. Four docs still used the old names, so copy-paste snippets fail withTypeError: 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=...)andTrainer.Config.modelin the CLI-freeze paragraphtorchtitan/rl/README.md:Controller.Config(model=...)torchtitan/overrides/README.md: FQN examplemodel.layers.0.feed_forwardtorchtitan/models/llama3/README.md: point atsharding.pyandBaseModel.parallelize()instead ofparallelize.pyDocs only. No behavior change.
Fixes #4827.
Test plan
Trainer.Config.model,Controller.Config.model,llama3/sharding.py,BaseModel.parallelize)model_spec=Config keywords andparallelize.py