Text Classification
Transformers
Safetensors
Laya
English
modernbert
feature-extraction
llm-router
model-routing
agents
ai-agents
tool-risk
guardrails
zero-shot-classification
multiple-choice
calibrated-probabilities
jev
decision-model
calibration
mcp
mcp-server
distillation
text-embeddings-inference
Instructions to use gparitosh007/Open-Decision-Model-150M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gparitosh007/Open-Decision-Model-150M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="gparitosh007/Open-Decision-Model-150M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("gparitosh007/Open-Decision-Model-150M") model = AutoModel.from_pretrained("gparitosh007/Open-Decision-Model-150M", device_map="auto") - Laya
How to use gparitosh007/Open-Decision-Model-150M with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
File size: 861 Bytes
9b7e9d1 | 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 | """Example: load the model in this folder and predict.
Run: python example.py
The flow needs the decision-model package (see the How to use section of
README.md).
"""
import json
from pathlib import Path
from decision_model.model import DecisionModel
HERE = Path(__file__).resolve().parent
REQUEST = {
"state": "Refactor the auth module and add tests. The repo has 40 files.",
"preferences": {"cost": "low cost before speed"},
"questions": [
{"id": "model", "type": "choice", "instructions": "Which model must handle this request?",
"criteria": {"haiku": "Short and simple tasks", "sonnet": "Normal coding tasks", "opus": "Long or difficult tasks"}},
],
}
def main():
model = DecisionModel.load(HERE)
result = model.predict(REQUEST)
print(json.dumps(result, indent=2))
if __name__ == "__main__":
main()
|