Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/parallel often produces truncated outputs #5601

Closed
k-gyuhak opened this issue Feb 20, 2024 · 3 comments
Closed

/parallel often produces truncated outputs #5601

k-gyuhak opened this issue Feb 20, 2024 · 3 comments

Comments

@k-gyuhak
Copy link

I encountered an unexpected behavior when running in the following command:

./parallel -m ./models/llama_7b/llama-2-7b/ggml-model-f16.gguf -t 1 -ngl 100 -c 4096 -b 512 -s 1 -np 8 -ns 128 -n 100 -cb,

following the instruction for Serving multiple clients with parallel decoding and continuous batching (#3749 (comment)).

The model truncates the outputs for some prompts. For instance, the model stoped generating outputs after "... for gettting started:" as shown in the image below:
Screenshot 2024-02-19 at 4 30 03 PM

A similar behavior is observed with mixtral-8x7b-instruct using the following command:

./parallel -m ./models--mistralai--Mixtral-8x7B-Instruct-v0.1/ggml-model-Q4_K_M.gguf -c 8192 -ngl 100 -f ~/data1_10.txt -n 2000 --temp 0.5 --top-p 0.9 --color --in-prefix "[INST]" --in-suffix "[/INST]" -b 8192 -np 2 -ns 10 -cb -t 1.

As shown in the image below, the model truncates output after "... The transcript '".

Screenshot 2024-02-19 at 4 40 20 PM

This behavior disappears when I provide the same prompt to ./main.

I am using 4 A100s.

@slaren
Copy link
Member

slaren commented Feb 20, 2024

The parallel example has a few hard-coded stop strings, including the new line. You are also limiting the sequences to 100 tokens with -n 100.

https://github.com/ggerganov/llama.cpp/blob/633782b8d949f24b619e6c68ee37b5cc79167173/examples/parallel/parallel.cpp#L357-L361

@k-gyuhak
Copy link
Author

The parallel example has a few hard-coded stop strings, including the new line. You are also limiting the sequences to 100 tokens with -n 100.

https://github.com/ggerganov/llama.cpp/blob/633782b8d949f24b619e6c68ee37b5cc79167173/examples/parallel/parallel.cpp#L357-L361

The behavior still persists with large -n values (e.g., -n 5000). Is there a way to specify stop strings in the model response to prevent the truncation?

@k-gyuhak k-gyuhak reopened this Feb 20, 2024
@github-actions github-actions bot added the stale label Mar 22, 2024
Copy link
Contributor

github-actions bot commented Apr 6, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as completed Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants