Skip to content

Commit 5324558

Browse files
committed
Update table layout
1 parent 4d1325e commit 5324558

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

tools/imatrix/imatrix.cpp

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,8 +1231,7 @@ static bool show_statistics(const common_params & params) {
12311231
"Entropy",
12321232
"E (norm)",
12331233
"ZD",
1234-
"CosSim"
1235-
);
1234+
"CosSim");
12361235
LOG_INF(
12371236
"=============================================================================================================="
12381237
"=============================================================\n");
@@ -1259,8 +1258,7 @@ static bool show_statistics(const common_params & params) {
12591258
tstat.entropy,
12601259
100.0f * (tstat.entropy / std::log2(tstat.elements)),
12611260
100.0f * tstat.zd_score,
1262-
tstat.cossim
1263-
);
1261+
tstat.cossim);
12641262

12651263
const float w_sum = tstat.elements * tstat.sum_values;
12661264
const float w_zd = tstat.elements * tstat.zd_score;
@@ -1283,8 +1281,12 @@ static bool show_statistics(const common_params & params) {
12831281

12841282
const int layers = std::count_if(ws.begin(), ws.end(), [](const auto & kv) { return kv.first >= 0; });
12851283
LOG_INF("\nComputing weighted average statistics per layer (%d layers)\n", layers);
1286-
LOG_INF("\n%s\t%s\t%s\t%s\n", " Layer", " μΣ(Act²)", " μZD", "μCosSim");
1287-
LOG_INF("================================================\n");
1284+
LOG_INF("\n%6s\t%16s\t%7s\t%11s\n",
1285+
"Layer",
1286+
tensor_calc_mode == 1 ? "μL₂ Norm" : "μΣ(Act²)",
1287+
"μZD",
1288+
"μCosSim");
1289+
LOG_INF("============================================\n");
12881290
for (const auto & [first, second] : ws) {
12891291
const auto & layer = first;
12901292
const auto & stats = second;
@@ -1298,7 +1300,11 @@ static bool show_statistics(const common_params & params) {
12981300
const float w_zd = stats.w_zd / stats.n;
12991301
const float w_cossim = stats.w_cossim / stats.n;
13001302

1301-
LOG_INF("%5d\t%14.2f\t%10.4f%%\t%6.4f\n", layer, bias, 100.0f * zd, cossim);
1303+
LOG_INF("%5d\t%11.2f\t%6.2f%%\t%10.4f\n",
1304+
layer,
1305+
w_sum,
1306+
100.0f * w_zd,
1307+
w_cossim);
13021308
}
13031309
}
13041310
LOG_INF("\n");

0 commit comments

Comments
 (0)