Mizukiluke commited on
Commit
512a4c1
·
verified ·
1 Parent(s): a465221

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -2
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
- config = mPLUGOwl3Config.from_pretrained('./checkpoint_240728')
 
23
  print(config)
24
  # model = mPLUGOwl3Model(config).cuda().half()
25
- model = mPLUGOwl3Model.from_pretrained('./checkpoint_240728', attn_implementation='sdpa', torch_dtype=torch.half)
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.