[Perf] Add fused DFlash2 grouped convolution (#55960)
Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
@@ -26,6 +26,8 @@ class DFlashCorrectnessConfig:
|
||||
use_chat_completions: bool = False
|
||||
enforce_eager: bool = False
|
||||
disable_flashinfer_sampler: bool = False
|
||||
language_model_only: bool = False
|
||||
chat_template_kwargs: dict[str, object] | None = None
|
||||
|
||||
|
||||
QWEN3_DFLASH = DFlashCorrectnessConfig(
|
||||
@@ -35,6 +37,18 @@ QWEN3_DFLASH = DFlashCorrectnessConfig(
|
||||
expected_acceptance_len=3.5,
|
||||
)
|
||||
|
||||
QWEN3_8_DFLASH2_NVFP4 = DFlashCorrectnessConfig(
|
||||
model="nvidia/Qwen3.8-27B-NVFP4",
|
||||
draft_model="z-lab/Qwen3.8-27B-DFlash2",
|
||||
expected_accuracy=0.90,
|
||||
expected_acceptance_len=6.14 * 0.95,
|
||||
num_speculative_tokens=7,
|
||||
max_num_seqs=32,
|
||||
use_chat_completions=True,
|
||||
language_model_only=True,
|
||||
chat_template_kwargs={"enable_thinking": False},
|
||||
)
|
||||
|
||||
LAGUNA_DFLASH_NVFP4 = DFlashCorrectnessConfig(
|
||||
model="poolside/Laguna-XS-2.1-NVFP4",
|
||||
draft_model="poolside/Laguna-XS-2.1-DFlash-NVFP4",
|
||||
@@ -104,6 +118,11 @@ def test_dflash_reference_acceptance_lengths(
|
||||
True,
|
||||
id="laguna-nvfp4-mrv2",
|
||||
),
|
||||
pytest.param(
|
||||
QWEN3_8_DFLASH2_NVFP4,
|
||||
True,
|
||||
id="qwen3.8-dflash2-nvfp4-mrv2",
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_dflash_correctness(
|
||||
@@ -134,12 +153,14 @@ def test_dflash_correctness(
|
||||
disable_log_stats=False,
|
||||
enable_chunked_prefill=None,
|
||||
compilation_config=CompilationConfig(),
|
||||
language_model_only=config.language_model_only,
|
||||
) as spec_runner:
|
||||
spec_llm = spec_runner.llm
|
||||
results = evaluate_gsm8k_offline(
|
||||
spec_llm,
|
||||
num_questions=config.num_questions,
|
||||
use_chat_completions=config.use_chat_completions,
|
||||
chat_template_kwargs=config.chat_template_kwargs,
|
||||
)
|
||||
accuracy = results["accuracy"]
|
||||
acceptance_len = compute_acceptance_len(spec_llm.get_metrics())
|
||||
|
||||
Reference in New Issue
Block a user