Update README.md
Browse files
README.md
CHANGED
@@ -49,14 +49,14 @@ See https://llava-vl.github.io/ for more details.
|
|
49 |
usage is as follows
|
50 |
|
51 |
```python
|
52 |
-
from transformers import LlavaProcessor,
|
53 |
from PIL import Image
|
54 |
import requests
|
55 |
import torch
|
56 |
|
57 |
PATH_TO_CONVERTED_WEIGHTS = "shauray/Llava-Llama-2-7B-hf"
|
58 |
|
59 |
-
model =
|
60 |
device_map="cuda",torch_dtype=torch.float16).to("cuda")
|
61 |
processor = LlavaProcessor.from_pretrained(PATH_TO_CONVERTED_WEIGHTS)
|
62 |
|
|
|
49 |
usage is as follows
|
50 |
|
51 |
```python
|
52 |
+
from transformers import LlavaProcessor, LlavaForCausalLM
|
53 |
from PIL import Image
|
54 |
import requests
|
55 |
import torch
|
56 |
|
57 |
PATH_TO_CONVERTED_WEIGHTS = "shauray/Llava-Llama-2-7B-hf"
|
58 |
|
59 |
+
model = LlavaForCausalLM.from_pretrained(PATH_TO_CONVERTED_WEIGHTS,
|
60 |
device_map="cuda",torch_dtype=torch.float16).to("cuda")
|
61 |
processor = LlavaProcessor.from_pretrained(PATH_TO_CONVERTED_WEIGHTS)
|
62 |
|