Downloads · 30 days
0
renoLee/lora-business
lora-business is a machine learning model from renoLee. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This is a LoRA fine-tuned version of bert-base-uncased for text classification on the AG News dataset. The model uses the PEFT (Parameter-Efficient Fine-Tuning) method, enabling efficient training with a small number…
Downloads · 30 days
0
Access
Public
Updated Jul 1, 2025
Repo size
1.2 MB
Likes
0
Public
Click a slice to open those files.
.safetensors1.2 MB · 99%
From the Hugging Face model README
This is a LoRA fine-tuned version of bert-base-uncased for text classification on the AG News dataset.
The model uses the PEFT (Parameter-Efficient Fine-Tuning) method, enabling efficient training with a small number of trainable parameters.
bert-base-uncasedThis model uses LoRA adapters to fine-tune BERT for classifying news articles into one of four AG News categories: World, Sports, Business, Sci/Tech.
This model can be used directly for zero-shot or fine-tuned news topic classification using Hugging Face pipelines or transformers.
It can be used as a lightweight adapter in a larger NLP system for topic tagging or news filtering applications.
The model inherits potential bias from the AG News dataset and the base BERT model. It may perform worse on underrepresented or ambiguous topics.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("renoLee/lora-business")
model = AutoModelForSequenceClassification.from_pretrained("renoLee/lora-business")
inputs = tokenizer("Apple launches a new product in California", return_tensors="pt")
outputs = model(**inputs)
The model was fine-tuned using the AG News dataset, which contains 120,000 training samples and 7,600 test samples. Each sample is a short news article categorized into one of four classes:
The base model bert-base-uncased was fine-tuned using LoRA adapters via the PEFT library, enabling efficient parameter tuning with minimal compute resources.
bert-base-uncased tokenizermax_length| Hyperparameter | Value |
|---|---|
LoRA rank r | 8 |
| LoRA alpha | 16 |
| LoRA dropout | 0.1 |
| Trainable parameters | Adapter layers only |
| Epochs | 3 |
| Batch size | 16 |
| Optimizer | AdamW |
| Learning rate | 5e-5 |
| Loss function | CrossEntropyLoss |
| Precision | FP32 |
| Base model frozen | ✅ Yes (LoRA-only) |
The training process demonstrates that parameter-efficient fine-tuning with LoRA can reach ~94% accuracy on AG News with just a fraction of the compute and memory.
The model was evaluated on the AG News test set (7,600 samples), which contains news articles labeled into four balanced categories.
The evaluation did not segment data by subpopulation (e.g., domain-specific or time-specific factors), but results are assumed to generalize well across general English-language news.
| Metric | Description | Value |
|---|---|---|
| Accuracy | Percentage of correct predictions | ~94% |
| Loss | Cross-entropy loss on validation dataset | Stable |
Accuracy was computed by comparing the predicted class index to the ground truth label using standard classification metrics.
The model achieves ~94% accuracy on the AG News test set using only LoRA adapters (with frozen BERT base), demonstrating that parameter-efficient fine-tuning can yield strong performance with minimal computational cost.
LoRA adapters are highly effective in classification tasks with limited compute. The model shows fast convergence and stable performance.