Instructions to use odecide-models/laya with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Laya
How to use odecide-models/laya 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
v0.2 manifest: add runtime/family (weights unchanged)
Browse files- .ms_upload_cache +1 -0
- README.md +27 -9
- SHA256SUMS +2 -2
- model.json +6 -0
.ms_upload_cache
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version": 3, "repo_id": "sgyaqing/laya", "files": {"laya.onnx|1791506805.0|3832478": {"hash": "f8569c39321576db724e2544826343af35adccb3ab3d5c45a57bb07f25fd48ca", "size": 3832478, "status": "c"}, "tokenizer/tokenizer.json|1791506806.0|3583228": {"hash": "6c8aaa9a542084f2457eab775d4eeb51f92a70c0fd9de28d5edb0ddec3c08d30", "size": 3583228, "status": "c"}, "laya.onnx.data|1791506806.0|1685258240": {"hash": "487746363a8da57bcadb4345352997d22a0fb90d70aa22c6856668d023242aba", "size": 1685258240, "status": "c"}, "SHA256SUMS|1792069747.0|499": {"hash": "20a9621036d46a72c9bcfa91421181f8de296eaa57b528d934209b69c17a5f8d", "size": 499, "status": "c"}, "README.md|1792069651.0|3112": {"hash": "16e1492540dcbe1c9cf29cc3e243a31462fe50c5b9272a872a75d75f95b9fee7", "size": 3112, "status": "c"}, "tokenizer/tokenizer_config.json|1791506806.0|308": {"hash": "50044de60daaa73df97d262e15a40d4faf0160e7d742df64b377877a1320dd12", "size": 308, "status": "c"}, "model.json|1792055632.0|562": {"hash": "32474ed7241931d003642df0be8917f1495c0dc0966230185ee7c4d7955fd187", "size": 562, "status": "c"}}}
|
README.md
CHANGED
|
@@ -15,24 +15,42 @@ tags:
|
|
| 15 |
|
| 16 |
The [Laya](https://huggingface.co/convaiinnovations/laya) System One decision model, exported to ONNX fp32 and packaged for [Verdict](https://github.com/sgyaqing/verdict) -- a high-performance serving engine for System One decision models. Serve it with one command:
|
| 17 |
|
|
|
|
|
|
|
|
|
|
| 18 |
```bash
|
| 19 |
-
#
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
| 24 |
```
|
| 25 |
|
|
|
|
|
|
|
|
|
|
| 26 |
Endpoints: the standard decision protocols `POST /v1/systemone` and `POST /v1/decisions`, native `POST /v1/choice | /v1/score | /v1/noul`, plus an OpenAI-compatible layer (`/v1/chat/completions`, `/v1/models`).
|
| 27 |
|
| 28 |
## Performance
|
| 29 |
|
| 30 |
-
Measured on one RTX
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
-
| concurrency
|
| 33 |
-
|---|---:|---:|
|
| 34 |
-
|
|
| 35 |
-
|
|
|
|
|
| 36 |
|
| 37 |
## Files
|
| 38 |
|
|
|
|
| 15 |
|
| 16 |
The [Laya](https://huggingface.co/convaiinnovations/laya) System One decision model, exported to ONNX fp32 and packaged for [Verdict](https://github.com/sgyaqing/verdict) -- a high-performance serving engine for System One decision models. Serve it with one command:
|
| 17 |
|
| 18 |
+
Pick the image that matches the host. The `-v` mounts cache the model, so only the first
|
| 19 |
+
run downloads it.
|
| 20 |
+
|
| 21 |
```bash
|
| 22 |
+
# CPU host
|
| 23 |
+
docker run --rm -p 8080:8080 \
|
| 24 |
+
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
| 25 |
+
-v ~/.cache/verdict:/root/.cache/verdict \
|
| 26 |
+
sgyaqing/verdict:0.2.0-cpu serve verdict-models/laya
|
| 27 |
|
| 28 |
+
# GPU host
|
| 29 |
+
docker run --rm --gpus all -p 8080:8080 \
|
| 30 |
+
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
| 31 |
+
-v ~/.cache/verdict:/root/.cache/verdict \
|
| 32 |
+
sgyaqing/verdict:0.2.0-cuda serve verdict-models/laya
|
| 33 |
```
|
| 34 |
|
| 35 |
+
Add `-e VERDICT_USE_MODELSCOPE=1` and use `sgyaqing/laya` to fetch from ModelScope instead of
|
| 36 |
+
the hub; add `-e HF_ENDPOINT=https://hf-mirror.com` if the hub is slow or unreachable.
|
| 37 |
+
|
| 38 |
Endpoints: the standard decision protocols `POST /v1/systemone` and `POST /v1/decisions`, native `POST /v1/choice | /v1/score | /v1/noul`, plus an OpenAI-compatible layer (`/v1/chat/completions`, `/v1/models`).
|
| 39 |
|
| 40 |
## Performance
|
| 41 |
|
| 42 |
+
Measured on one machine (RTX 4090, AMD EPYC 7543, 16 threads), end to end over HTTP with
|
| 43 |
+
[`oha`](https://github.com/hatoo/oha) and an identical request body for both servers. The
|
| 44 |
+
baseline is the model author's own server (`laya-serve`, `LAYA_MODELS=english`); the Verdict
|
| 45 |
+
column is this package. Latencies are per-request P50 / P99 at the stated concurrency. The
|
| 46 |
+
ratios are oriented so that **above 1× means Verdict is ahead** in both: throughput ratio =
|
| 47 |
+
Verdict ÷ baseline, latency ratio = baseline ÷ Verdict.
|
| 48 |
|
| 49 |
+
| concurrency | Verdict rps | Verdict P50 / P99 | `laya-serve` rps | `laya-serve` P50 / P99 | ratio rps | ratio P50 / P99 |
|
| 50 |
+
|---|---:|---:|---:|---:|---:|---:|
|
| 51 |
+
| 1 | 121.4 | 8.37 / 11.07 ms | 34.4 | 28.58 / 32.73 ms | 3.53× | 3.42 / 2.96× |
|
| 52 |
+
| 8 | 501.4 | 15.99 / 22.42 ms | 35.4 | 227.96 / 250.60 ms | 14.2× | 14.3 / 11.2× |
|
| 53 |
+
| 64 | 1353.0 | 46.71 / 65.19 ms | refused requests | — | — | — |
|
| 54 |
|
| 55 |
## Files
|
| 56 |
|
SHA256SUMS
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
f8569c39321576db724e2544826343af35adccb3ab3d5c45a57bb07f25fd48ca laya.onnx
|
| 4 |
487746363a8da57bcadb4345352997d22a0fb90d70aa22c6856668d023242aba laya.onnx.data
|
| 5 |
6c8aaa9a542084f2457eab775d4eeb51f92a70c0fd9de28d5edb0ddec3c08d30 tokenizer/tokenizer.json
|
|
|
|
| 1 |
+
16e1492540dcbe1c9cf29cc3e243a31462fe50c5b9272a872a75d75f95b9fee7 README.md
|
| 2 |
+
32474ed7241931d003642df0be8917f1495c0dc0966230185ee7c4d7955fd187 model.json
|
| 3 |
f8569c39321576db724e2544826343af35adccb3ab3d5c45a57bb07f25fd48ca laya.onnx
|
| 4 |
487746363a8da57bcadb4345352997d22a0fb90d70aa22c6856668d023242aba laya.onnx.data
|
| 5 |
6c8aaa9a542084f2457eab775d4eeb51f92a70c0fd9de28d5edb0ddec3c08d30 tokenizer/tokenizer.json
|
model.json
CHANGED
|
@@ -1,7 +1,13 @@
|
|
| 1 |
{
|
|
|
|
|
|
|
| 2 |
"graph": "laya.onnx",
|
| 3 |
"head_max_len": 192,
|
| 4 |
"max_len": 512,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"temperature": [
|
| 6 |
1.6369030475616455,
|
| 7 |
1.2514300346374512,
|
|
|
|
| 1 |
{
|
| 2 |
+
"family": "marker_head",
|
| 3 |
+
"runtime": "ort",
|
| 4 |
"graph": "laya.onnx",
|
| 5 |
"head_max_len": 192,
|
| 6 |
"max_len": 512,
|
| 7 |
+
"cls_token": "[CLS]",
|
| 8 |
+
"sep_token": "[SEP]",
|
| 9 |
+
"mask_token": "[MASK]",
|
| 10 |
+
"pad_token": "[PAD]",
|
| 11 |
"temperature": [
|
| 12 |
1.6369030475616455,
|
| 13 |
1.2514300346374512,
|