Transformers
Safetensors
decision-model
commerce
system-one
structured-output
calibration
custom-code
qwen3.8
offline
Instructions to use infercrane/Commerce-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use infercrane/Commerce-1 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("infercrane/Commerce-1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,373 Bytes
47e8004 | 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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # Typed local API
The local endpoint is `POST /v1/systemone`. This example exercises all three
question types:
```bash
curl --fail --silent http://127.0.0.1:8000/v1/systemone \
-H 'content-type: application/json' \
--data-binary @- <<'JSON'
{
"model": "infercrane/commerce-1",
"state": {
"cart_value": 149.00,
"customer_tier": "returning",
"destination": "domestic"
},
"questions": {
"route": {
"type": "choice",
"instructions": "Choose the fulfillment route.",
"criteria": {
"standard": "Standard fulfillment",
"review": "Manual review"
}
},
"eligible": {
"type": "noul",
"instructions": "Is the order eligible for automatic processing?"
},
"priority": {
"type": "score",
"instructions": "Score processing priority.",
"criteria": ["low", "medium", "high"]
}
}
}
JSON
```
Successful responses contain typed answers, raw normalized distributions,
checkpoint and runtime identities, token use, and `cost: null`. Returned values
depend on the verified local model; this document intentionally includes no
fabricated prediction example.
`GET /healthz` reports process health. `GET /v1/model` reports the loaded
content identity. The loopback server serializes model work and may return 429
while busy or 503 when the runtime cannot complete a request.
|