PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
Fix gguf cuda ut (#1975)
Heng Guo1c6f4e969a0c
diff --git a/test/test_cuda/algorithms/test_auto_scheme.py b/test/test_cuda/algorithms/test_auto_scheme.pyindex cd9f85e73..6ff82bba3 100644--- a/test/test_cuda/algorithms/test_auto_scheme.py+++ b/test/test_cuda/algorithms/test_auto_scheme.py@@ -72,7 +72,8 @@ class TestAutoScheme:model, layer_config = ar.quantize()avg_bits, _ = compute_avg_bits_for_model(model, ignore_scale_zp_bits=True)print(avg_bits)- assert target_bits - 0.1 < avg_bits <= target_bits + 1e-3+ # Due to the tiny model and embedding, the actual number of bits of gguf format will be larger than the target bits.+ assert target_bits - 0.1 < avg_bits <= target_bits + 0.3def test_shared_layers(self, tiny_opt_model_path):model_name = tiny_opt_model_path