chizhikchi/CARES
Viewer โข Updated โข 3.22k โข 35 โข 4
How to use chizhikchi/cares-bert-base with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="chizhikchi/cares-bert-base") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("chizhikchi/cares-bert-base")
model = AutoModelForSequenceClassification.from_pretrained("chizhikchi/cares-bert-base", device_map="auto")