vllm.models.beam
¶
Beam model entry point.
Modules:
-
nvidia–NVIDIA-specific Beam model implementation.
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/nvidia/model.py
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 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | |
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/nvidia/dflash2.py
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 612 613 614 615 616 617 618 619 620 621 622 623 | |
combine_hidden_states(hidden_states)
¶
Project the concatenated target-layer states to the drafter's width.
Source code in vllm/models/beam/nvidia/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/nvidia/dflash2.py
get_draft_attn_causal()
¶
Per-layer causality, aligned with get_draft_kv_cache_layer_names.