Instructions to use StarryXCN/bert-chinese-lora-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use StarryXCN/bert-chinese-lora-sentiment with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("/home/starryx/llm_lib/model--google-bert--bert-base-chinese") model = PeftModel.from_pretrained(base_model, "StarryXCN/bert-chinese-lora-sentiment") - Transformers
How to use StarryXCN/bert-chinese-lora-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="StarryXCN/bert-chinese-lora-sentiment")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("StarryXCN/bert-chinese-lora-sentiment", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!