d-rau commited on
Commit
4b0ecf6
·
verified ·
1 Parent(s): 424862d

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +3 -3
  2. config.json +3 -0
README.md CHANGED
@@ -79,7 +79,7 @@ The following example loads an image from a URL and asks the model to describe i
79
 
80
  ```python
81
  import torch
82
- from transformers import AutoModelForCausalLM, AutoProcessor
83
 
84
  model_id = "CohereLabs/North-Micro-Vision-Instruct"
85
 
@@ -87,7 +87,7 @@ processor = AutoProcessor.from_pretrained(
87
  model_id,
88
  trust_remote_code=True,
89
  )
90
- model = AutoModelForCausalLM.from_pretrained(
91
  model_id,
92
  dtype="auto",
93
  device_map="auto",
@@ -95,7 +95,7 @@ model = AutoModelForCausalLM.from_pretrained(
95
  )
96
 
97
  # To enable Flash Attention 2, load the model with the following settings:
98
- # model = AutoModelForCausalLM.from_pretrained(
99
  # model_id,
100
  # dtype=torch.bfloat16,
101
  # attn_implementation="flash_attention_2",
 
79
 
80
  ```python
81
  import torch
82
+ from transformers import AutoModelForImageTextToText, AutoProcessor
83
 
84
  model_id = "CohereLabs/North-Micro-Vision-Instruct"
85
 
 
87
  model_id,
88
  trust_remote_code=True,
89
  )
90
+ model = AutoModelForImageTextToText.from_pretrained(
91
  model_id,
92
  dtype="auto",
93
  device_map="auto",
 
95
  )
96
 
97
  # To enable Flash Attention 2, load the model with the following settings:
98
+ # model = AutoModelForImageTextToText.from_pretrained(
99
  # model_id,
100
  # dtype=torch.bfloat16,
101
  # attn_implementation="flash_attention_2",
config.json CHANGED
@@ -142,6 +142,9 @@
142
  "model_type": "cohere_compass_vision",
143
  "output_attentions": false
144
  },
 
 
 
145
  "image_token_id": 255031,
146
  "video_token_id": 255032,
147
  "vision_start_token_id": 255028,
 
142
  "model_type": "cohere_compass_vision",
143
  "output_attentions": false
144
  },
145
+ "fusion_config": {
146
+ "patch_embeddings": true
147
+ },
148
  "image_token_id": 255031,
149
  "video_token_id": 255032,
150
  "vision_start_token_id": 255028,