Skip to content

Commit a332d57

Browse files
gguf-viewer: stream slice stats via radix quantile pass for precise P1–P99 scaling & automatic heatmap scale init
1 parent 2a7f260 commit a332d57

File tree

2 files changed

+317
-137
lines changed

2 files changed

+317
-137
lines changed

tools/gguf-viewer/public/heatmap.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,8 @@ async function fetchHeatmapWindow() {
620620
void fetchHistogram();
621621
}
622622
if (sliceChanged) {
623-
void fetchSliceProperties();
623+
const shouldApplyScale = !heatmapState.scaleInitialized;
624+
void fetchSliceProperties({ applyScale: shouldApplyScale });
624625
}
625626

626627
heatmapState.viewMin = typeof data.min === "number" ? data.min : undefined;
@@ -857,6 +858,8 @@ function openHeatmap(nameEncoded, options = {}) {
857858
syncHeatmapControls();
858859
setHeatmapOverlay("Preparing heatmap…", "loading");
859860
void fetchHeatmapWindow();
861+
const shouldApplySliceScale = !heatmapState.pendingScale;
862+
void fetchSliceProperties({ slice: heatmapState.slice, applyScale: shouldApplySliceScale });
860863
updateHeatmapUrlState({ syncPending: true });
861864

862865
pendingHeatmapState = {

0 commit comments

Comments
 (0)