mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-22 16:07:51 +08:00
[CI] Adjust model-specific diff threshold and include iluvatar XPU paths in coverage (#6663)
This commit is contained in:
@@ -33,6 +33,8 @@ omit =
|
||||
*/fastdeploy/model_executor/ops/gpu/fastdeploy_ops.py
|
||||
*/fastdeploy/model_executor/ops/gpu/fastdeploy_ops/__init__.py
|
||||
*/fastdeploy/model_executor/ops/gpu/deep_gemm/utils.py
|
||||
*/fastdeploy/model_executor/layers/attention/iluvatar_attn_backend.py
|
||||
*/fastdeploy/model_executor/xpu_pre_and_post_process.py
|
||||
*/fastdeploy/**/dcu/*
|
||||
*/fastdeploy/worker/dcu*.py
|
||||
*/fastdeploy/**/gcu/*
|
||||
|
||||
@@ -85,6 +85,12 @@ hugging_face_model_param_map = {
|
||||
},
|
||||
}
|
||||
|
||||
# Model-specific diff threshold (default: 0.05)
|
||||
model_threshold_map = {
|
||||
"Qwen2.5-7B-Instruct": 0.2, # dynamic quantization may introduce higher variance
|
||||
"Qwen3-30B-A3B": 0.05,
|
||||
}
|
||||
|
||||
hf_params = []
|
||||
for model, cfg in hugging_face_model_param_map.items():
|
||||
for q in cfg["quantizations"]:
|
||||
@@ -148,5 +154,12 @@ def test_model_against_baseline(
|
||||
else:
|
||||
baseline_file = baseline_filename
|
||||
|
||||
# Use model-specific threshold
|
||||
threshold = model_threshold_map.get(model_name_or_path, 0.05)
|
||||
|
||||
# Compare against baseline file
|
||||
check_result_against_baseline(hf_outputs, baseline_file, threshold=0.05)
|
||||
check_result_against_baseline(
|
||||
hf_outputs,
|
||||
baseline_file,
|
||||
threshold=threshold,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user