This model was trained from scratch on an unknown dataset.
It achieves the following results on the evaluation set:
The model is a fine-tuned version of BERT for text classification on a specific dataset. It takes a text sequence as input and outputs a probability distribution over the possible classes.
The model is intended to be used for text classification tasks similar to the one it was fine-tuned on. It may not perform well on datasets with significantly different characteristics. Additionally, the model may not be suitable for tasks requiring real-time inference due to its relatively large size and computational requirements.
1from transformers import BertForSequenceClassification, TrainingArguments, Trainer, AutoTokenizer, DataCollatorWithPadding
2model_id = "bert-base-uncased"
3model = BertForSequenceClassification.from_pretrained(model_id, num_labels=3)
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5
6def tokenize(batch):
7 return tokenizer(batch["text"], truncation=True, padding="max_length", max_length=max_source_length, add_special_tokens=True, return_tensors='pt')