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
|
@@ -29,7 +29,8 @@ More information needed
|
|
| 29 |
|
| 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 peft import PeftModel
|
| 34 |
import torch
|
| 35 |
|
|
@@ -145,7 +146,8 @@ entities = decode_predictions(text, predictions, word_ids)
|
|
| 145 |
# Mostrar solo entidades relevantes
|
| 146 |
for word, label in entities:
|
| 147 |
if label != "O":
|
| 148 |
-
print(f"{word:35} {label}")
|
|
|
|
| 149 |
|
| 150 |
## Training and evaluation data
|
| 151 |
|
|
|
|
| 29 |
|
| 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
|
| 153 |
|