Instructions to use Elron/bleurt-tiny-512 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Elron/bleurt-tiny-512 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Elron/bleurt-tiny-512")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Elron/bleurt-tiny-512") model = AutoModelForSequenceClassification.from_pretrained("Elron/bleurt-tiny-512") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -19,7 +19,7 @@ references = ["hello world", "hello world"]
|
|
| 19 |
candidates = ["hi universe", "bye world"]
|
| 20 |
|
| 21 |
with torch.no_grad():
|
| 22 |
-
scores = model(**tokenizer(references, candidates, return_tensors='pt'))[0]
|
| 23 |
|
| 24 |
-
print(scores) # tensor([
|
| 25 |
```
|
|
|
|
| 19 |
candidates = ["hi universe", "bye world"]
|
| 20 |
|
| 21 |
with torch.no_grad():
|
| 22 |
+
scores = model(**tokenizer(references, candidates, return_tensors='pt'))[0].squeeze()
|
| 23 |
|
| 24 |
+
print(scores) # tensor([-0.9414, -0.5678])
|
| 25 |
```
|