Mizukiluke
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -19,10 +19,11 @@ Github: [mPLUG-Owl](https://github.com/X-PLUG/mPLUG-Owl)
|
|
19 |
Load the mPLUG-Owl3. We now only support attn_implementation in ```['sdpa', 'flash_attention_2']```.
|
20 |
```Python
|
21 |
import torch
|
22 |
-
|
|
|
23 |
print(config)
|
24 |
# model = mPLUGOwl3Model(config).cuda().half()
|
25 |
-
model = mPLUGOwl3Model.from_pretrained(
|
26 |
model.eval().cuda()
|
27 |
```
|
28 |
Chat with images.
|
|
|
19 |
Load the mPLUG-Owl3. We now only support attn_implementation in ```['sdpa', 'flash_attention_2']```.
|
20 |
```Python
|
21 |
import torch
|
22 |
+
model_path = 'mPLUG/mPLUG-Owl3-7B-240728'
|
23 |
+
config = mPLUGOwl3Config.from_pretrained(model_path)
|
24 |
print(config)
|
25 |
# model = mPLUGOwl3Model(config).cuda().half()
|
26 |
+
model = mPLUGOwl3Model.from_pretrained(model_path, attn_implementation='sdpa', torch_dtype=torch.half)
|
27 |
model.eval().cuda()
|
28 |
```
|
29 |
Chat with images.
|