Instructions to use jcsagar/CXR-LLAVA-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jcsagar/CXR-LLAVA-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="jcsagar/CXR-LLAVA-v2", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jcsagar/CXR-LLAVA-v2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update CXR_LLAVA_HF.py
Browse files- CXR_LLAVA_HF.py +1 -1
CXR_LLAVA_HF.py
CHANGED
|
@@ -617,7 +617,7 @@ class CXRLLAVAModel(PreTrainedModel):
|
|
| 617 |
input_ids = input_ids.cuda()
|
| 618 |
print('using cuda')
|
| 619 |
else:
|
| 620 |
-
print('using
|
| 621 |
stopping_criteria = KeywordsStoppingCriteria(["</s>"], self.tokenizer, input_ids)
|
| 622 |
|
| 623 |
image_args = {"images": images}
|
|
|
|
| 617 |
input_ids = input_ids.cuda()
|
| 618 |
print('using cuda')
|
| 619 |
else:
|
| 620 |
+
print(f'using device {self.device}')
|
| 621 |
stopping_criteria = KeywordsStoppingCriteria(["</s>"], self.tokenizer, input_ids)
|
| 622 |
|
| 623 |
image_args = {"images": images}
|