Commit 1b674d8
authored
fix: apply --draft-attn-impl when loading with --from-pretrained (vllm-project#755)
### Problem
`--draft-attn-impl` is silently dropped on the `--from-pretrained` load
path: HF configs never serialize `_attn_implementation`, and the load
call doesn't re-apply the CLI choice, so the loaded draft always
resolves the model default (`simple_flex_attention`). On backends
without FlexAttention this crashes during offline eval of trained
checkpoints. Details and reproduction in vllm-project#754.
### Fix
Re-apply the CLI selection on the loaded config before model
construction, mirroring the `from_training_args` mechanism
(`transformer_layer_config._attn_implementation`), on both the
weights-loading path and the config-only path. Applying the default
value is behavior-preserving, so this is a no-op for anyone not using
the flag.
### Validation
- Loading a DSpark checkpoint with `--from-pretrained --val-only
--draft-attn-impl <non-default>` now routes to the selected backend
(previously: flex dispatch error).
- Offline eval of a GLM-5.2 draft over six public benchmarks ran
end-to-end on this path; scoring reproducibility across independent runs
Δ=0.14%.
Fixes vllm-project#754
---------
Signed-off-by: Frozen7771 <133861939+Frozen7771@users.noreply.github.com>1 parent 548f9f7 commit 1b674d8
2 files changed
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
| |||
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
| 378 | + | |
| 379 | + | |
377 | 380 | | |
378 | 381 | | |
379 | 382 | | |
| |||
426 | 429 | | |
427 | 430 | | |
428 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
429 | 449 | | |
430 | 450 | | |
431 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
437 | 466 | | |
438 | 467 | | |
439 | 468 | | |
| |||
0 commit comments