Text Classification
Transformers
Safetensors
English
Korean
Japanese
qev_decision_merged
feature-extraction
qev
dlp
typed-decision
japanese
bf16
custom_code
Instructions to use querypieai/QEV2.1-12B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use querypieai/QEV2.1-12B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="querypieai/QEV2.1-12B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("querypieai/QEV2.1-12B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download example.py from querypieai/QEV2.1-12B: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/querypieai/QEV2.1-12B/resolve/main/example.py
- Command line
-
hf download hf://querypieai/QEV2.1-12B/example.py
-
curl -L -o example.py https://huggingface.co/querypieai/QEV2.1-12B/resolve/main/example.py
1.12 kB
| """Run the self-contained local folder; optional repo ID after publication.""" | |
| import argparse | |
| import json | |
| from pathlib import Path | |
| from transformers import AutoModel | |
| if __name__ == '__main__': | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument('--model', default=str(Path(__file__).resolve().parent)) | |
| parser.add_argument('--device', default='cuda:0') | |
| args = parser.parse_args() | |
| model = AutoModel.from_pretrained(args.model, trust_remote_code=True, device=args.device) | |
| result = model.decide('The ticket category is security. Routing rule: security goes to Sentinel.', { | |
| 'route': {'type': 'choice', 'instructions': 'Choose the required tool.', | |
| 'criteria': {'ledger': 'Ledger', 'sentinel': 'Sentinel'}}, | |
| 'security': {'type': 'noul', 'instructions': 'Is this a security ticket?', | |
| 'criteria': {'false': 'No', 'true': 'Yes'}}, | |
| 'grade': {'type': 'score', 'instructions': 'Security tickets have high priority.', | |
| 'criteria': ['Low', 'Medium', 'High']} | |
| }) | |
| print(json.dumps(result, ensure_ascii=False, indent=2)) | |