RaushanTurganbay HF staff commited on
Commit
4c5a5e4
1 Parent(s): 9e88a84

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -90,10 +90,10 @@ import requests
90
  from PIL import Image
91
 
92
  import torch
93
- from transformers import AutoProcessor, LlavaNextForConditionalGeneration
94
 
95
  model_id = "llava-hf/llava-onevision-qwen2-7b-ov-hf"
96
- model = LlavaNextForConditionalGeneration.from_pretrained(
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 = LlavaNextForConditionalGeneration.from_pretrained(
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 = LlavaNextForConditionalGeneration.from_pretrained(
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-7b-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,