MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / print_error_stats

Function print_error_stats

tests/test-quantize-stats.cpp:120–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120static void print_error_stats(const std::string & name, const error_stats & stats, bool print_histogram) {
121 double rmse = sqrt(stats.total_error / (double) stats.num_samples);
122 double median = find_quantile(stats, .5);
123 double pct95 = find_quantile(stats, .95);
124 printf("%-50s: rmse %.8f, maxerr %.8f, 95pct<%.4f, median<%.4f\n", name.c_str(), rmse, stats.max_error, pct95, median);
125 if (print_histogram) {
126 printf("Error distribution:\n");
127 for (size_t i = 0; i < HISTOGRAM_BUCKETS; i++) {
128 double lower = i * HISTOGRAM_RANGE / HISTOGRAM_BUCKETS;
129 double upper = (i+1) * HISTOGRAM_RANGE / HISTOGRAM_BUCKETS;
130 if (i == HISTOGRAM_BUCKETS -1) upper = INFINITY;
131 printf("[%3.4f, %3.4f): %11" PRIu64 "\n", lower, upper, stats.error_histogram[i]);
132 }
133 }
134}
135
136// copied from ggml.h - verify that we can access this as a flat array
137static bool tensor_is_contiguous(const struct ggml_tensor * tensor) {

Callers 2

test_roundtrip_on_layerFunction · 0.85
mainFunction · 0.85

Calls 1

find_quantileFunction · 0.85

Tested by

no test coverage detected