Stuck at loops in simple questions

#9
by mahdisml - opened

hi ! it Stuck at loops in simple questions
i never had such experience in minicpm 1b

"***\llama-server.exe" -m "***\MiniCPM5-2B-F16.gguf" -c 131072 -n 2048 --temp 1.0 --top-p 0.95

question :
learn me rust language

image

loop happen always !

it will happen other simple questions too

Maybe try using the llama.cpp DRY sampling parameters?

Maybe try using the llama.cpp DRY sampling parameters?

I'm using default recommended settings : https://github.com/OpenBMB/MiniCPM/blob/main/docs/deployment/llama_cpp.md

can somebody test this prompt with VLLM or SGLang ?

Thanks for the detailed report. We looked into this issue and found that it may be related to llama.cpp’s default min_p setting.

llama.cpp defaults to min_p=0.05, which filters out tokens whose probability is below 5% of the highest-probability token. This may remove tokens that could help the model break out of a repetition loop.

Please explicitly set min_p=0.0 in your generation request and let us know whether the issue persists. For example:

curl http://localhost:8893/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
        "model": "MiniCPM5-2B",
        "messages": [
            {"role": "user", "content": "learn me rust language"}
        ],
        "temperature": 1.0,
        "top_p": 0.95,
        "min_p": 0.0,
        "max_tokens": 8192
    }'

Alternatively, you can add --min-p 0.0 to the llama-server command to use it as the server-wide default. Request-level parameters take precedence over server defaults.

We have also updated the llama.cpp usage in the README to explicitly include min_p=0.0. Thank you very much for bringing this issue to our attention!

Sign up or log in to comment