--- base_model: HooshvareLab/bert-base-parsbert-uncased tags: - generated_from_trainer metrics: - precision - recall - accuracy model-index: - name: Persian-Text-Sentiment-Bert-LORA results: [] license: mit language: - fa library_name: peft pipeline_tag: text-classification datasets: - SeyedAli/Persian-Text-Sentiment --- # Persian-Text-Sentiment-Bert-LORA This model is a Adapter for [HooshvareLab/bert-base-parsbert-uncased](https://huggingface.co/HooshvareLab/bert-base-parsbert-uncased) on [SeyedAli/Persian-Text-Sentiment](https://huggingface.co/datasets/SeyedAli/Persian-Text-Sentiment) dataset in Persian Sentment Analysis Task. It achieves the following results on the evaluation set: - Loss: 0.3427 - Precision: 0.8579 - Recall: 0.8543 - F1-score: 0.8540 - Accuracy: 0.8543 ## Model description More information needed ## Intended uses & limitations This is how to use this model in an example ```python from peft import PeftModel from transformers import pipeline modelname="SeyedAli/Persian-Text-Sentiment-Bert-LORA" tokenizer=AutoTokenizer.from_pretrained("HooshvareLab/bert-base-parsbert-uncased") model=AutoModelForSequenceClassification.from_pretrained("HooshvareLab/bert-base-parsbert-uncased") model = PeftModel.from_pretrained(model, modelname) pipe = pipeline("text-classification", model=model,tokenizer=tokenizer) pipe('خیلی کتاب خوبی بود') ``` ## Training and evaluation data More information needed ## Training procedure ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 2e-05 - train_batch_size: 16 - eval_batch_size: 16 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 10 ### Training results | Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1-score | Accuracy | |:-------------:|:-----:|:-----:|:---------------:|:---------:|:------:|:--------:|:--------:| | 0.3939 | 1.0 | 3491 | 0.3835 | 0.8457 | 0.8404 | 0.8398 | 0.8404 | | 0.3722 | 2.0 | 6982 | 0.3677 | 0.8513 | 0.8457 | 0.8451 | 0.8457 | | 0.3553 | 3.0 | 10473 | 0.3576 | 0.8539 | 0.8495 | 0.8491 | 0.8495 | | 0.3618 | 4.0 | 13964 | 0.3525 | 0.8546 | 0.8513 | 0.8509 | 0.8513 | | 0.3534 | 5.0 | 17455 | 0.3485 | 0.8557 | 0.8521 | 0.8517 | 0.8521 | | 0.3423 | 6.0 | 20946 | 0.3470 | 0.8562 | 0.8530 | 0.8526 | 0.8530 | | 0.3455 | 7.0 | 24437 | 0.3453 | 0.8573 | 0.8535 | 0.8531 | 0.8535 | | 0.347 | 8.0 | 27928 | 0.3428 | 0.8575 | 0.8539 | 0.8535 | 0.8539 | | 0.344 | 9.0 | 31419 | 0.3429 | 0.8578 | 0.8546 | 0.8542 | 0.8546 | | 0.335 | 10.0 | 34910 | 0.3427 | 0.8579 | 0.8543 | 0.8540 | 0.8543 | ### Framework versions - Transformers 4.35.1 - Pytorch 2.1.0+cu118 - Datasets 2.14.6 - Tokenizers 0.14.1