Text Classification
PEFT
Safetensors
Transformers
Arabic
bert
bert-base
lora
parameter-efficient-fine-tuning
huggingface
ag-news
nlp
Instructions to use NightPrince/peft-bert-agnews with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use NightPrince/peft-bert-agnews with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("bert-base-uncased") model = PeftModel.from_pretrained(base_model, "NightPrince/peft-bert-agnews") - Transformers
How to use NightPrince/peft-bert-agnews with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="NightPrince/peft-bert-agnews")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("NightPrince/peft-bert-agnews", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Ctrl+K