From 18f9f7bef960b76b693d8dcbb33cbbd6148c1631 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 23 Sep 2026 12:51:35 +0200 Subject: [PATCH] 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. --- examples/model-conversion/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/model-conversion/Makefile b/examples/model-conversion/Makefile index 0130b0493b..b80dc0f411 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}