Skip to content

Conversation

@loci-dev
Copy link

Mirrored from ggml-org/llama.cpp#18281

This commit adds support for saving logits to files in the evaluation callback example. Two files are stored which is a binary file and a text file for manual inspection.

Two options have been added to this example:

----- example-specific params -----

--save-logits                           save final logits to files for verification (default: false)
--logits-output-dir DIR                 directory for saving logits output files (default: data

This motivation for this change (and follow up changes) is to replace llama-logits in examples/model-conversion, which stores logits so they can be compared to the original models logits.

Future commits will add more of the features that are currently in llama-logits, like printing the prompt and token ids, and also enhance this to also store the logits and token ids so that they can also be compared as part of the verification process.

This commit adds support for saving logits to files in the evaluation
callback example. Two files are stored which is a binary file and a text
file for manual inspection.

Two options have been added to this example:
```console
----- example-specific params -----

--save-logits                           save final logits to files for verification (default: false)
--logits-output-dir PATH                directory for saving logits output files (default: data)
```

This motivation for this change (and follow up changes) is to replace
llama-logits in examples/model-conversion, which stores logits so they
can be compared to the original models logits.

Future commits will add more of the features that are currently in
llama-logits, like printing the prompt and token ids, and also enhance
this to also store the logits and token ids so that they can also be
compared as part of the verification process.
@loci-dev loci-dev force-pushed the main branch 2 times, most recently from 7ac0e44 to 5b544dd Compare December 22, 2025 12:15
@loci-dev loci-dev force-pushed the main branch 2 times, most recently from 26a6f0f to cf53bc9 Compare December 22, 2025 14:09
@DajanaV DajanaV closed this Dec 22, 2025
@DajanaV DajanaV deleted the upstream-PR18281-branch_danbev-eval-callback-save-logits branch December 22, 2025 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants