Commit 18f9f7bef for llama.cpp
commit 18f9f7bef960b76b693d8dcbb33cbbd6148c1631
Author: Daniel Bevenius <daniel.bevenius@gmail.com>
Date: Wed Sep 23 12:51:35 2026 +0200
model-conversion : add causal-compare-logits recipe (#29305)
This commit adds a new recipe/target to the Makefile which allows the
logits verification to be run on pre-existing model outputs.
The motivation for this is that for large models it can take a long time
to run them models, and especially for the original model which seldom
changes this is very time consuming. With this change we can run the
original model one which will store the tokens and logits, and then
manually run the converted model and the run use this recipe to verify
them against the orignal model.
diff --git a/examples/model-conversion/Makefile b/examples/model-conversion/Makefile
index 0130b0493..b80dc0f41 100644
--- a/examples/model-conversion/Makefile
+++ b/examples/model-conversion/Makefile
@@ -68,6 +68,9 @@ causal-run-converted-model:
@CONVERTED_MODEL="$(CONVERTED_MODEL)" ./scripts/causal/run-converted-model.sh
causal-verify-logits: causal-run-original-model causal-run-converted-model
+ $(MAKE) causal-compare-logits
+
+causal-compare-logits:
@MODEL_PATH="$(MODEL_PATH)" ./scripts/causal/compare-logits.py
@MODEL_PATH="$(MODEL_PATH)" ./scripts/utils/check-nmse.py -m ${MODEL_PATH}