faxenoff commited on
Commit
a2a69e2
·
verified ·
1 Parent(s): 2da57e6

compiled artefacts from win_x64 (sm_120)

Browse files
Files changed (30) hide show
  1. .gitattributes +8 -0
  2. README.md +161 -93
  3. code-daemon-relation-v1-l_linux_x64_trt11.0_sm_120.engine +3 -0
  4. code-daemon-relation-v1-l_ov2026.2_cpu_fp16_b16_s256.bin +3 -0
  5. code-daemon-relation-v1-l_ov2026.2_cpu_fp16_b16_s256.xml +0 -0
  6. code-daemon-relation-v1-l_ov2026.2_igpu_fp16_b16_s256.bin +3 -0
  7. code-daemon-relation-v1-l_ov2026.2_igpu_fp16_b16_s256.xml +0 -0
  8. code-daemon-relation-v1-l_win_x64_trt11.0_sm_120.engine +3 -0
  9. code-daemon-relation-v1-m_linux_x64_trt11.0_sm_120.engine +3 -0
  10. code-daemon-relation-v1-m_ov2026.2_cpu_fp16_b16_s128.bin +3 -0
  11. code-daemon-relation-v1-m_ov2026.2_cpu_fp16_b16_s128.xml +0 -0
  12. code-daemon-relation-v1-m_ov2026.2_igpu_fp16_b16_s128.bin +3 -0
  13. code-daemon-relation-v1-m_ov2026.2_igpu_fp16_b16_s128.xml +0 -0
  14. code-daemon-relation-v1-m_win_x64_trt11.0_sm_120.engine +3 -0
  15. code-daemon-relation-v1-s_linux_x64_trt11.0_sm_120.engine +3 -0
  16. code-daemon-relation-v1-s_ov2026.2_cpu_fp16_b16_s64.bin +3 -0
  17. code-daemon-relation-v1-s_ov2026.2_cpu_fp16_b16_s64.xml +0 -0
  18. code-daemon-relation-v1-s_ov2026.2_igpu_fp16_b16_s64.bin +3 -0
  19. code-daemon-relation-v1-s_ov2026.2_igpu_fp16_b16_s64.xml +0 -0
  20. code-daemon-relation-v1-s_win_x64_trt11.0_sm_120.engine +3 -0
  21. code-daemon-relation-v1-xl_linux_x64_trt11.0_sm_120.engine +3 -0
  22. code-daemon-relation-v1-xl_ov2026.2_cpu_fp16_b16_s320.bin +3 -0
  23. code-daemon-relation-v1-xl_ov2026.2_cpu_fp16_b16_s320.xml +0 -0
  24. code-daemon-relation-v1-xl_ov2026.2_igpu_fp16_b16_s320.bin +3 -0
  25. code-daemon-relation-v1-xl_ov2026.2_igpu_fp16_b16_s320.xml +0 -0
  26. code-daemon-relation-v1-xl_win_x64_trt11.0_sm_120.engine +3 -0
  27. manifest.json +18 -0
  28. model.onnx +2 -2
  29. model.onnx.data +2 -2
  30. model_gpu_mlx0.22/config.json +50 -0
.gitattributes CHANGED
@@ -35,3 +35,11 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
  model.onnx.data filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
  model.onnx.data filter=lfs diff=lfs merge=lfs -text
38
+ code-daemon-relation-v1-l_linux_x64_trt11.0_sm_120.engine filter=lfs diff=lfs merge=lfs -text
39
+ code-daemon-relation-v1-m_linux_x64_trt11.0_sm_120.engine filter=lfs diff=lfs merge=lfs -text
40
+ code-daemon-relation-v1-s_linux_x64_trt11.0_sm_120.engine filter=lfs diff=lfs merge=lfs -text
41
+ code-daemon-relation-v1-xl_linux_x64_trt11.0_sm_120.engine filter=lfs diff=lfs merge=lfs -text
42
+ code-daemon-relation-v1-l_win_x64_trt11.0_sm_120.engine filter=lfs diff=lfs merge=lfs -text
43
+ code-daemon-relation-v1-m_win_x64_trt11.0_sm_120.engine filter=lfs diff=lfs merge=lfs -text
44
+ code-daemon-relation-v1-s_win_x64_trt11.0_sm_120.engine filter=lfs diff=lfs merge=lfs -text
45
+ code-daemon-relation-v1-xl_win_x64_trt11.0_sm_120.engine filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -4,12 +4,14 @@ language:
4
  - code
5
  - multilingual
6
  tags:
7
- - code
8
  - knowledge-graph
9
  - relation-extraction
 
10
  - cross-encoder
11
  - text-classification
12
  - knowledge-distillation
 
 
13
  pipeline_tag: text-classification
14
  base_model:
15
  - cross-encoder/mmarco-mMiniLMv2-L12-H384-v1
@@ -19,131 +21,197 @@ datasets:
19
 
20
  # code-daemon-relation-v1
21
 
22
- A tiny **relation classifier**: given two entities marked inside a piece of text, it predicts **how they
23
- relate** — one of 8 relation types, or *no relation*. It reads the two entities and their surrounding
24
- context **jointly** (a cross-encoder) and emits 8 class logits in a single forward pass.
 
 
 
 
 
 
 
25
 
26
- The point of the model is to do a job people usually hand to a large generative LLM — reading a passage
27
- and extracting typed relations between the things it mentions — as **one cheap classification pass**
28
- instead of token-by-token generation. It was **distilled from a 7B instruct model** into a ~117M
29
- cross-encoder, so it runs on a CPU/iGPU and is fast enough to sweep thousands of entity pairs when
30
- building a knowledge graph. It is used by the [UltraCode](https://github.com/faxenoff/ultracode) code
31
- assistant to turn documentation into a graph of related concepts, but nothing about it is specific to
32
- that tool.
33
 
34
- - **~117M params** — XLM-RoBERTa **12 layers / 384 hidden**, 250k **multilingual** SentencePiece vocab +
35
- 4 entity-marker tokens (`[E1] [/E1] [E2] [/E2]`), so the embedding table is 250 006 rows.
36
- - **2-input ONNX** (`input_ids`, `attention_mask`; no `token_type_ids`) → **`logits[batch, 8]`**.
37
- - **Max sequence 256** tokens for the marked passage.
38
- - **Multilingual** — the XLM-R backbone handles text and code comments in many languages.
39
 
40
- ## The 8 relation classes
41
 
42
- You mark the two entities with `[E1]…[/E1]` and `[E2]…[/E2]` in their context; the model returns a logit
43
- per class. Take `argmax`; class 0 (`NO_RELATION`) is the **abstain** class, and a softmax-probability
44
- threshold lets you drop low-confidence pairs.
45
 
46
  | idx | label | meaning |
47
  |--:|---|---|
48
- | 0 | `NO_RELATION` | the two entities co-occur but are not related (abstain) |
49
- | 1 | `semantically_similar_to` | near-duplicate purpose / meaning |
50
- | 2 | `shares_purpose_with` | related goal, different mechanism |
51
- | 3 | `invalidates_with` | one makes the other wrong / stale |
52
- | 4 | `configured_by` | one is configured / parameterised by the other |
53
- | 5 | `depends_on` | one requires the other |
54
- | 6 | `contradicts` | the two make opposing claims |
55
- | 7 | `replaced_by` | one supersedes the other |
56
-
57
- ## How it was made
58
-
59
- **Warm-started** from [`cross-encoder/mmarco-mMiniLMv2-L12-H384-v1`](https://huggingface.co/cross-encoder/mmarco-mMiniLMv2-L12-H384-v1)
60
- — a strong multilingual cross-encoder — with its single ranking logit swapped for an 8-class head, then
61
- **fine-tuned by sequence-level distillation** from a **Qwen2.5-7B-Instruct** teacher. The teacher read
62
- real documentation and labelled the relations between the entities it mentioned; those labels became the
63
- training targets. The pairs were normalised to the 8 classes, filtered for hallucinated / junk entities,
64
- windowed so both markers stay in context, and balanced with synthesised *no-relation* negatives and extra
65
- examples for the rarer classes.
66
-
67
- ## What's special
68
-
69
- - **A 7B's task in one small forward pass.** Relation extraction is normally done by prompting a large
70
- LLM; here it is a single ~sub-10 ms classification, cheap enough to run over a whole corpus.
71
- - **Joint (cross-encoder) reading.** The two entities and their context are read together in one pass, so
72
- the model can weigh how they actually relate — far more precise than comparing two independent
73
- embeddings.
74
- - **Abstain + confidence.** `NO_RELATION` plus a softmax threshold keep spurious pairs out of your graph.
75
- - **Ships as compiled engines** (TensorRT / OpenVINO, fp16) for production-speed inference, plus the ONNX
76
- for standalone use.
77
-
78
- ## Intended use
79
-
80
- Build a **knowledge graph**: for each pair of entities that co-occur in a passage, mark them and classify
81
- the relation. Wrap the two entities with `[E1]…[/E1]` and `[E2]…[/E2]`, tokenize as an
82
- *(empty-query, marked-text)* pair (the format it was trained on), run the engine, `argmax` the 8 logits,
83
- and drop `NO_RELATION` / low-confidence results.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
  ```python
86
- import onnxruntime as ort, numpy as np
87
  from transformers import AutoTokenizer
88
 
89
- LABELS = ["NO_RELATION","semantically_similar_to","shares_purpose_with","invalidates_with",
90
- "configured_by","depends_on","contradicts","replaced_by"]
91
 
92
- tok = AutoTokenizer.from_pretrained(".") # bundled tokenizer incl. [E1]/[E2] markers
93
  sess = ort.InferenceSession("model.onnx", providers=["CPUExecutionProvider"])
94
 
95
- def classify(marked_text, max_len=256, tau=0.5):
96
  enc = tok([""], [marked_text], padding="max_length", truncation=True,
97
  max_length=max_len, return_tensors="np", return_token_type_ids=False)
98
  logits = sess.run(None, {"input_ids": enc["input_ids"].astype(np.int64),
99
  "attention_mask": enc["attention_mask"].astype(np.int64)})[0][0]
100
  p = np.exp(logits - logits.max()); p /= p.sum()
 
 
101
  i = int(p.argmax())
102
- return (LABELS[i], float(p[i])) if i != 0 and p[i] >= tau else ("NO_RELATION", float(p[0]))
103
 
104
- # classify("The [E1]FAISS[/E1] vector index was replaced by the [E2]native IVF[/E2] backend.")
105
- # -> ('replaced_by', 0.7x)
106
  ```
107
 
108
- ## What's in this repo
 
109
 
110
- Ready-to-run compiled engines, named per **runtime × GPU arch × OS** (single-profile — no length
111
- buckets):
112
 
113
- - **TensorRT** `code-daemon-relation-v1_{win_x64,linux_x64}_trt_sm_{86,89,120}.engine` — NVIDIA, fp16.
114
- - **OpenVINO** `code-daemon-relation-v1_ov_{cpu,igpu}_fp16_b16_s256.{xml,bin}` — Intel CPU / iGPU.
115
- - **Tokenizer** — `tokenizer.json` + `sentencepiece.bpe.model` + `tokenizer_config.json` (XLM-R
116
- SentencePiece with the 4 `[E1]/[E2]` marker tokens added).
117
- - **ONNX source** — `model.onnx` (+ `model.onnx.data`) FP32, for standalone `onnxruntime` / `optimum` use.
118
 
119
- > fp16 only: the mmarco format hits a known OpenVINO INT8 AccessViolation on the iGPU, so fp16 is shipped.
120
 
121
- ## Evaluation
 
 
 
 
 
122
 
123
- This is a **first distilled cut**, and the classes are naturally imbalanced (the teacher emits
124
- `semantically_similar_to` / `shares_purpose_with` far more often than `replaced_by` / `depends_on`).
125
- Reported honestly: **macro-F1 ≈ 0.33** on a held-out dev split, with per-class F1 in the **~0.2–0.44**
126
- band for the well-populated classes and lower on the thin tail classes, which the data under-samples and
127
- which are supplemented with synthetic examples. The abstain class plus a softmax threshold keep
128
- low-confidence pairs out of the graph. Metrics are advisory — for graph construction, spot-checking the
129
- edges it produces is the real test.
130
 
131
- ## License & training data
 
 
 
132
 
133
- Released under the **MIT license** (the mmarco base + XLM-R backbone are MIT/Apache; fine-tuned weights
134
- released MIT).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
 
136
  | Source | Note |
137
  |---|---|
138
- | `cross-encoder/mmarco-mMiniLMv2-L12-H384-v1` (warm-start base) | **mMARCO ← MS MARCO → non-commercial research terms** |
139
- | distillation targets (Qwen2.5-7B-Instruct over open-source docs) | self-generated |
140
- | synthesised negatives + rare-class augmentation | generated |
141
-
142
- ⚠️ The warm-start base derives from **MS MARCO (non-commercial)**; whether a fine-tuned model inherits
143
- dataset-use terms is legally unsettled — this is **not legal advice**. Retrain from a permissive base if
144
- strict compliance is required.
145
 
146
- ## Attribution
 
 
147
 
148
  Warm-started from **[cross-encoder/mmarco-mMiniLMv2-L12-H384-v1](https://huggingface.co/cross-encoder/mmarco-mMiniLMv2-L12-H384-v1)**.
149
- Distilled from **Qwen2.5-7B-Instruct**. Backbone: XLM-RoBERTa.
 
 
4
  - code
5
  - multilingual
6
  tags:
 
7
  - knowledge-graph
8
  - relation-extraction
9
+ - relation-classification
10
  - cross-encoder
11
  - text-classification
12
  - knowledge-distillation
13
+ - tensorrt
14
+ - openvino
15
  pipeline_tag: text-classification
16
  base_model:
17
  - cross-encoder/mmarco-mMiniLMv2-L12-H384-v1
 
21
 
22
  # code-daemon-relation-v1
23
 
24
+ A **117M-parameter relation classifier**. Mark two entities inside a passage and it answers, in one
25
+ forward pass, **how they relate** — one of three relation types, or *no relation*.
26
+
27
+ It does a job usually handed to a large generative model — read a passage, extract typed relations
28
+ between the things it mentions — as **a single classification** instead of token-by-token generation.
29
+ That makes it cheap enough to sweep an entire corpus: **~2 900 pairs/sec** on a laptop RTX 5060.
30
+
31
+ ```python
32
+ logits = session.run(None, {"input_ids": ids, "attention_mask": mask})[0] # [B, 4]
33
+ ```
34
 
35
+ Text is fed as an *(empty query, marked passage)* pair. Multilingual — the XLM-R backbone reads prose
36
+ and code comments in many languages.
 
 
 
 
 
37
 
38
+ ---
 
 
 
 
39
 
40
+ ## 1. The four classes
41
 
42
+ Wrap each entity in `[E1]…[/E1]` and `[E2]…[/E2]` inside its natural context. Take the `argmax`;
43
+ class 0 is an explicit **abstain**, and a softmax threshold drops the rest of the low-confidence tail.
 
44
 
45
  | idx | label | meaning |
46
  |--:|---|---|
47
+ | 0 | `NO_RELATION` | the two co-occur but are not related — **abstain** |
48
+ | 1 | `semantically_similar_to` | near-duplicate purpose, or the same goal by a different mechanism |
49
+ | 2 | `invalidates_with` | one supersedes, replaces or contradicts the other |
50
+ | 3 | `depends_on` | one requires or configures the other |
51
+
52
+ The taxonomy is deliberately **coarse**. An earlier 8-way version split these into near-synonym pairs
53
+ (`semantically_similar_to` vs `shares_purpose_with`, `replaced_by` vs `contradicts`, `depends_on` vs
54
+ `configured_by`) and the distinctions were not reliably separable from context — the classifier spent
55
+ its capacity on boundaries that downstream consumers then collapsed anyway. Merging them into three
56
+ positives plus abstain is what the model is actually good at.
57
+
58
+ **Decision rule as shipped:** `argmax != NO_RELATION` **and** `1 - softmax[NO_RELATION] >= tau`.
59
+ Gating on the *probability that any relation exists* rather than on the winning class's own
60
+ probability is more robust: when a real relation's mass spreads across two plausible classes, the
61
+ per-class maximum sags while "something is here" stays high.
62
+
63
+ ---
64
+
65
+ ## 2. Architecture
66
+
67
+ | | |
68
+ |---|---|
69
+ | Warm-start | [`cross-encoder/mmarco-mMiniLMv2-L12-H384-v1`](https://huggingface.co/cross-encoder/mmarco-mMiniLMv2-L12-H384-v1) |
70
+ | Encoder | XLM-RoBERTa, **12 layers / 384 hidden / 12 heads**, FFN 1536 |
71
+ | Vocabulary | **250 006** SentencePiece pieces = 250 002 XLM-R + 4 marker tokens |
72
+ | Markers | `[E1]` `[/E1]` `[E2]` `[/E2]` (ids 250002–250005) |
73
+ | Sequence | **256 tokens** on the shipped engines (64 / 128 / 320 also provided) |
74
+ | Inputs | `input_ids`, `attention_mask` — **no `token_type_ids`** |
75
+ | Output | `logits[batch, 4]` |
76
+ | Parameters | **~117M**, of which 96M is the multilingual embedding table |
77
+
78
+ ### Entity-marker pooling, not `[CLS]`
79
+
80
+ The classification head does **not** read the `[CLS]` vector. It mean-pools the hidden states at the
81
+ **entity-start markers** — the `[E1]` and `[E2]` positions — concatenates the two, and passes that
82
+ through a single linear layer.
83
+
84
+ This matters for a relation task. A `[CLS]` vector summarises the whole passage, so the head has to
85
+ recover *which two things* the question is about from a global summary. Reading the marker positions
86
+ instead gives the head both arguments directly and in order, so the relation is scored between the
87
+ two entities rather than inferred from the sentence as a whole. Direction comes free: swap the
88
+ markers and the input genuinely changes.
89
+
90
+ ---
91
+
92
+ ## 3. How it was made
93
+
94
+ **Warm-started** from a strong multilingual ranking cross-encoder, with its single ranking logit
95
+ replaced by the 4-class marker-pooling head, then fine-tuned by **sequence-level distillation**.
96
+
97
+ A large instruction-tuned LLM (Claude) read real documentation and emitted relation tuples grounded
98
+ in the passage it was shown. Those tuples became the training targets after several filtering passes:
99
+
100
+ - **Grounding** — entity names the teacher marked must actually resolve inside the chunk, which drops
101
+ hallucinated arguments.
102
+ - **Windowing** — the passage is cropped so that both markers survive truncation.
103
+ - **Merging** — the original 8 labels are collapsed to the 4 above.
104
+ - **Negatives** — explicit `NO_RELATION` examples synthesised from co-occurring but untupled entity
105
+ pairs in the same chunk, so abstain is trained rather than inferred.
106
+ - **Logit adjustment** — the class prior is corrected at the loss, since a teacher naturally emits
107
+ "similar" far more often than "depends on".
108
+
109
+ ---
110
+
111
+ ## 4. Speed
112
+
113
+ Measured on one laptop: Intel Core Ultra 9 275HX / NVIDIA RTX 5060 Laptop.
114
+
115
+ | lane | batch × seq | per batch | throughput | per pair |
116
+ |---|---|--:|--:|--:|
117
+ | **TensorRT FP16, RTX 5060 Laptop** | 16 × 256 | **5.44 ms** | **2 942 pairs/s** | 0.34 ms |
118
+ | OpenVINO FP16, CPU | 16 × 256 | 360 ms | 44 pairs/s | 22.5 ms |
119
+ | ONNX Runtime FP32, CPU | 16 × 256 | 380 ms | 42 pairs/s | 23.7 ms |
120
+
121
+ The GPU lane is ~67× the CPU lane, which is the point: relation extraction over a corpus means tens
122
+ of thousands of candidate pairs, and only the compiled-engine path makes that a background task
123
+ rather than a batch job.
124
+
125
+ Four **length buckets** ship — seq 64 / 128 / 256 / 320 at batch 16. Attention is quadratic in
126
+ sequence length, so routing short passages to a short engine is worth taking when your pairs vary in
127
+ length. Padding is attention-masked, so a pair produces the same logits from any bucket that fits it.
128
+
129
+ ---
130
+
131
+ ## 5. Standalone use
132
 
133
  ```python
134
+ import numpy as np, onnxruntime as ort
135
  from transformers import AutoTokenizer
136
 
137
+ LABELS = ["NO_RELATION", "semantically_similar_to", "invalidates_with", "depends_on"]
 
138
 
139
+ tok = AutoTokenizer.from_pretrained(".") # includes the [E1]/[E2] marker tokens
140
  sess = ort.InferenceSession("model.onnx", providers=["CPUExecutionProvider"])
141
 
142
+ def classify(marked_text, max_len=256, tau=0.7):
143
  enc = tok([""], [marked_text], padding="max_length", truncation=True,
144
  max_length=max_len, return_tensors="np", return_token_type_ids=False)
145
  logits = sess.run(None, {"input_ids": enc["input_ids"].astype(np.int64),
146
  "attention_mask": enc["attention_mask"].astype(np.int64)})[0][0]
147
  p = np.exp(logits - logits.max()); p /= p.sum()
148
+ if 1.0 - p[0] < tau: # gate on "any relation at all"
149
+ return "NO_RELATION", float(p[0])
150
  i = int(p.argmax())
151
+ return (LABELS[i], float(p[i])) if i else ("NO_RELATION", float(p[0]))
152
 
153
+ classify("The [E1]FAISS[/E1] index was replaced by the [E2]native IVF[/E2] backend.")
154
+ # -> ('invalidates_with', 0.7x)
155
  ```
156
 
157
+ Both entities must appear **inside one passage**, marked in place. The model reads context, so a bare
158
+ pair of names with no surrounding text carries little signal.
159
 
160
+ ---
 
161
 
162
+ ## 6. Evaluation
 
 
 
 
163
 
164
+ **Dev macro-F1 = 0.547** over the four classes, on a held-out split of the distillation set.
165
 
166
+ Read that as what it is. The classes are intrinsically imbalanced — a teacher describing
167
+ documentation emits "similar" far more often than "depends on" — and the merged taxonomy still
168
+ contains genuinely ambiguous boundaries that human annotators would also disagree on. The abstain
169
+ class plus the `tau` gate exist because the useful operating point is *high-precision edges*, not
170
+ maximum recall: for building a graph, the real test is spot-checking the edges it emits at your
171
+ chosen threshold.
172
 
173
+ **Suited to**
174
+ - Turning prose or documentation into a typed concept graph.
175
+ - Any sweep where a large LLM per pair would be too slow or too expensive.
176
+ - Multilingual corpora, including code comments.
 
 
 
177
 
178
+ **Not suited to**
179
+ - Fine-grained relation ontologies — this is 3 positives plus abstain by design.
180
+ - Entity *extraction*: it classifies pairs you already found, it does not find them.
181
+ - Passages where the two entities are far apart — the marked window is 256 tokens.
182
 
183
+ ---
184
+
185
+ ## 7. What is in this repo
186
+
187
+ Compiled engines, named per **runtime × OS × GPU arch**, plus the ONNX for standalone use.
188
+
189
+ - **TensorRT FP16** — `code-daemon-relation-v1-{s,m,l,xl}_{win_x64,linux_x64}_trt11.0_sm_120.engine`
190
+ (buckets seq 64 / 128 / 256 / 320, batch 16).
191
+ - **OpenVINO FP16** — `code-daemon-relation-v1-{s,m,l,xl}_ov2026.2_{cpu,igpu}_fp16_b16_s{64,128,256,320}.{xml,bin}`.
192
+ - **Tokenizer** — `tokenizer.json`, `sentencepiece.bpe.model`, `tokenizer_config.json` (XLM-R
193
+ SentencePiece with the four marker tokens added).
194
+ - **ONNX** — `model.onnx` (+ `model.onnx.data`), FP32, the build source for every engine above.
195
+
196
+ FP16 rather than INT8: this architecture's activation outliers make per-tensor INT8 calibration
197
+ lossy, and FP16 costs nothing on any GPU that can run it.
198
+
199
+ ---
200
+
201
+ ## 8. License & attribution
202
+
203
+ Released **MIT**.
204
 
205
  | Source | Note |
206
  |---|---|
207
+ | `cross-encoder/mmarco-mMiniLMv2-L12-H384-v1` (warm-start) | **mMARCO ← MS MARCO → non-commercial research terms** |
208
+ | Distillation targets (LLM-labelled open-source documentation) | self-generated |
209
+ | Synthesised negatives and rare-class augmentation | generated |
 
 
 
 
210
 
211
+ ⚠️ The warm-start base derives from **MS MARCO (non-commercial)**. Whether a fine-tuned model
212
+ inherits dataset-use terms is legally unsettled — this is **not legal advice**. Retrain from a
213
+ permissive base if strict compliance matters to you.
214
 
215
  Warm-started from **[cross-encoder/mmarco-mMiniLMv2-L12-H384-v1](https://huggingface.co/cross-encoder/mmarco-mMiniLMv2-L12-H384-v1)**.
216
+ Backbone: XLM-RoBERTa. Used by the [UltraCode](https://github.com/faxenoff/ultracode) code assistant,
217
+ though nothing about the model is specific to it.
code-daemon-relation-v1-l_linux_x64_trt11.0_sm_120.engine ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6384775d766d53b6e8ab921f75cf55be1d1d34ddec9904f0a42b4efd402f9232
3
+ size 240376836
code-daemon-relation-v1-l_ov2026.2_cpu_fp16_b16_s256.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44de7b7cb29d298b215f965e3a1263d9cceaf9256299143d638b5e5edcf398f2
3
+ size 427004618
code-daemon-relation-v1-l_ov2026.2_cpu_fp16_b16_s256.xml ADDED
The diff for this file is too large to render. See raw diff
 
code-daemon-relation-v1-l_ov2026.2_igpu_fp16_b16_s256.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44de7b7cb29d298b215f965e3a1263d9cceaf9256299143d638b5e5edcf398f2
3
+ size 427004618
code-daemon-relation-v1-l_ov2026.2_igpu_fp16_b16_s256.xml ADDED
The diff for this file is too large to render. See raw diff
 
code-daemon-relation-v1-l_win_x64_trt11.0_sm_120.engine ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76b0a26f0440cc5e4de64cb0cc500c05ee4ab571adda9b0003d3eff91899d1a6
3
+ size 240313476
code-daemon-relation-v1-m_linux_x64_trt11.0_sm_120.engine ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e93f5b3f28f5a330c170abace36214e574d9fe6b40ef64daaedfbc6d2e84519
3
+ size 238266444
code-daemon-relation-v1-m_ov2026.2_cpu_fp16_b16_s128.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44de7b7cb29d298b215f965e3a1263d9cceaf9256299143d638b5e5edcf398f2
3
+ size 427004618
code-daemon-relation-v1-m_ov2026.2_cpu_fp16_b16_s128.xml ADDED
The diff for this file is too large to render. See raw diff
 
code-daemon-relation-v1-m_ov2026.2_igpu_fp16_b16_s128.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44de7b7cb29d298b215f965e3a1263d9cceaf9256299143d638b5e5edcf398f2
3
+ size 427004618
code-daemon-relation-v1-m_ov2026.2_igpu_fp16_b16_s128.xml ADDED
The diff for this file is too large to render. See raw diff
 
code-daemon-relation-v1-m_win_x64_trt11.0_sm_120.engine ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5bb0bcee5cb2382d51c1e36529306d8545ae5640eb0c99fdde7699e30d857f7a
3
+ size 240300756
code-daemon-relation-v1-s_linux_x64_trt11.0_sm_120.engine ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0db0b50abb3122fc7ad012bc41db40f829bffd3e59c4cccb143a0da8d38a0fc9
3
+ size 236279164
code-daemon-relation-v1-s_ov2026.2_cpu_fp16_b16_s64.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44de7b7cb29d298b215f965e3a1263d9cceaf9256299143d638b5e5edcf398f2
3
+ size 427004618
code-daemon-relation-v1-s_ov2026.2_cpu_fp16_b16_s64.xml ADDED
The diff for this file is too large to render. See raw diff
 
code-daemon-relation-v1-s_ov2026.2_igpu_fp16_b16_s64.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44de7b7cb29d298b215f965e3a1263d9cceaf9256299143d638b5e5edcf398f2
3
+ size 427004618
code-daemon-relation-v1-s_ov2026.2_igpu_fp16_b16_s64.xml ADDED
The diff for this file is too large to render. See raw diff
 
code-daemon-relation-v1-s_win_x64_trt11.0_sm_120.engine ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1c451d4d9a320e438d61399b3710e11bb14864b48c867fb5e44739be7b2b8c9
3
+ size 238297228
code-daemon-relation-v1-xl_linux_x64_trt11.0_sm_120.engine ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e200a40f8dbf2c7c812a50c5bc5710f734c5f869d3bdb8b3364879b9ef361e3
3
+ size 238387732
code-daemon-relation-v1-xl_ov2026.2_cpu_fp16_b16_s320.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44de7b7cb29d298b215f965e3a1263d9cceaf9256299143d638b5e5edcf398f2
3
+ size 427004618
code-daemon-relation-v1-xl_ov2026.2_cpu_fp16_b16_s320.xml ADDED
The diff for this file is too large to render. See raw diff
 
code-daemon-relation-v1-xl_ov2026.2_igpu_fp16_b16_s320.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44de7b7cb29d298b215f965e3a1263d9cceaf9256299143d638b5e5edcf398f2
3
+ size 427004618
code-daemon-relation-v1-xl_ov2026.2_igpu_fp16_b16_s320.xml ADDED
The diff for this file is too large to render. See raw diff
 
code-daemon-relation-v1-xl_win_x64_trt11.0_sm_120.engine ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d83141e50053725d59d49fa6074c1be0db9cce9eace64bd3dceeebfa41961f7
3
+ size 240319756
manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_id": "code-daemon-relation-v1",
3
+ "dimension": 4,
4
+ "max_tokens": 256,
5
+ "quantization": "fp16",
6
+ "targets": [
7
+ "openvino",
8
+ "tensorrt"
9
+ ],
10
+ "runtime_tags": {
11
+ "trt": "trt11.0",
12
+ "ov": "ov2026.2",
13
+ "tvm": "tvm0.25",
14
+ "mlx_dir": "model_gpu_mlx0.22"
15
+ },
16
+ "compiled_at": "2026-08-03T14:52:04Z",
17
+ "compiled_by": "models/_compile"
18
+ }
model.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d51af77c0d0a9e0778bf763a4c2d1d182c47a32f6fa13639cdbbe88b8339d265
3
- size 1717372
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73556d636633563bd0688d52899c475ff61a48f0687e8c48703ee4b9bc74d135
3
+ size 1548544
model.onnx.data CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:113420d58818aa7a54717a3b0e0a2475adea87f414d9644306757a7971f7b7e9
3
- size 470647808
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b51662317655847207a9b2c146d7a5084310fac4860e7169cd47c1c161e25308
3
+ size 470057984
model_gpu_mlx0.22/config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_cross_attention": false,
3
+ "architectures": [
4
+ "XLMRobertaForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "dtype": "float32",
10
+ "eos_token_id": 2,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 384,
14
+ "id2label": {
15
+ "0": "NO_RELATION",
16
+ "1": "semantically_similar_to",
17
+ "2": "shares_purpose_with",
18
+ "3": "invalidates_with",
19
+ "4": "configured_by",
20
+ "5": "depends_on",
21
+ "6": "contradicts",
22
+ "7": "replaced_by"
23
+ },
24
+ "initializer_range": 0.02,
25
+ "intermediate_size": 1536,
26
+ "is_decoder": false,
27
+ "label2id": {
28
+ "NO_RELATION": 0,
29
+ "configured_by": 4,
30
+ "contradicts": 6,
31
+ "depends_on": 5,
32
+ "invalidates_with": 3,
33
+ "replaced_by": 7,
34
+ "semantically_similar_to": 1,
35
+ "shares_purpose_with": 2
36
+ },
37
+ "layer_norm_eps": 1e-05,
38
+ "max_position_embeddings": 514,
39
+ "model_type": "xlm-roberta",
40
+ "num_attention_heads": 12,
41
+ "num_hidden_layers": 12,
42
+ "pad_token_id": 1,
43
+ "position_embedding_type": "absolute",
44
+ "sbert_ce_default_activation_function": "torch.nn.modules.linear.Identity",
45
+ "tie_word_embeddings": true,
46
+ "transformers_version": "5.1.0",
47
+ "type_vocab_size": 1,
48
+ "use_cache": true,
49
+ "vocab_size": 250006
50
+ }