Text Classification
jev-style
Safetensors
minicpm
minicpm5
system-one
decision-model
probability
calibration
agent
routing
Instructions to use link921/CPM-jev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- jev-style
How to use link921/CPM-jev with jev-style:
pip install "jev-style[torch]"
from jev_style import JevStyle, noul, choice js = JevStyle.from_pretrained("link921/CPM-jev") out = js.decide("I was charged twice for one order.", { "billing": noul("This message is about billing."), "team": choice("Which team should handle it?", ["billing", "shipping", "tech"]), }) print(out["answers"]["team"]["choice"]) - Notebooks
- Google Colab
- Kaggle
Download example.py from link921/CPM-jev: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/link921/CPM-jev/resolve/main/example.py
- Command line
-
hf download hf://link921/CPM-jev/example.py
-
curl -L -o example.py https://huggingface.co/link921/CPM-jev/resolve/main/example.py
369 Bytes
| import json | |
| import os | |
| from inference import DecisionModel | |
| model = DecisionModel(".", base_model=os.getenv("CPM_JEV_BASE_MODEL", "openbmb/MiniCPM5-2B-Base")) | |
| result = model.decide( | |
| state="The previous tool call failed twice.", | |
| question="What should the agent do next?", | |
| options=["retry", "switch_tool", "ask_user"], | |
| ) | |
| print(json.dumps(result, indent=2)) | |