Skip to content

Conversation

Jack-Khuu
Copy link
Contributor

Move VllmConfig construction into EngineConfig at the Policy level instead of deferring to the PolicyWorker.
This simplifies the PolicyWorker construction logic from:

class PolicyWorker(ForgeActor):
    vllm_args: EngineConfig | Mapping = EngineConfig()
    ...

    + def __post_init__() ...

to just

class PolicyWorker(ForgeActor):
    vllm_config: VllmConfig

Misc:

  • While doing this it also cleans up the ambiguous intermediate vllm_args from Policy
  • Fixed SamplingConfig bug where temp and top_p weren't being passed down from yaml cc: @DNXie

python -m apps.grpo.main --config apps/grpo/qwen3_1_7b.yaml
python -m pytest tests/unit_tests/test_policy_config.py
python -m apps.vllm.main --config apps/vllm/llama3_8b.yaml

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 12, 2025
Copy link
Member

@joecummings joecummings left a comment

Choose a reason for hiding this comment

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

One comment, but looks clean!

(Sorry about the merge conflicts :) )

Copy link
Contributor

@allenwang28 allenwang28 left a comment

Choose a reason for hiding this comment

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

I did something like this in #151, wondering what you think about that approach?

Copy link
Contributor

@allenwang28 allenwang28 left a comment

Choose a reason for hiding this comment

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

actually i think i like yours better

@Jack-Khuu
Copy link
Contributor Author

@allenwang28 Ah I missed this change in #151, part of reason for this mini PR was actually your temp work for testing vllm

I considered doing it as a classmethod like you have it at first, but EngineConfig.as_engine_args(self.engine_config) felt a lil verbose

@DNXie
Copy link
Member

DNXie commented Sep 12, 2025

Thanks for spotting and fixing the issue with SamplingConfig! The code LGTM

@Jack-Khuu Jack-Khuu merged commit c50a2a1 into main Sep 12, 2025
5 checks passed
@Jack-Khuu Jack-Khuu deleted the simplify-policy-worker branch September 12, 2025 22:14
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.

4 participants