Feature Extraction
Transformers
Safetensors
pivot
decision-making
classification
scoring
custom_code
Instructions to use Q1z/Pivot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Q1z/Pivot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Q1z/Pivot", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Q1z/Pivot", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 792 Bytes
7c85c7e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | """Structured decisions keep candidate IDs out of the option encoder."""
import torch
from transformers import AutoModel, AutoTokenizer
MODEL = "Q1z/Pivot"
tokenizer = AutoTokenizer.from_pretrained(MODEL, trust_remote_code=True)
model = AutoModel.from_pretrained(MODEL, trust_remote_code=True, dtype=torch.float32).eval()
decision = model.decide_native(
tokenizer,
"A customer disputes an invoice and asks for a billing correction.",
[
{"id": "billing", "text": "route to billing support"},
{"id": "technical", "text": "route to technical support"},
{"id": "sales", "text": "route to sales"},
{"id": "abstain", "text": "none of these routes is appropriate", "kind": "abstain"},
],
)
print(decision["selected"])
print(decision["prob_vector"])
|