Instructions to use mantra-coding/alBERTo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mantra-coding/alBERTo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="mantra-coding/alBERTo")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mantra-coding/alBERTo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
bc5a8f2
1
Parent(s): 33a11eb
Update README.md
Browse files
README.md
CHANGED
|
@@ -39,7 +39,7 @@ Here is how to use this model to get the features of a given text in PyTorch:
|
|
| 39 |
from transformers import AutoTokenizer, AutoModelForMaskedLM
|
| 40 |
|
| 41 |
tokenizer = AutoTokenizer.from_pretrained('alBERTo')
|
| 42 |
-
model =
|
| 43 |
|
| 44 |
# prepare input
|
| 45 |
text = """
|
|
|
|
| 39 |
from transformers import AutoTokenizer, AutoModelForMaskedLM
|
| 40 |
|
| 41 |
tokenizer = AutoTokenizer.from_pretrained('alBERTo')
|
| 42 |
+
model = AutoModelForSequenceClassification.from_pretrained("alBERTo")
|
| 43 |
|
| 44 |
# prepare input
|
| 45 |
text = """
|