Instructions to use rrivera1849/LUAR-CRUD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rrivera1849/LUAR-CRUD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="rrivera1849/LUAR-CRUD", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("rrivera1849/LUAR-CRUD", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
b8ec044
1
Parent(s): 7255cd4
Update README.md
Browse files
README.md
CHANGED
|
@@ -46,6 +46,10 @@ print(tokenized_text["attention_mask"].size()) # torch.Size([3, 16, 32])
|
|
| 46 |
|
| 47 |
out = model(**tokenized_text)
|
| 48 |
print(out.size()) # torch.Size([3, 512])
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
```
|
| 50 |
|
| 51 |
## Citing & Authors
|
|
|
|
| 46 |
|
| 47 |
out = model(**tokenized_text)
|
| 48 |
print(out.size()) # torch.Size([3, 512])
|
| 49 |
+
|
| 50 |
+
# to get the Transformer attentions:
|
| 51 |
+
out, attentions = model(**tokenized_text, output_attentions=True)
|
| 52 |
+
print(attentions[0].size()) # torch.Size([48, 12, 32, 32])
|
| 53 |
```
|
| 54 |
|
| 55 |
## Citing & Authors
|