[rl] Register customized config parser to vllm + less vllm config dependency#3242
Merged
Conversation
[ghstack-poisoned]
This was referenced May 6, 2026
wwwjn
commented
May 6, 2026
wwwjn
commented
May 6, 2026
vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. It serves as 2 purpose: 1. get rid of dependency on a HF format checkpoint folder when initializing 2. Passing customized args to VLLMModelWrapper, eg CompileConfig, skip_init_load_weights [ghstack-poisoned]
wwwjn
commented
May 6, 2026
tianyu-l
reviewed
May 6, 2026
…vllm" vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. It serves as 2 purpose: 1. get rid of dependency on a HF format checkpoint folder when initializing 2. Passing customized args to VLLMModelWrapper, eg CompileConfig, skip_init_load_weights [ghstack-poisoned]
vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. It serves as 2 purpose: 1. get rid of dependency on a HF format checkpoint folder when initializing 2. Passing customized args to VLLMModelWrapper, eg CompileConfig, skip_init_load_weights [ghstack-poisoned]
…vllm" vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. It serves as 2 purpose: 1. get rid of dependency on a HF format checkpoint folder when initializing 2. Passing customized args to VLLMModelWrapper, eg CompileConfig, skip_init_load_weights [ghstack-poisoned]
vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. It serves as 2 purpose: 1. get rid of dependency on a HF format checkpoint folder when initializing 2. Passing customized args to VLLMModelWrapper, eg CompileConfig, skip_init_load_weights [ghstack-poisoned]
…vllm + less vllm config dependency" vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. Why we need this: - get rid of dependency on a HF format checkpoint folder when initializing. Don't implicitly depend on `config.json` as config source of truth Another changes in this PR: - remove the round-trip translation from torchtitan config -> vllm config -> torchtitan config. Using closure to bypass. [ghstack-poisoned]
… config dependency" vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. Why we need this: - get rid of dependency on a HF format checkpoint folder when initializing. Don't implicitly depend on `config.json` as config source of truth Another changes in this PR: - remove the round-trip translation from torchtitan config -> vllm config -> torchtitan config. Using closure to bypass. [ghstack-poisoned]
wwwjn
commented
May 8, 2026
wwwjn
commented
May 8, 2026
| from torchtitan.components.optimizer import OptimizersContainer | ||
| from torchtitan.config import CommConfig, Configurable, TORCH_DTYPE_MAP | ||
| from torchtitan.config.configs import ( | ||
| from torchtitan.config import ( |
Contributor
Author
There was a problem hiding this comment.
This change is just consolidate the import path
tianyu-l
reviewed
May 8, 2026
| @@ -199,14 +214,17 @@ def __init__( | |||
| engine_kwargs = dict( | |||
| model=model_path, | |||
Contributor
Author
There was a problem hiding this comment.
Now it serves 2 purpose:
- Loading tokenizer. This can be removed by passing
tokenizer=tokenizer_pathto EngineArgs.
2.Initial_weight_loading: Will sort out the weight loading part for both trainer and generator in next PR.
After lifting both, we can pass some fake path, say "torchtitan", to vllm
|
|
||
| assert vllm_config is not None, "vllm_config is required" | ||
|
|
||
| # PP and CP are not supported on this inference path |
Contributor
There was a problem hiding this comment.
this "raise ValueError" may better happen at grpo trainer post_init, to be consistent
here we only need assert
| **kwargs, | ||
| ): | ||
| config_dict = model_spec_to_hf_config_dict(model_spec) | ||
| return config_dict, PretrainedConfig.from_dict(config_dict) |
Contributor
There was a problem hiding this comment.
It's actually very weird that the contract is both a config_dict and a cls(config_dict), sounds redundant to me
…vllm + less vllm config dependency" vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. Why we need this: - get rid of dependency on a HF format checkpoint folder when initializing. Don't implicitly depend on `config.json` as config source of truth Another changes in this PR: - remove the round-trip translation from torchtitan config -> vllm config -> torchtitan config. Using closure to bypass. [ghstack-poisoned]
… config dependency" vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. Why we need this: - get rid of dependency on a HF format checkpoint folder when initializing. Don't implicitly depend on `config.json` as config source of truth Another changes in this PR: - remove the round-trip translation from torchtitan config -> vllm config -> torchtitan config. Using closure to bypass. [ghstack-poisoned]
tianyu-l
approved these changes
May 10, 2026
…vllm + less vllm config dependency" vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. Why we need this: - get rid of dependency on a HF format checkpoint folder when initializing. Don't implicitly depend on `config.json` as config source of truth Another changes in this PR: - remove the round-trip translation from torchtitan config -> vllm config -> torchtitan config. Using closure to bypass. [ghstack-poisoned]
… config dependency" vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. Why we need this: - get rid of dependency on a HF format checkpoint folder when initializing. Don't implicitly depend on `config.json` as config source of truth Another changes in this PR: - remove the round-trip translation from torchtitan config -> vllm config -> torchtitan config. Using closure to bypass. [ghstack-poisoned]
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.
Stack from ghstack (oldest at bottom):
vllm has this customized config parser registry support so we can plug in TorchTitan's config parser. Why we need this:
config.jsonas config source of truthAnother changes in this PR: