vllm.model_executor.layers.fused_moe.oracle.fp8 ¶
Functions:
-
make_fp8_moe_quant_config–Create FusedMoEQuantConfig for the specified FP8 Backend.
-
map_fp8_backend–Map user's MoEBackend to Fp8MoeBackend.
-
select_fp8_moe_backend–Select the primary FP8 MoE backend
_get_priority_backends(moe_config, weight_key, activation_key) ¶
Get available backends in priority order based on platform and config.
This function can be extended to become more complex as needed.
Source code in vllm/model_executor/layers/fused_moe/oracle/fp8.py
_humming_fp8_weight_schema(layer, weight, weight_scale) ¶
Build the humming weight schema from the canonical on-device fp8/mxfp8 tensors (scale dtype/shape, block size), not the producing quant method.
Source code in vllm/model_executor/layers/fused_moe/oracle/fp8.py
make_fp8_moe_quant_config(fp8_backend, w1_scale, w2_scale, a1_scale, a2_scale, w1_bias=None, w2_bias=None, block_shape=None, per_act_token_quant=False, per_out_ch_quant=False, swiglu_limit=None, gemm1_alpha=None, gemm1_beta=None, layer=None) ¶
Create FusedMoEQuantConfig for the specified FP8 Backend. The FusedMoEQuantConfig holds the scales that are used at runtime by the Modular Kernel abstraction.
Note that certain kernels (e.g. Flashinfer CUTLASS) need special Quant configs to handle non-standard inputs to their kernel interfaces.
In a future PR, we will have this function should be a method of the modular kernel itself.
Source code in vllm/model_executor/layers/fused_moe/oracle/fp8.py
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 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 | |
map_fp8_backend(runner_backend) ¶
Map user's MoEBackend to Fp8MoeBackend.
Source code in vllm/model_executor/layers/fused_moe/oracle/fp8.py
select_fp8_moe_backend(config, weight_key, activation_key, allow_vllm_cutlass=False) ¶
Select the primary FP8 MoE backend Note: Shape-specific fallbacks may still occur at runtime.
Source code in vllm/model_executor/layers/fused_moe/oracle/fp8.py
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 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 412 413 414 415 416 417 418 419 | |