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
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) ¶
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
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 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 | |
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
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 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 372 373 374 375 376 377 378 379 380 381 382 383 | |