Instructions to use damerajee/GPT-Vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use damerajee/GPT-Vision with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import GPTVision model = GPTVision.from_pretrained("damerajee/GPT-Vision", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_gpt2vision.py
Browse files- modeling_gpt2vision.py +1 -0
modeling_gpt2vision.py
CHANGED
|
@@ -79,6 +79,7 @@ class GPT2Vision(PreTrainedModel):
|
|
| 79 |
}
|
| 80 |
|
| 81 |
def preprocess_inputs(self, batch):
|
|
|
|
| 82 |
images = batch['images']
|
| 83 |
input_ids = batch['input_ids'].to(self.device)
|
| 84 |
attention_mask = batch['attention_mask'].to(self.device)
|
|
|
|
| 79 |
}
|
| 80 |
|
| 81 |
def preprocess_inputs(self, batch):
|
| 82 |
+
print("batch",batch)
|
| 83 |
images = batch['images']
|
| 84 |
input_ids = batch['input_ids'].to(self.device)
|
| 85 |
attention_mask = batch['attention_mask'].to(self.device)
|