MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / total_quantization_error

Function total_quantization_error

tests/test-quantize-fns.cpp:43–50  ·  view source on GitHub ↗

Total quantization error on test data

Source from the content-addressed store, hash-verified

41
42// Total quantization error on test data
43static float total_quantization_error(ggml_type_traits_t & qfns, size_t test_size, const float * test_data) {
44 std::vector<uint8_t> tmp_q(2*test_size);
45 std::vector<float> tmp_out(test_size);
46
47 qfns.from_float(test_data, tmp_q.data(), test_size);
48 qfns.to_float(tmp_q.data(), tmp_out.data(), test_size);
49 return array_rmse(test_data, tmp_out.data(), test_size);
50}
51
52// Total quantization error on test data
53static float reference_quantization_error(ggml_type_traits_t & qfns, size_t test_size, const float * test_data) {

Callers 1

mainFunction · 0.70

Calls 2

array_rmseFunction · 0.70
dataMethod · 0.45

Tested by

no test coverage detected