Skip to content

Segfault when running KL Divergence on both Windows & WSL #5166

Closed
@kalomaze

Description

@kalomaze

I followed the instructions outlined in the KL Divergence PR to the best of my ability:

  • perplexity.exe -m "C:\Users\Kalo\Documents\GitHub\llamacpp_git\examples\dpo_7b_quant\DPO_7b_q8_0.gguf" -f "C:\Users\Kalo\Downloads\8k_redo.txt" --kl-divergence-base 8k_redo_data.dat -ngl 33
image

On disk, the file is saved:

image

Then, I use this data file like how it was specified to be used in the PR, and it silently errors:

  • perplexity.exe -m "C:\Users\Kalo\Documents\GitHub\llamacpp_git\examples\dpo_7b_quant\DPO_7b_IQ2_XXS_combrandt1.gguf" --kl-divergence-base "C:\Users\Kalo\Documents\GitHub\llamacpp_git\cmake_build\bin\Release\8k_redo_data.dat" --kl-divergence -ngl 33
image

Attempting to repeat this process from start to finish on WSL rather than Windows caused a segfault after it hanging for ~20 seconds.
Attempting to remove kl-divergence mentions that the data "only tokenizes to one token".

perplexity: saving all logits to C:\Users\Kalo\Documents\GitHub\llamacpp_git\cmake_build\bin\Release\8k_redo_data.dat
perplexity: tokenizing the input ..
perplexity: tokenization took 0.459 ms
perplexity: you need at least 1024 tokens to evaluate perplexity with a context of 512
perplexity: the data file you provided tokenizes to only 1 tokens

I tried cleaning the build files in Visual Studio, reconfiguring cmake, rebuilding from scratch, etc, and I get the same issue.
Perplexity and imatrix calculations otherwise work as you would expect, I have no issues with those.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions