Instructions to use vllm-sr/qwen3_generative_classifier_r16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use vllm-sr/qwen3_generative_classifier_r16 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-0.6B") model = PeftModel.from_pretrained(base_model, "vllm-sr/qwen3_generative_classifier_r16") - Transformers
How to use vllm-sr/qwen3_generative_classifier_r16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="vllm-sr/qwen3_generative_classifier_r16")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("vllm-sr/qwen3_generative_classifier_r16", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,171 Bytes
0f27c62 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | {
"label2id": {
"biology": 0,
"business": 1,
"chemistry": 2,
"computer science": 3,
"economics": 4,
"engineering": 5,
"health": 6,
"history": 7,
"law": 8,
"math": 9,
"other": 10,
"philosophy": 11,
"physics": 12,
"psychology": 13
},
"id2label": {
"0": "biology",
"1": "business",
"2": "chemistry",
"3": "computer science",
"4": "economics",
"5": "engineering",
"6": "health",
"7": "history",
"8": "law",
"9": "math",
"10": "other",
"11": "philosophy",
"12": "physics",
"13": "psychology"
},
"instruction_template": "You are an expert academic classifier. Classify the following question into exactly ONE category. Respond with ONLY the category name.\n\nCategories: biology, business, chemistry, computer science, economics, engineering, health, history, law, math, other, philosophy, physics, psychology\n\nExamples:\nQ: What is the optimal capital structure for a corporation?\nA: business\n\nQ: How do neurons transmit signals?\nA: biology\n\nQ: What are the principles of contract law?\nA: law\n\nNow classify this question:\nQ: {question}\nA:"
} |