Instructions to use raulgdp/roberta-large-ner-qlorafinetune with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use raulgdp/roberta-large-ner-qlorafinetune with PEFT:
from peft import PeftModel from transformers import AutoModelForTokenClassification base_model = AutoModelForTokenClassification.from_pretrained("FacebookAI/xlm-roberta-large") model = PeftModel.from_pretrained(base_model, "raulgdp/roberta-large-ner-qlorafinetune") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -30,7 +30,7 @@ More information needed
|
|
| 30 |
Para usar el modelo y tratar de que las etiquetas funcionen correctamente les comparto un script que usa el modelo
|
| 31 |
como pipeline:
|
| 32 |
|
| 33 |
-
|
| 34 |
from peft import PeftModel
|
| 35 |
import torch
|
| 36 |
|
|
@@ -146,7 +146,7 @@ entities = decode_predictions(text, predictions, word_ids)
|
|
| 146 |
# Mostrar solo entidades relevantes
|
| 147 |
for word, label in entities:
|
| 148 |
if label != "O":
|
| 149 |
-
print(f"{word:35} {label}")
|
| 150 |
|
| 151 |
|
| 152 |
## Training and evaluation data
|
|
|
|
| 30 |
Para usar el modelo y tratar de que las etiquetas funcionen correctamente les comparto un script que usa el modelo
|
| 31 |
como pipeline:
|
| 32 |
|
| 33 |
+
``` from transformers import AutoConfig, AutoTokenizer, AutoModelForTokenClassification
|
| 34 |
from peft import PeftModel
|
| 35 |
import torch
|
| 36 |
|
|
|
|
| 146 |
# Mostrar solo entidades relevantes
|
| 147 |
for word, label in entities:
|
| 148 |
if label != "O":
|
| 149 |
+
print(f"{word:35} {label}") ```
|
| 150 |
|
| 151 |
|
| 152 |
## Training and evaluation data
|