Downloads · 30 days
924
8% of all-time downloads
sagui-nlp/debertinha-ptbr-xsmall
debertinha-ptbr-xsmall is a feature extraction model from sagui-nlp. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as mit.
We have received feedback of people getting poor results on unbalanced datasets. A more robust training script, like scaling the loss and adding weight decay (1e-3 to 1e-5) seems to fix it.
Downloads · 30 days
924
8% of all-time downloads
All-time downloads
11.9K
Public
Parameters
40.8M
326 MB on disk
Likes
16
Trending 1
Click a slice to open those files.
.bin163 MB · 49%
From the Hugging Face model README
We have received feedback of people getting poor results on unbalanced datasets. A more robust training script, like scaling the loss and adding weight decay (1e-3 to 1e-5) seems to fix it.
Please refer to this notebook to check how performance on unbalanced datasets can be improved.
If you have any problems using the model, please contact us.
Thanks!
DeBERTinha is a pretrained DeBERTa model for Brazilian Portuguese.
| Model | Arch. | #Params |
|---|---|---|
sagui-nlp/debertinha-ptbr-xsmall | DeBERTa-V3-Xsmall | 40M |
from transformers import AutoTokenizer
from transformers import AutoModelForPreTraining
from transformers import AutoModel
model = AutoModelForPreTraining.from_pretrained('sagui-nlp/debertinha-ptbr-xsmall')
tokenizer = AutoTokenizer.from_pretrained('sagui-nlp/debertinha-ptbr-xsmall')
import torch
model = AutoModel.from_pretrained('sagui-nlp/debertinha-ptbr-xsmall')
input_ids = tokenizer.encode('Tinha uma pedra no meio do caminho.', return_tensors='pt')
with torch.no_grad():
outs = model(input_ids)
encoded = outs.last_hidden_state[0, 0] # Take [CLS] special token representation
If you use our work, please cite:
@misc{campiotti2023debertinha,
title={DeBERTinha: A Multistep Approach to Adapt DebertaV3 XSmall for Brazilian Portuguese Natural Language Processing Task},
author={Israel Campiotti and Matheus Rodrigues and Yuri Albuquerque and Rafael Azevedo and Alyson Andrade},
year={2023},
eprint={2309.16844},
archivePrefix={arXiv},
primaryClass={cs.CL}
}