Image-Text-to-Text
PEFT
Safetensors
English
æLtorio commited on
Commit
75b380f
·
unverified ·
1 Parent(s): 5231487

update readme

Browse files
Files changed (1) hide show
  1. README.md +8 -3
README.md CHANGED
@@ -30,10 +30,15 @@ This repository contains a fine-tuned version of the Hugging Face [Idefics3-8B-L
30
  For immediate use, you can load the model directly from Hugging Face:
31
 
32
  ```python
 
33
  import torch
34
- from transformers import AutoModelForImageTextToText
35
- device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
36
- model = AutoModelForImageTextToText.from_pretrained("eltorio/IDEFICS3_ROCO").to(device)
 
 
 
 
37
  ```
38
 
39
  ### Model Information
 
30
  For immediate use, you can load the model directly from Hugging Face:
31
 
32
  ```python
33
+ from transformers import AutoProcessor, Idefics3ForConditionalGeneration, image_utils
34
  import torch
35
+ device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu') # on CPU it requires ≈ 3h/query 🙈
36
+ processor = AutoProcessor.from_pretrained(v)
37
+ model = Idefics3ForConditionalGeneration.from_pretrained(
38
+ v, torch_dtype=torch.bfloat16
39
+ ).to(device)
40
+
41
+ model.load_adapter("eltorio/IDEFICS3_ROCO")
42
  ```
43
 
44
  ### Model Information