Ollaya package for Contrastive-LM/CLM-v0.1-8B
Browse files- 8b/calibration.json +9 -0
- 8b/decision.json +71 -0
- 8b/model-fp32.onnx +3 -0
- README.md +45 -0
8b/calibration.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"temperature": [
|
| 3 |
+
1.0,
|
| 4 |
+
1.0,
|
| 5 |
+
1.0
|
| 6 |
+
],
|
| 7 |
+
"temperature_by_options": {},
|
| 8 |
+
"source": "none upstream: the probabilities are softmax(scale * cosine), scale = exp(logit_scale) capped at 100"
|
| 9 |
+
}
|
8b/decision.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"engine": "onnx",
|
| 3 |
+
"family": "clm",
|
| 4 |
+
"layout": "clm-v1",
|
| 5 |
+
"upstream": {
|
| 6 |
+
"repo": "Contrastive-LM/CLM-v0.1-8B",
|
| 7 |
+
"revision": "e939398d4556fcd9400c76fa8c5a513202f42b0a",
|
| 8 |
+
"head": "CLM_v0.1-8B.pt",
|
| 9 |
+
"base": "Qwen/Qwen3-8B",
|
| 10 |
+
"base_revision": "b968826d9c46dd6066d109eabc6255188de91218",
|
| 11 |
+
"code": "https://github.com/Contrastive-LM/CLM"
|
| 12 |
+
},
|
| 13 |
+
"contract": {
|
| 14 |
+
"inputs": {
|
| 15 |
+
"input_ids": {
|
| 16 |
+
"dtype": "int64",
|
| 17 |
+
"shape": [
|
| 18 |
+
"rows",
|
| 19 |
+
"seq"
|
| 20 |
+
],
|
| 21 |
+
"note": "one text per row; right-pad with any id"
|
| 22 |
+
},
|
| 23 |
+
"last_pos": {
|
| 24 |
+
"dtype": "int64",
|
| 25 |
+
"shape": [
|
| 26 |
+
"rows"
|
| 27 |
+
],
|
| 28 |
+
"note": "position of the row's last token"
|
| 29 |
+
},
|
| 30 |
+
"action": {
|
| 31 |
+
"dtype": "int64",
|
| 32 |
+
"shape": [
|
| 33 |
+
"rows"
|
| 34 |
+
],
|
| 35 |
+
"note": "1 = option text (action head), 0 = state text"
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
"outputs": {
|
| 39 |
+
"z": {
|
| 40 |
+
"dtype": "float32",
|
| 41 |
+
"shape": [
|
| 42 |
+
"rows",
|
| 43 |
+
512
|
| 44 |
+
],
|
| 45 |
+
"note": "L2-normalised projection"
|
| 46 |
+
}
|
| 47 |
+
},
|
| 48 |
+
"positions": "0..seq-1, implicit",
|
| 49 |
+
"attention": "causal; no mask input (right padding cannot reach earlier positions)"
|
| 50 |
+
},
|
| 51 |
+
"scale": 100.0,
|
| 52 |
+
"max_text_tokens": 2048,
|
| 53 |
+
"special_tokens": {
|
| 54 |
+
"pad": 151643,
|
| 55 |
+
"add_special_tokens": false
|
| 56 |
+
},
|
| 57 |
+
"templates": {
|
| 58 |
+
"state": "clm.schema.state_text: to_text(state).strip() + '\\n\\n' + to_text(instructions).strip()",
|
| 59 |
+
"choice_option": "to_text(description), or the key when the description is null or ''",
|
| 60 |
+
"score_option": "to_text(level)",
|
| 61 |
+
"noul_options": [
|
| 62 |
+
"false: {description or 'No. This is false: ' + instructions}",
|
| 63 |
+
"true: {description or 'Yes. This is true: ' + instructions}"
|
| 64 |
+
],
|
| 65 |
+
"to_text": "clm.schema.to_text: str verbatim; bool true/false; numbers Python str(); dict 'k: v' (top level joined by a blank line, nested indented 2); list '- item' lines"
|
| 66 |
+
},
|
| 67 |
+
"option_logits": "scale * z[option row] . z[state row], in option order",
|
| 68 |
+
"opset": 20,
|
| 69 |
+
"precision": "fp32 compute; Qwen3-8B weights BF16, widened by Cast; heads F32",
|
| 70 |
+
"weights_in_memory": "bf16"
|
| 71 |
+
}
|
8b/model-fp32.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1f7b6781f50025560de5a4b2aa60fa4f1c4752559ebeccc5daa00b66a91e684e
|
| 3 |
+
size 7000661
|
README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model:
|
| 4 |
+
- Contrastive-LM/CLM-v0.1-8B
|
| 5 |
+
- Qwen/Qwen3-8B
|
| 6 |
+
library_name: onnx
|
| 7 |
+
tags:
|
| 8 |
+
- ollaya
|
| 9 |
+
- onnx
|
| 10 |
+
- decision-model
|
| 11 |
+
- system-one
|
| 12 |
+
pipeline_tag: text-classification
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# clm for Ollaya
|
| 16 |
+
|
| 17 |
+
[Ollaya](https://github.com/ollaya-dev/ollaya) package of **[Contrastive-LM/CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B)** and **[Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B)** by Contrastive-LM (projection heads) and the Qwen team (Qwen3-8B encoder).
|
| 18 |
+
Ollaya runs open decision models locally, the way Ollama runs LLMs: typed questions in,
|
| 19 |
+
calibrated answers out, behind a TypeSafe-compatible API.
|
| 20 |
+
|
| 21 |
+
```sh
|
| 22 |
+
ollaya run clm
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
## What is in this repository
|
| 26 |
+
|
| 27 |
+
This repository holds only the files Ollaya derives, with no weights. Each graph is an ONNX export of the
|
| 28 |
+
original model whose weights **reference the authors' own weight files by byte offset**,
|
| 29 |
+
so `ollaya pull` downloads the weights from the upstream repositories, unmodified and pinned to a
|
| 30 |
+
commit, and verifies their sha256.
|
| 31 |
+
|
| 32 |
+
| Tag | Upstream | Files |
|
| 33 |
+
|---|---|---|
|
| 34 |
+
| `clm:8b` | [Contrastive-LM/CLM-v0.1-8B@e939398](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B/tree/e939398d4556fcd9400c76fa8c5a513202f42b0a), [Qwen/Qwen3-8B@b968826](https://huggingface.co/Qwen/Qwen3-8B/tree/b968826d9c46dd6066d109eabc6255188de91218) | `8b/model-fp32.onnx`, `8b/decision.json`, `8b/calibration.json` |
|
| 35 |
+
|
| 36 |
+
Each tag has an fp32 graph, used on CPU and GPU. Each tag also has `decision.json` (sequence layout, special tokens) and
|
| 37 |
+
`calibration.json` (temperatures).
|
| 38 |
+
|
| 39 |
+
## Parity
|
| 40 |
+
|
| 41 |
+
Ollaya's Rust runtime matches the reference (upstream clm.schema and heads, the Qwen3-8B encoder in fp32 on its BF16 weights) on 480 questions from 117 requests, on CPU and CUDA: the same state and option texts and token ids, the same rejections, the same decision on every question, option logits within 1.3e-4 and probabilities within 2.9e-5.
|
| 42 |
+
|
| 43 |
+
## License
|
| 44 |
+
|
| 45 |
+
Same as the upstream model (Apache-2.0). Ollaya itself is Apache-2.0.
|