vllm.models.beam.amd
¶
Modules:
-
activation– -
attention– -
attention_ops–Fused Q/K normalization, position transforms, and attention output gating.
-
dflash2–DFlash2 draft model for Beam targets.
-
dflash2_context_ops– -
dflash2_conv_ops– -
layernorm–Beam kernels preserving FP32 normalization and affine arithmetic.
-
model–Inference-only Beam model for AMD GPUs.
-
moe–
Classes:
-
BeamForCausalLM–Beam causal LM. LoRA support is deferred to a follow-up change.
-
DFlash2BeamForCausalLM–
BeamForCausalLM
¶
Bases: Module, SupportsPP, MixtureOfExperts, SupportsQuant, SupportsEagle3
Beam causal LM. LoRA support is deferred to a follow-up change.
Source code in vllm/models/beam/amd/model.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | |
DFlash2BeamForCausalLM
¶
Bases: Module
Methods:
-
combine_hidden_states–Project the concatenated target-layer states to the drafter's width.
-
compute_candidates–The selector's top-k candidate ids and their logits at each position.
-
get_draft_attn_causal–Per-layer causality, aligned with
get_draft_kv_cache_layer_names.
Source code in vllm/models/beam/amd/dflash2.py
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 | |
combine_hidden_states(hidden_states)
¶
Project the concatenated target-layer states to the drafter's width.
Source code in vllm/models/beam/amd/dflash2.py
compute_candidates(hidden_states)
¶
The selector's top-k candidate ids and their logits at each position.
Source code in vllm/models/beam/amd/dflash2.py
get_draft_attn_causal()
¶
Per-layer causality, aligned with get_draft_kv_cache_layer_names.