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

Expose a function to update exllama max input length #281

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

fxmarty
Copy link
Collaborator

@fxmarty fxmarty commented Aug 24, 2023

Exllama requires to set a buffer on the C++ side in the act-order case, so as to reorder the activations. Although by default this buffer is of length 2048, we provide an API to allow to change the size of this buffer:

from auto_gptq import exllama_set_max_input_length
model = exllama_set_max_input_length(model, 4096)

Fixes #253

Test with: CUDA_VISIBLE_DEVICES=0 pytest tests/test_q4.py -k "test_exllama_buffer_size" -s

@PanQiWei I think it would be worth a patch release, what do you think?

Copy link
Collaborator

@PanQiWei PanQiWei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for this pr @fxmarty !

@PanQiWei PanQiWei merged commit 8bb4d60 into AutoGPTQ:main Aug 24, 2023
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.

[BUG] RuntimeError: temp_state buffer is too small
2 participants