Instructions to use tunis-ai/TunBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tunis-ai/TunBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="tunis-ai/TunBERT", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("tunis-ai/TunBERT", trust_remote_code=True) model = AutoModelForSequenceClassification.from_pretrained("tunis-ai/TunBERT", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Labels
hi, can you put the meaning of labels (Label_0, Label_1, Label_2, ...)
Hi @kmailiaymen10
I haven't done that yet due to the model head having bias in the output head instead of just 2, this complicated things as between 4 classes now I couldn't figure out how to decode them as highlighted in https://huggingface.co/tunis-ai/TunBERT/discussions/3
I would appreciate it if you have any leads, or if you want to dig things up, you can find their repo at https://github.com/instadeepai/tunbert/tree/main
Else, I can give it an eye when I have some time.
If this is high priority for you please highlight it so i can move it up my agenda.
thanks π€
@kmailiaymen10
sorry for the much belated delai, i totally forgot that this existed.
it was not related to the bias parameter, you can find more details in the https://huggingface.co/tunis-ai/TunBERT/blob/main/modeling_tunbert.py#L31-L35
I will be closing this since this has been fixed π€