Text Classification
Transformers
Safetensors
English
Korean
Japanese
qev_decision_merged
feature-extraction
qev
typed-decision
custom-code
bf16
custom_code
Instructions to use querypieai/QEV-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use querypieai/QEV-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="querypieai/QEV-9B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("querypieai/QEV-9B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,121 Bytes
96adfbe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | """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))
|