-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Model pads response with newlines up to max_length #26
Comments
I observe the same thing with codellama/CodeLlama-34b-Instruct-hf on Hugging Face Hub. Quite often, the model starts to generate This is using the standard generation params (
|
This one made less newlines, but still way too many than needed:
(Using temp 0.8) |
same problem here. I am basically using llama recipe's quickstart for training and inference. Inference using the same prompt in this repo will work just fine. |
Could you make sure you are using the latest release / main version of transformers? |
I'm actually using LlamaSharp (https://github.com/SciSharp/LLamaSharp) with the ggml model downloaded from TheBloke |
This issue still occurs with revision |
Actually this minimal example works fine on my computer now. A few references 1, 2, 3.
|
After upgrading to the latest version of transformers (4.32.1) and huggingface_hub (0.16.4) with pip this gives me
|
Instead of act as padding, I faced all the output is new line |
cc @marco-ve you should install main using |
Has anyone solved the problem of generating a large number of line breaks? |
You are most probably not using |
@ArthurZucker is correct. The model repeating a token ad infinitum is the results of the Closing this issue. |
I tried several of the models through Huggingface, and the response is always padded with newlines up to the number of tokens specified by the max_length argument in model.generate().
I also assign pad_token_id=tokenizer.eos_token_id, so I'm not sure why the model is generating these newline characters.
The text was updated successfully, but these errors were encountered: