Instructions to use aehrc/cxrmate-rrg24 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aehrc/cxrmate-rrg24 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="aehrc/cxrmate-rrg24", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("aehrc/cxrmate-rrg24", trust_remote_code=True) model = AutoModel.from_pretrained("aehrc/cxrmate-rrg24", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modelling_cxrrg.py
Browse files- modelling_cxrrg.py +2 -2
modelling_cxrrg.py
CHANGED
|
@@ -504,7 +504,7 @@ class CXRRGModel(VisionEncoderDecoderModel):
|
|
| 504 |
report_seq_len,
|
| 505 |
report_seq_len,
|
| 506 |
),
|
| 507 |
-
dtype=torch.
|
| 508 |
device=causal_2d_attention_mask.device,
|
| 509 |
),
|
| 510 |
)
|
|
@@ -520,7 +520,7 @@ class CXRRGModel(VisionEncoderDecoderModel):
|
|
| 520 |
1,
|
| 521 |
prompt_seq_len,
|
| 522 |
report_seq_len,
|
| 523 |
-
dtype=torch.
|
| 524 |
device=causal_2d_attention_mask.device,
|
| 525 |
)
|
| 526 |
|
|
|
|
| 504 |
report_seq_len,
|
| 505 |
report_seq_len,
|
| 506 |
),
|
| 507 |
+
dtype=torch.float,
|
| 508 |
device=causal_2d_attention_mask.device,
|
| 509 |
),
|
| 510 |
)
|
|
|
|
| 520 |
1,
|
| 521 |
prompt_seq_len,
|
| 522 |
report_seq_len,
|
| 523 |
+
dtype=torch.float,
|
| 524 |
device=causal_2d_attention_mask.device,
|
| 525 |
)
|
| 526 |
|