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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Q1z/Pivot", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download serving/typed_decisions.py from Q1z/Pivot: direct link, hf CLI and curl.
- Browser
- Download file 733 Bytes
-
https://huggingface.co/Q1z/Pivot/resolve/main/serving/typed_decisions.py
- Command line
-
hf download hf://Q1z/Pivot/serving/typed_decisions.py
-
curl -L -o typed_decisions.py https://huggingface.co/Q1z/Pivot/resolve/main/serving/typed_decisions.py
733 Bytes
| """One context, three typed questions using Pivot's bundled runtime.""" | |
| import torch | |
| from transformers import AutoModel, AutoTokenizer | |
| repo = "Q1z/Pivot" | |
| tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True) | |
| model = AutoModel.from_pretrained(repo, trust_remote_code=True, dtype=torch.float32).eval() | |
| response = model.decide( | |
| tokenizer, | |
| "Customer dispute: invoice 120 vs PO 100, age=3d, region=US", | |
| [ | |
| {"id": "route", "primitive": "choice", | |
| "options": ["billing", "tech", "sales"]}, | |
| {"id": "approve", "primitive": "noul", | |
| "options": ["true", "false"]}, | |
| {"id": "severity", "primitive": "score", | |
| "options": ["0", "1", "2", "3"]}, | |
| ], | |
| ) | |
| print(response) | |