Skip to content

[Experimental][rl][vllm compat] Update simple_rl example to work with vLLM nightly - #2219

Merged
tianyu-l merged 2 commits into
pytorch:mainfrom
Lucaskabela:lucaskabela/update_vllm_compat
Jan 16, 2026
Merged

tianyu-l merged 2 commits into
pytorch:mainfrom
Lucaskabela:lucaskabela/update_vllm_compat

Conversation

@Lucaskabela

@Lucaskabela Lucaskabela commented Jan 9, 2026 •

Copy link
Copy Markdown
Contributor

See title; running with the latest version of vLLM nightly ran into a few issues as these APIs have changed and within torch titan some paths have changed

Test plan

VLLM_BATCH_INVARIANT=1 VLLM_FLASH_ATTN_VERSION=3 python -m torchtitan.experiments.rl.vllm_compat.simple_rl

Results

  ✓ vLLM-TorchTitan bitwise determinism verified: 100 tokens match exactly

Step   2 | Loss: -0.0033 | Reward: +0.213 | Samples: 160
  Sample:  Natalia sold 48 clips in April. In May, she sold half as many as she sold in Ap...
Converted to 311 vLLM weights

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 9, 2026
@Lucaskabela
Lucaskabela marked this pull request as ready for review January 9, 2026 23:53
@Lucaskabela

Lucaskabela commented Jan 9, 2026 •

Copy link
Copy Markdown
Contributor Author

cc @wwwjn @acisseJZhong for review

@Lucaskabela

Copy link
Copy Markdown
Contributor Author

cc @bwasti for review on this actually

try:
init_batch_invariance()
except TypeError:
# Fallback to new version requiring positional arg for attention

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.

Can we converge to one single way instead of maintaining backward compatible code for vllm?

Is it OK if we always run with latest vllm nightly? @jessicazhongeee @zhxchen17

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.

Seconding here - if we want to only support nightly we can remove this try/except

vocab_size=151936,
)
model = Qwen3VLLMCompatModel(model_args)
model = Qwen3VLLMCompatModel(model_args).to('cuda').to(torch.bfloat16)

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.

curious

  • why in the past we don't need this but now we need? Is it because previously it was AI-generated and it actually wouldn't work?
  • why making it bfloat16? I'm assuming we need to align train and inference, but do we know that inference is everywhere bf16? e.g. how about RMSNorm in vllm.

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.

  File "/home/lucaskabela/torchtitan/torchtitan/experiments/rl/vllm_compat/models/attention.py", line 180, in forward
    output_varlen = FlashAttnWithBackward.apply(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lucaskabela/pytorch/torch/autograd/function.py", line 583, in apply
    return super().apply(*args, **kwargs)  # type: ignore[misc]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lucaskabela/torchtitan/torchtitan/experiments/rl/vllm_compat/models/attention.py", line 78, in forward
    output = flash_fn(
             ^^^^^^^^^
  File "/home/lucaskabela/vllm/vllm/vllm_flash_attn/flash_attn_interface.py", line 279, in flash_attn_varlen_func
    out, softmax_lse, _, _ = torch.ops._vllm_fa3_C.fwd(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lucaskabela/pytorch/torch/_ops.py", line 1243, in __call__
    return self._op(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: FlashAttention only supports fp16, bf16, and fp8_e4m3 data type

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 is the dtype that the model is expected in (see https://huggingface.co/Qwen/Qwen3-0.6B model card tensortype

This indicating the model weight in the safetensor file is stored as bf16. Looking at the error message, it's complaining the input (activation) of flash_attn kernel needs to be bf16. In torchtitan, we can keep the model weights float32 but make the activations to be bf16

So I also want to understand why we need to do this and explicitly convert model weights to bf16

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.

From the error, the flash attention backend is not compatible with float32 (which to my understanding was the backend we are using)

from vllm.model_executor.layers.batch_invariant import init_batch_invariance

init_batch_invariance()
try:

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.

similar here

@pytorch-bot pytorch-bot Bot removed the ciflow/8gpu label Jan 14, 2026
@Lucaskabela
Lucaskabela force-pushed the lucaskabela/update_vllm_compat branch from 61fae61 to 724ab19 Compare January 14, 2026 19:54
@Lucaskabela
Lucaskabela requested a review from tianyu-l January 14, 2026 19:55
@Lucaskabela

Lucaskabela commented Jan 14, 2026 •

Copy link
Copy Markdown
Contributor Author

cc @tianyu-l @wwwjn for re-review :)

vllm_silu_and_mul = VLLMSiluAndMul()
# vLLM custom ops require a config context to be set
# Since these are parameter free we instantiate default config
with set_current_vllm_config(VllmConfig()):

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.

For this part I'm not sure , cc @bwasti for review

gpu_memory_utilization=0.3, # Reduced from 0.5
seed=42, # Fixed seed for determinism
enforce_eager=True,
attention_config={"backend": AttentionBackendEnum.FLASH_ATTN},

@wwwjn wwwjn Jan 15, 2026 •

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.

Why we need this AttentionBackendEnum again in vLLM Engine params?

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.

Requirement of the new API

@wwwjn wwwjn 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.

I tested reinstall from source using vllm latest code, the AttentionBackend changes are necessary

@Lucaskabela Lucaskabela left a comment

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.

See response

vocab_size=151936,
)
model = Qwen3VLLMCompatModel(model_args)
model = Qwen3VLLMCompatModel(model_args).to('cuda').to(torch.bfloat16)

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.

From the error, the flash attention backend is not compatible with float32 (which to my understanding was the backend we are using)

gpu_memory_utilization=0.3, # Reduced from 0.5
seed=42, # Fixed seed for determinism
enforce_eager=True,
attention_config={"backend": AttentionBackendEnum.FLASH_ATTN},

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.

Requirement of the new API

@Lucaskabela

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge

@pytorch-bot

pytorch-bot Bot commented Jan 16, 2026

Copy link
Copy Markdown

Mergebot is not configured for this repository. Please use the merge button provided by GitHub.

@tianyu-l
tianyu-l merged commit 1556971 into pytorch:main Jan 16, 2026
tianyu-l pushed a commit that referenced this pull request Jan 19, 2026
… nightly (#2226)

NOTE: This PR should be landed on top of
#2219

Few changes seem to be needed to get working; namely:

1) Update to use `spawn` method for CUDA fork
2) Modify attention import to be correct after refactor
3) Modify attention dimensions to be correct after refactor

### Test Plan
Follow steps in the readme then run
```
python torchtitan/experiments/rl/unified/infer.py --model-ckpt-path torchtitan/experiments/rl/example_checkpoint/Qwen3-0.6B
```

### Output

```
[2026-01-13 15:20:58] INFO infer.py:113: Generation complete

Prompt: Hello, my name is
Generated text: " Josh and I'm in the middle of a project to develop a hybrid mobile app. I'm looking for guidance on how to go about using modular frameworks. I want to use React and Vue. I need to decide on the framework to use. Can you help me choose the right framework and suggest some best practices for using them?\n\nAdditionally, I want to know what are the best practices for using a modular framework in the context of a web application? Also, what are the best practices for using a"
```
wwwjn pushed a commit to wwwjn/torchtitan that referenced this pull request Jan 30, 2026
… vLLM nightly (pytorch#2219)

See title; running with the latest version of vLLM nightly ran into a
few issues as these APIs have changed and within torch titan some paths
have changed

```
VLLM_BATCH_INVARIANT=1 VLLM_FLASH_ATTN_VERSION=3 python -m torchtitan.experiments.rl.vllm_compat.simple_rl
```

```
  ✓ vLLM-TorchTitan bitwise determinism verified: 100 tokens match exactly

Step   2 | Loss: -0.0033 | Reward: +0.213 | Samples: 160
  Sample:  Natalia sold 48 clips in April. In May, she sold half as many as she sold in Ap...
Converted to 311 vLLM weights
```
wwwjn pushed a commit to wwwjn/torchtitan that referenced this pull request Jan 30, 2026
… nightly (pytorch#2226)

NOTE: This PR should be landed on top of
pytorch#2219

Few changes seem to be needed to get working; namely:

1) Update to use `spawn` method for CUDA fork
2) Modify attention import to be correct after refactor
3) Modify attention dimensions to be correct after refactor

Follow steps in the readme then run
```
python torchtitan/experiments/rl/unified/infer.py --model-ckpt-path torchtitan/experiments/rl/example_checkpoint/Qwen3-0.6B
```

```
[2026-01-13 15:20:58] INFO infer.py:113: Generation complete

Prompt: Hello, my name is
Generated text: " Josh and I'm in the middle of a project to develop a hybrid mobile app. I'm looking for guidance on how to go about using modular frameworks. I want to use React and Vue. I need to decide on the framework to use. Can you help me choose the right framework and suggest some best practices for using them?\n\nAdditionally, I want to know what are the best practices for using a modular framework in the context of a web application? Also, what are the best practices for using a"
```
Lucaskabela added a commit that referenced this pull request Feb 11, 2026
…LLM version (#2359)

## Summary

We make a handful of QOL changes to make `simple_rl_multiprocess.py`
work with recent vLLM. These are:

1) Update to `README.md` to add monarch requirement

2) `AttentionBackendEnum` forwarded in locations needed (similar to
#2219)

3) Wiring through `enable_gqa` support in vllm_compat attention - this
requires reshaping when `q.shape[1]` != `k.shape[1]` and using an output
tensor explicitly with the proper shape

With these changes, we are able to run the simple_rl_multiprocess script
again

## Test Plan

```bash
VLLM_BATCH_INVARIANT=1 VLLM_ATTENTION_BACKEND=FLASH_ATTN python3 torchtitan/experiments/rl/unified/simple_rl_multiprocess.py
```

### Before (Main)
```bash
  File "/home/lucaskabela/.conda/envs/vllm/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/lucaskabela/torchtitan/torchtitan/experiments/rl/unified/simple_rl_multiprocess.py", line 66, in main
    init_batch_invariance()
TypeError: init_batch_invariance() missing 1 required positional argument: 'attention_backend'
```
And after patching with the enum:
```
  File "/home/lucaskabela/pytorch/torch/nn/modules/module.py", line 1779, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lucaskabela/pytorch/torch/nn/modules/module.py", line 1790, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: VLLMCompatibleFlashAttention.forward() got an unexpected keyword argument 'enable_gqa'
```
### After 
```bash
Adding requests: 100%|█████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 2935.95it/s]
Processed prompts: 100%|███████████████| 40/40 [00:01<00:00, 27.61it/s, est. speed input: 193.29 toks/s, output: 552.25 toks/s]
[2026-02-09 16:11:59] INFO generator.py:446: [actor=<root>.<torchtitan.experiments.rl.unified.actors.generator.Generator generator{'gpus': 0/1}>] os.getpid()=300001 Generating finish generate (policy v0)...
[2026-02-09 16:11:59] INFO trainer.py:101: [actor=<root>.<torchtitan.experiments.rl.unified.actors.trainer.Trainer trainer{'gpus': 1/2}>] os.getpid()=300426 Trainer starts to train 0 on traj:
[2026-02-09 16:11:59] INFO trainer.py:101: [actor=<root>.<torchtitan.experiments.rl.unified.actors.trainer.Trainer trainer{'gpus': 0/2}>] os.getpid()=299553 Trainer starts to train 0 on traj:
NCCL version 2.28.9+cuda12.9
  ✓ vLLM-TorchTitan bitwise determinism verified: 20 tokens match exactly
  ✓ vLLM-TorchTitan bitwise determinism verified: 20 tokens match exactly
```
xrsrke pushed a commit to NousResearch/torchtitan that referenced this pull request Feb 13, 2026
… vLLM nightly (pytorch#2219)

See title; running with the latest version of vLLM nightly ran into a
few issues as these APIs have changed and within torch titan some paths
have changed

### Test plan
```
VLLM_BATCH_INVARIANT=1 VLLM_FLASH_ATTN_VERSION=3 python -m torchtitan.experiments.rl.vllm_compat.simple_rl
```

### Results
```
  ✓ vLLM-TorchTitan bitwise determinism verified: 100 tokens match exactly

Step   2 | Loss: -0.0033 | Reward: +0.213 | Samples: 160
  Sample:  Natalia sold 48 clips in April. In May, she sold half as many as she sold in Ap...
Converted to 311 vLLM weights
```
xrsrke pushed a commit to NousResearch/torchtitan that referenced this pull request Feb 13, 2026
… nightly (pytorch#2226)

NOTE: This PR should be landed on top of
pytorch#2219

Few changes seem to be needed to get working; namely:

1) Update to use `spawn` method for CUDA fork
2) Modify attention import to be correct after refactor
3) Modify attention dimensions to be correct after refactor

### Test Plan
Follow steps in the readme then run
```
python torchtitan/experiments/rl/unified/infer.py --model-ckpt-path torchtitan/experiments/rl/example_checkpoint/Qwen3-0.6B
```

### Output

```
[2026-01-13 15:20:58] INFO infer.py:113: Generation complete

Prompt: Hello, my name is
Generated text: " Josh and I'm in the middle of a project to develop a hybrid mobile app. I'm looking for guidance on how to go about using modular frameworks. I want to use React and Vue. I need to decide on the framework to use. Can you help me choose the right framework and suggest some best practices for using them?\n\nAdditionally, I want to know what are the best practices for using a modular framework in the context of a web application? Also, what are the best practices for using a"
```
TXacs pushed a commit to McmillanTAC/torchtitan that referenced this pull request Apr 13, 2026
… vLLM nightly (pytorch#2219)

See title; running with the latest version of vLLM nightly ran into a
few issues as these APIs have changed and within torch titan some paths
have changed

### Test plan
```
VLLM_BATCH_INVARIANT=1 VLLM_FLASH_ATTN_VERSION=3 python -m torchtitan.experiments.rl.vllm_compat.simple_rl
```

### Results
```
  ✓ vLLM-TorchTitan bitwise determinism verified: 100 tokens match exactly

Step   2 | Loss: -0.0033 | Reward: +0.213 | Samples: 160
  Sample:  Natalia sold 48 clips in April. In May, she sold half as many as she sold in Ap...
Converted to 311 vLLM weights
```
TXacs pushed a commit to McmillanTAC/torchtitan that referenced this pull request Apr 13, 2026
… nightly (pytorch#2226)

NOTE: This PR should be landed on top of
pytorch#2219

Few changes seem to be needed to get working; namely:

1) Update to use `spawn` method for CUDA fork
2) Modify attention import to be correct after refactor
3) Modify attention dimensions to be correct after refactor

### Test Plan
Follow steps in the readme then run
```
python torchtitan/experiments/rl/unified/infer.py --model-ckpt-path torchtitan/experiments/rl/example_checkpoint/Qwen3-0.6B
```

### Output

```
[2026-01-13 15:20:58] INFO infer.py:113: Generation complete

Prompt: Hello, my name is
Generated text: " Josh and I'm in the middle of a project to develop a hybrid mobile app. I'm looking for guidance on how to go about using modular frameworks. I want to use React and Vue. I need to decide on the framework to use. Can you help me choose the right framework and suggest some best practices for using them?\n\nAdditionally, I want to know what are the best practices for using a modular framework in the context of a web application? Also, what are the best practices for using a"
```
TXacs pushed a commit to McmillanTAC/torchtitan that referenced this pull request Apr 13, 2026
…LLM version (pytorch#2359)

## Summary

We make a handful of QOL changes to make `simple_rl_multiprocess.py`
work with recent vLLM. These are:

1) Update to `README.md` to add monarch requirement

2) `AttentionBackendEnum` forwarded in locations needed (similar to
pytorch#2219)

3) Wiring through `enable_gqa` support in vllm_compat attention - this
requires reshaping when `q.shape[1]` != `k.shape[1]` and using an output
tensor explicitly with the proper shape

With these changes, we are able to run the simple_rl_multiprocess script
again

## Test Plan

```bash
VLLM_BATCH_INVARIANT=1 VLLM_ATTENTION_BACKEND=FLASH_ATTN python3 torchtitan/experiments/rl/unified/simple_rl_multiprocess.py
```

### Before (Main)
```bash
  File "/home/lucaskabela/.conda/envs/vllm/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/lucaskabela/torchtitan/torchtitan/experiments/rl/unified/simple_rl_multiprocess.py", line 66, in main
    init_batch_invariance()
TypeError: init_batch_invariance() missing 1 required positional argument: 'attention_backend'
```
And after patching with the enum:
```
  File "/home/lucaskabela/pytorch/torch/nn/modules/module.py", line 1779, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lucaskabela/pytorch/torch/nn/modules/module.py", line 1790, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: VLLMCompatibleFlashAttention.forward() got an unexpected keyword argument 'enable_gqa'
```
### After 
```bash
Adding requests: 100%|█████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 2935.95it/s]
Processed prompts: 100%|███████████████| 40/40 [00:01<00:00, 27.61it/s, est. speed input: 193.29 toks/s, output: 552.25 toks/s]
[2026-02-09 16:11:59] INFO generator.py:446: [actor=<root>.<torchtitan.experiments.rl.unified.actors.generator.Generator generator{'gpus': 0/1}>] os.getpid()=300001 Generating finish generate (policy v0)...
[2026-02-09 16:11:59] INFO trainer.py:101: [actor=<root>.<torchtitan.experiments.rl.unified.actors.trainer.Trainer trainer{'gpus': 1/2}>] os.getpid()=300426 Trainer starts to train 0 on traj:
[2026-02-09 16:11:59] INFO trainer.py:101: [actor=<root>.<torchtitan.experiments.rl.unified.actors.trainer.Trainer trainer{'gpus': 0/2}>] os.getpid()=299553 Trainer starts to train 0 on traj:
NCCL version 2.28.9+cuda12.9
  ✓ vLLM-TorchTitan bitwise determinism verified: 20 tokens match exactly
  ✓ vLLM-TorchTitan bitwise determinism verified: 20 tokens match exactly
```
ACharacterInASimulation pushed a commit to ACharacterInASimulation/torchtitan that referenced this pull request Apr 21, 2026
… vLLM nightly (pytorch#2219)

See title; running with the latest version of vLLM nightly ran into a
few issues as these APIs have changed and within torch titan some paths
have changed

### Test plan
```
VLLM_BATCH_INVARIANT=1 VLLM_FLASH_ATTN_VERSION=3 python -m torchtitan.experiments.rl.vllm_compat.simple_rl
```

### Results
```
  ✓ vLLM-TorchTitan bitwise determinism verified: 100 tokens match exactly

Step   2 | Loss: -0.0033 | Reward: +0.213 | Samples: 160
  Sample:  Natalia sold 48 clips in April. In May, she sold half as many as she sold in Ap...
Converted to 311 vLLM weights
```
ACharacterInASimulation pushed a commit to ACharacterInASimulation/torchtitan that referenced this pull request Apr 21, 2026
… nightly (pytorch#2226)

NOTE: This PR should be landed on top of
pytorch#2219

Few changes seem to be needed to get working; namely:

1) Update to use `spawn` method for CUDA fork
2) Modify attention import to be correct after refactor
3) Modify attention dimensions to be correct after refactor

### Test Plan
Follow steps in the readme then run
```
python torchtitan/experiments/rl/unified/infer.py --model-ckpt-path torchtitan/experiments/rl/example_checkpoint/Qwen3-0.6B
```

### Output

```
[2026-01-13 15:20:58] INFO infer.py:113: Generation complete

Prompt: Hello, my name is
Generated text: " Josh and I'm in the middle of a project to develop a hybrid mobile app. I'm looking for guidance on how to go about using modular frameworks. I want to use React and Vue. I need to decide on the framework to use. Can you help me choose the right framework and suggest some best practices for using them?\n\nAdditionally, I want to know what are the best practices for using a modular framework in the context of a web application? Also, what are the best practices for using a"
```
ACharacterInASimulation pushed a commit to ACharacterInASimulation/torchtitan that referenced this pull request Apr 21, 2026
…LLM version (pytorch#2359)

## Summary

We make a handful of QOL changes to make `simple_rl_multiprocess.py`
work with recent vLLM. These are:

1) Update to `README.md` to add monarch requirement

2) `AttentionBackendEnum` forwarded in locations needed (similar to
pytorch#2219)

3) Wiring through `enable_gqa` support in vllm_compat attention - this
requires reshaping when `q.shape[1]` != `k.shape[1]` and using an output
tensor explicitly with the proper shape

With these changes, we are able to run the simple_rl_multiprocess script
again

## Test Plan

```bash
VLLM_BATCH_INVARIANT=1 VLLM_ATTENTION_BACKEND=FLASH_ATTN python3 torchtitan/experiments/rl/unified/simple_rl_multiprocess.py
```

### Before (Main)
```bash
  File "/home/lucaskabela/.conda/envs/vllm/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/lucaskabela/torchtitan/torchtitan/experiments/rl/unified/simple_rl_multiprocess.py", line 66, in main
    init_batch_invariance()
TypeError: init_batch_invariance() missing 1 required positional argument: 'attention_backend'
```
And after patching with the enum:
```
  File "/home/lucaskabela/pytorch/torch/nn/modules/module.py", line 1779, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lucaskabela/pytorch/torch/nn/modules/module.py", line 1790, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: VLLMCompatibleFlashAttention.forward() got an unexpected keyword argument 'enable_gqa'
```
### After 
```bash
Adding requests: 100%|█████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 2935.95it/s]
Processed prompts: 100%|███████████████| 40/40 [00:01<00:00, 27.61it/s, est. speed input: 193.29 toks/s, output: 552.25 toks/s]
[2026-02-09 16:11:59] INFO generator.py:446: [actor=<root>.<torchtitan.experiments.rl.unified.actors.generator.Generator generator{'gpus': 0/1}>] os.getpid()=300001 Generating finish generate (policy v0)...
[2026-02-09 16:11:59] INFO trainer.py:101: [actor=<root>.<torchtitan.experiments.rl.unified.actors.trainer.Trainer trainer{'gpus': 1/2}>] os.getpid()=300426 Trainer starts to train 0 on traj:
[2026-02-09 16:11:59] INFO trainer.py:101: [actor=<root>.<torchtitan.experiments.rl.unified.actors.trainer.Trainer trainer{'gpus': 0/2}>] os.getpid()=299553 Trainer starts to train 0 on traj:
NCCL version 2.28.9+cuda12.9
  ✓ vLLM-TorchTitan bitwise determinism verified: 20 tokens match exactly
  ✓ vLLM-TorchTitan bitwise determinism verified: 20 tokens match exactly
```
@Lucaskabela
Lucaskabela deleted the lucaskabela/update_vllm_compat branch May 6, 2026 19:29
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.

3 participants