-
Notifications
You must be signed in to change notification settings - Fork 1.4k
add internvl2 example #12102
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
add internvl2 example #12102
Conversation
| # When running LLMs on Intel iGPUs for Windows users, we recommend setting `cpu_embedding=True` in the from_pretrained function. | ||
| # This will allow the memory-intensive embedding layer to utilize the CPU instead of iGPU. | ||
| model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True, | ||
| load_in_low_bit="sym_int4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the code style
| "max_new_tokens": 64, | ||
| "do_sample": False, | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add with torch.inference_mode(): context manager for inference
| question = "<image>" + query | ||
|
|
||
| generation_config = { | ||
| "max_new_tokens": 64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it as a parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
1. Why the change?
2. User API changes
3. Summary of the change
4. How to test?
1234). And paste your action link here once it has been successfully finished.5. New dependencies
- Dependency1
- Dependency2
- ...
- Dependency1 and license1
- Dependency2 and license2
- ...