Run this model with HF Jobs
Run mofawzy/Bert-hard-balanced on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/mofawzy/Bert-hard-balanced. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/mofawzy/Bert-hard-balanced on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use mofawzy/Bert-hard-balanced with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mofawzy/Bert-hard-balanced with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="mofawzy/Bert-hard-balanced")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("mofawzy/Bert-hard-balanced") model = AutoModelForSequenceClassification.from_pretrained("mofawzy/Bert-hard-balanced", device_map="auto") - Notebooks
- Google Colab
- Kaggle
BERT-ASTD Balanced
Arabic version bert model fine tuned on Hotel Arabic Reviews dataset from booking.com (HARD) dataset balanced version to identify sentiments opinion in Arabic language.
Data
The model were fine-tuned on ~93000 book reviews in arabic using bert large arabic
Dataset:
- Train 70%
- Validation: 10%
- Test: 20%
Results
| class | precision | recall | f1-score | Support |
|---|---|---|---|---|
| 0 | 0.9733 | 0.9547 | 0.9639 | 10570 |
| 1 | 0.9555 | 0.9738 | 0.9646 | 10570 |
| Accuracy | 0.9642 | 21140 |
How to use
You can use these models by installing torch or tensorflow and Huggingface library transformers. And you can use it directly by initializing it like this:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_name="mofawzy/Bert-hard-balanced"
model = AutoModelForSequenceClassification.from_pretrained(model_name,num_labels=2)
tokenizer = AutoTokenizer.from_pretrained(model_name)
- Downloads last month
- 7