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

vllm/llama-vision llava calibration infinite loop fix #343

Merged
merged 15 commits into from
Nov 26, 2024
5 changes: 4 additions & 1 deletion auto_round/mllm/autoround_mllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ def __init__(
truncation = False
batch_size = 1
seqlen = 512 if seqlen is None else seqlen

if quant_nontext_module and batch_size != 1:
logger.warning(f"batch_size({batch_size}) cannot be used for calibrating non-text modules,"
"reset to 1")
batch_size = 1
Copy link
Contributor

Choose a reason for hiding this comment

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

the gradient_accumualte should be changed too

seqlen = 2048 if seqlen is None else seqlen
truncation = True if truncation is None else truncation
self.truncation = truncation
Expand Down
Loading