TunBERT / README.md
not-lain's picture
Update README.md
4aa8c55
|
raw
history blame
1.19 kB
metadata
license: mit
datasets:
  - tsac
language:
  - ar

This is a converted version of Instadeep's TunBERT from nemo to safetensors.

Make sure to read the original model licence

architectural changes

original model head

image/png

this model head

image/png

how to load the model

from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("not-lain/TunBERT")
model = AutoModelForSequenceClassification.from_pretrained("not-lain/TunBERT",trust_remote_code=True)

how to use the model

text = "[insert text here]"
inputs = tokenizer(text,return_tensors='pt')
output = model(**inputs)

IMPORTANT :

  • Make sure to enable trust_remote_code=True
  • Avoid using the pipeline method