Commit
•
1259a00
1
Parent(s):
3f9b28a
Update README.md
Browse files
README.md
CHANGED
@@ -90,10 +90,10 @@ import requests
|
|
90 |
from PIL import Image
|
91 |
|
92 |
import torch
|
93 |
-
from transformers import AutoProcessor,
|
94 |
|
95 |
model_id = "llava-hf/llava-onevision-qwen2-72b-ov-hf"
|
96 |
-
model =
|
97 |
model_id,
|
98 |
torch_dtype=torch.float16,
|
99 |
low_cpu_mem_usage=True,
|
@@ -130,7 +130,7 @@ print(processor.decode(output[0][2:], skip_special_tokens=True))
|
|
130 |
First make sure to install `bitsandbytes`, `pip install bitsandbytes` and make sure to have access to a CUDA compatible GPU device. Simply change the snippet above with:
|
131 |
|
132 |
```diff
|
133 |
-
model =
|
134 |
model_id,
|
135 |
torch_dtype=torch.float16,
|
136 |
low_cpu_mem_usage=True,
|
@@ -143,7 +143,7 @@ model = LlavaNextForConditionalGeneration.from_pretrained(
|
|
143 |
First make sure to install `flash-attn`. Refer to the [original repository of Flash Attention](https://github.com/Dao-AILab/flash-attention) regarding that package installation. Simply change the snippet above with:
|
144 |
|
145 |
```diff
|
146 |
-
model =
|
147 |
model_id,
|
148 |
torch_dtype=torch.float16,
|
149 |
low_cpu_mem_usage=True,
|
|
|
90 |
from PIL import Image
|
91 |
|
92 |
import torch
|
93 |
+
from transformers import AutoProcessor, LlavaOnevisionForConditionalGeneration
|
94 |
|
95 |
model_id = "llava-hf/llava-onevision-qwen2-72b-ov-hf"
|
96 |
+
model = LlavaOnevisionForConditionalGeneration.from_pretrained(
|
97 |
model_id,
|
98 |
torch_dtype=torch.float16,
|
99 |
low_cpu_mem_usage=True,
|
|
|
130 |
First make sure to install `bitsandbytes`, `pip install bitsandbytes` and make sure to have access to a CUDA compatible GPU device. Simply change the snippet above with:
|
131 |
|
132 |
```diff
|
133 |
+
model = LlavaOnevisionForConditionalGeneration.from_pretrained(
|
134 |
model_id,
|
135 |
torch_dtype=torch.float16,
|
136 |
low_cpu_mem_usage=True,
|
|
|
143 |
First make sure to install `flash-attn`. Refer to the [original repository of Flash Attention](https://github.com/Dao-AILab/flash-attention) regarding that package installation. Simply change the snippet above with:
|
144 |
|
145 |
```diff
|
146 |
+
model = LlavaOnevisionForConditionalGeneration.from_pretrained(
|
147 |
model_id,
|
148 |
torch_dtype=torch.float16,
|
149 |
low_cpu_mem_usage=True,
|