Sentence Similarity
sentence-transformers
Safetensors
English
bert
feature-extraction
agents
tool-routing
agent-routing
retrieval
semantic-router
nomos
cpu
text-embeddings-inference
Instructions to use yafitzdev/nomos-v1-nano-g1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use yafitzdev/nomos-v1-nano-g1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("yafitzdev/nomos-v1-nano-g1") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Align Nomos model card with Pyrrho and Opsis
Browse files
README.md
CHANGED
|
@@ -22,40 +22,77 @@ tags:
|
|
| 22 |
# nomos-v1-nano-g1
|
| 23 |
|
| 24 |
`nomos-v1-nano-g1` is a small local agentic tool-routing co-processor. Given a
|
| 25 |
-
user objective, current agent state, and
|
| 26 |
-
|
| 27 |
|
| 28 |
It is not an answer generator, tool executor, or fixed-vocabulary classifier.
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
to rank registries supplied by different agents, including previously unseen
|
| 33 |
-
tool names.
|
| 34 |
|
| 35 |
-
Nomos
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
| 38 |
|
| 39 |
## Native V1 Output
|
| 40 |
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
```json
|
| 44 |
[
|
| 45 |
-
{
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
]
|
| 49 |
```
|
| 50 |
|
| 51 |
-
Scores are relative to the candidate set supplied for that decision.
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
## Input
|
| 57 |
|
| 58 |
-
The query side should describe the objective and relevant
|
| 59 |
|
| 60 |
```text
|
| 61 |
Objective: Find the implementation corresponding to this SDK symbol.
|
|
@@ -76,6 +113,11 @@ Constraints: read only. Side effects: none.
|
|
| 76 |
Arguments: query (string required), scope (string optional).
|
| 77 |
```
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
## Quick Start
|
| 80 |
|
| 81 |
```python
|
|
@@ -94,21 +136,39 @@ candidates = [
|
|
| 94 |
"Search public web pages. Capabilities: web search.",
|
| 95 |
]
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
scores = (
|
| 100 |
|
| 101 |
for index in scores.argsort()[::-1][:3]:
|
| 102 |
print(float(scores[index]), candidates[index])
|
| 103 |
```
|
| 104 |
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
|
| 109 |
## Evaluation
|
| 110 |
|
| 111 |
-
All figures below
|
| 112 |
controller, deterministic override, or tool execution is included.
|
| 113 |
|
| 114 |
| Frozen evaluation | Recall@1 | Recall@3 |
|
|
@@ -120,10 +180,11 @@ controller, deterministic override, or tool execution is included.
|
|
| 120 |
|
| 121 |
Additional frozen generic-registry Recall@3 is 0.9440. These suites exercise
|
| 122 |
opaque tool names, changed registry presentation, legal-candidate filtering,
|
| 123 |
-
hard negatives, and held-out workflows.
|
| 124 |
-
|
|
|
|
| 125 |
|
| 126 |
-
## Training
|
| 127 |
|
| 128 |
| Field | Value |
|
| 129 |
|---|---|
|
|
@@ -131,15 +192,20 @@ tool-routing accuracy.
|
|
| 131 |
| Parameters | approximately 33M |
|
| 132 |
| Embedding dimension | 384 |
|
| 133 |
| Maximum sequence length | 512 tokens |
|
| 134 |
-
|
|
| 135 |
| Main objective | in-batch multiple-negative ranking loss |
|
| 136 |
| Final checkpoint | 90% established router + 10% full-replay specialist interpolation |
|
| 137 |
| Similarity | normalized cosine similarity |
|
| 138 |
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
|
| 144 |
## Artifacts
|
| 145 |
|
|
@@ -148,16 +214,16 @@ This repository contains:
|
|
| 148 |
- `model.safetensors`: standalone SentenceTransformers checkpoint,
|
| 149 |
- tokenizer and BERT configuration files,
|
| 150 |
- pooling and normalization modules,
|
| 151 |
-
- `nomos_training_manifest.json`: inherited training
|
| 152 |
- `nomos_interpolation_manifest.json`: final 90/10 interpolation record,
|
| 153 |
-
- `nomos_calibration.json`: optional abstention
|
| 154 |
|
| 155 |
The SHA-256 digest of `model.safetensors` in this release is
|
| 156 |
`429fb204e4a38c1514c5a232376600fb4d3c6d2e82e9e27951cdfdeada27fca8`.
|
| 157 |
|
| 158 |
## Limitations
|
| 159 |
|
| 160 |
-
1. **Top-
|
| 161 |
does not select arguments, execute tools, or establish provenance.
|
| 162 |
2. **English-centric synthetic training.** Multilingual performance has not
|
| 163 |
been established.
|
|
@@ -167,6 +233,8 @@ The SHA-256 digest of `model.safetensors` in this release is
|
|
| 167 |
state fields can produce incorrect rankings.
|
| 168 |
5. **Abstention is separate.** The included calibration is an optional policy
|
| 169 |
signal and should be validated again for each integration distribution.
|
|
|
|
|
|
|
| 170 |
|
| 171 |
## License
|
| 172 |
|
|
|
|
| 22 |
# nomos-v1-nano-g1
|
| 23 |
|
| 24 |
`nomos-v1-nano-g1` is a small local agentic tool-routing co-processor. Given a
|
| 25 |
+
user objective, current agent state, and legal candidate registry, it ranks the
|
| 26 |
+
tools most likely to be useful for the next step.
|
| 27 |
|
| 28 |
It is not an answer generator, tool executor, or fixed-vocabulary classifier.
|
| 29 |
+
It sits beside an agent as a fast candidate-reduction layer, so the primary LLM
|
| 30 |
+
can reason over a short ranked list instead of every tool description in a
|
| 31 |
+
large registry.
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
Nomos v1 ranks candidates through semantic metadata rather than treating tool
|
| 34 |
+
names as output classes. The same checkpoint can therefore rank registries
|
| 35 |
+
supplied by different agents, including tools with previously unseen names.
|
| 36 |
+
This is the first Nomos v1 nano generation and a compact base for future
|
| 37 |
+
tool-routing models.
|
| 38 |
|
| 39 |
## Native V1 Output
|
| 40 |
|
| 41 |
+
The Fitz-Tool reference wrapper returns an ordered candidate list:
|
| 42 |
+
|
| 43 |
+
| Field | Value | Intended use |
|
| 44 |
+
|---|---|---|
|
| 45 |
+
| `tool_id` | Registry-local tool identifier | The legal candidate proposed to the agent. |
|
| 46 |
+
| `tool_family` | Semantic tool family | Routing analysis and family-level holdouts. |
|
| 47 |
+
| `semantic_fingerprint` | Stable metadata fingerprint | Candidate identity across aliases and registry presentations. |
|
| 48 |
+
| `score` | Normalized cosine similarity | Relative ranking within the supplied candidate set. |
|
| 49 |
+
|
| 50 |
+
## Output Contract
|
| 51 |
+
|
| 52 |
+
The raw Hugging Face model returns normalized 384-dimensional embeddings. It
|
| 53 |
+
does not emit a tool name from a closed label set. A router embeds the current
|
| 54 |
+
decision state and every legal candidate, computes cosine similarity, and
|
| 55 |
+
returns the highest-scoring candidates:
|
| 56 |
|
| 57 |
```json
|
| 58 |
[
|
| 59 |
+
{
|
| 60 |
+
"tool_id": "inspect_record",
|
| 61 |
+
"tool_family": "code_inspection",
|
| 62 |
+
"semantic_fingerprint": "a1b2c3d4...",
|
| 63 |
+
"score": 0.81
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"tool_id": "search_catalog",
|
| 67 |
+
"tool_family": "search",
|
| 68 |
+
"semantic_fingerprint": "e5f6a7b8...",
|
| 69 |
+
"score": 0.63
|
| 70 |
+
}
|
| 71 |
]
|
| 72 |
```
|
| 73 |
|
| 74 |
+
Scores are relative to the legal candidate set supplied for that decision.
|
| 75 |
+
Candidate filtering, argument validation, execution, provenance checks, side-
|
| 76 |
+
effect policy, and recovery paging remain responsibilities of the surrounding
|
| 77 |
+
agent runtime.
|
| 78 |
+
|
| 79 |
+
## Intended Use
|
| 80 |
+
|
| 81 |
+
Use this model when an agent runtime needs fast local signals for:
|
| 82 |
+
|
| 83 |
+
- reducing a large legal tool registry to a short top-k candidate list,
|
| 84 |
+
- ranking tools from their capabilities and schemas rather than memorized names,
|
| 85 |
+
- routing across registries owned by different agents,
|
| 86 |
+
- proposing a fresh candidate page when an agent rejects the first page,
|
| 87 |
+
- improving tool selection for language models with weaker agentic behavior,
|
| 88 |
+
- keeping routing local on CPU-only systems.
|
| 89 |
+
|
| 90 |
+
This model is not intended to choose arguments, execute tools, verify facts,
|
| 91 |
+
authorize side effects, or replace deterministic runtime validation.
|
| 92 |
|
| 93 |
+
## Input Format
|
| 94 |
|
| 95 |
+
The query side should describe the objective and relevant decision state:
|
| 96 |
|
| 97 |
```text
|
| 98 |
Objective: Find the implementation corresponding to this SDK symbol.
|
|
|
|
| 113 |
Arguments: query (string required), scope (string optional).
|
| 114 |
```
|
| 115 |
|
| 116 |
+
Useful candidate fields include the description, capabilities, accepted and
|
| 117 |
+
returned modalities, evidence role, prerequisites, constraints, side effects,
|
| 118 |
+
and argument schema. Production integrations should preserve one consistent
|
| 119 |
+
serialization for both training and inference.
|
| 120 |
+
|
| 121 |
## Quick Start
|
| 122 |
|
| 123 |
```python
|
|
|
|
| 136 |
"Search public web pages. Capabilities: web search.",
|
| 137 |
]
|
| 138 |
|
| 139 |
+
query_embedding = model.encode([state], normalize_embeddings=True)
|
| 140 |
+
candidate_embeddings = model.encode(candidates, normalize_embeddings=True)
|
| 141 |
+
scores = (query_embedding @ candidate_embeddings.T)[0]
|
| 142 |
|
| 143 |
for index in scores.argsort()[::-1][:3]:
|
| 144 |
print(float(scores[index]), candidates[index])
|
| 145 |
```
|
| 146 |
|
| 147 |
+
The Fitz-Tool repository defines the complete state serialization, tool
|
| 148 |
+
registry, legal-candidate filtering, and runner contract used in evaluation.
|
| 149 |
+
|
| 150 |
+
## CPU Runtime
|
| 151 |
+
|
| 152 |
+
This repository contains the native SentenceTransformers checkpoint. No ONNX
|
| 153 |
+
export is included in this release. Candidate embeddings can be cached when a
|
| 154 |
+
registry is loaded, leaving only the current decision state to encode during
|
| 155 |
+
warm routing.
|
| 156 |
+
|
| 157 |
+
Unoptimized PyTorch CPU measurements on the release workstation:
|
| 158 |
+
|
| 159 |
+
| Legal candidate pool | Warm p50 | Warm p95 | Cold registry + query |
|
| 160 |
+
|---:|---:|---:|---:|
|
| 161 |
+
| 10 tools | 187 ms | 200 ms | 0.71 s |
|
| 162 |
+
| 30 tools | 292 ms | 295 ms | 1.07 s |
|
| 163 |
+
| 100 tools | 190 ms | 203 ms | 2.66 s |
|
| 164 |
+
|
| 165 |
+
The representative state text differs between pool sizes, so warm latency is
|
| 166 |
+
not expected to rise monotonically after candidate embeddings are cached.
|
| 167 |
+
Results are workstation-specific and should be remeasured in each deployment.
|
| 168 |
|
| 169 |
## Evaluation
|
| 170 |
|
| 171 |
+
All figures below measure raw encoder ranking. No downstream LLM choice, repair
|
| 172 |
controller, deterministic override, or tool execution is included.
|
| 173 |
|
| 174 |
| Frozen evaluation | Recall@1 | Recall@3 |
|
|
|
|
| 180 |
|
| 181 |
Additional frozen generic-registry Recall@3 is 0.9440. These suites exercise
|
| 182 |
opaque tool names, changed registry presentation, legal-candidate filtering,
|
| 183 |
+
hard negatives, and held-out workflows. ToolRet contains 60 independently
|
| 184 |
+
sampled queries, so its result has substantial sampling uncertainty. None of
|
| 185 |
+
these benchmarks establishes universal tool-routing accuracy.
|
| 186 |
|
| 187 |
+
## Training Data
|
| 188 |
|
| 189 |
| Field | Value |
|
| 190 |
|---|---|
|
|
|
|
| 192 |
| Parameters | approximately 33M |
|
| 193 |
| Embedding dimension | 384 |
|
| 194 |
| Maximum sequence length | 512 tokens |
|
| 195 |
+
| Training states | 40,181 unique answer-present states |
|
| 196 |
| Main objective | in-batch multiple-negative ranking loss |
|
| 197 |
| Final checkpoint | 90% established router + 10% full-replay specialist interpolation |
|
| 198 |
| Similarity | normalized cosine similarity |
|
| 199 |
|
| 200 |
+
| Training component | States | Role |
|
| 201 |
+
|---|---:|---|
|
| 202 |
+
| Established replay lineage | 35,081 | Generic, agentic, ToolRet, transition, and opaque-contrast routing. |
|
| 203 |
+
| Balanced hard subset | 5,100 | Difficult examples selected from a separate 25,000-row scaling cohort. |
|
| 204 |
+
| **Total** | **40,181** | Answer-present states used for the final specialist branch. |
|
| 205 |
+
|
| 206 |
+
Frozen evaluation questions were not added to training. Synthetic teacher
|
| 207 |
+
proposals were filtered through the repository's validation and data-lineage
|
| 208 |
+
workflow rather than being treated automatically as ground truth.
|
| 209 |
|
| 210 |
## Artifacts
|
| 211 |
|
|
|
|
| 214 |
- `model.safetensors`: standalone SentenceTransformers checkpoint,
|
| 215 |
- tokenizer and BERT configuration files,
|
| 216 |
- pooling and normalization modules,
|
| 217 |
+
- `nomos_training_manifest.json`: inherited training-lineage metadata,
|
| 218 |
- `nomos_interpolation_manifest.json`: final 90/10 interpolation record,
|
| 219 |
+
- `nomos_calibration.json`: optional abstention-calibration metadata.
|
| 220 |
|
| 221 |
The SHA-256 digest of `model.safetensors` in this release is
|
| 222 |
`429fb204e4a38c1514c5a232376600fb4d3c6d2e82e9e27951cdfdeada27fca8`.
|
| 223 |
|
| 224 |
## Limitations
|
| 225 |
|
| 226 |
+
1. **Top-k retrieval, not execution.** The checkpoint ranks candidates but
|
| 227 |
does not select arguments, execute tools, or establish provenance.
|
| 228 |
2. **English-centric synthetic training.** Multilingual performance has not
|
| 229 |
been established.
|
|
|
|
| 233 |
state fields can produce incorrect rankings.
|
| 234 |
5. **Abstention is separate.** The included calibration is an optional policy
|
| 235 |
signal and should be validated again for each integration distribution.
|
| 236 |
+
6. **Warm latency assumes caching.** New or frequently changing registries pay
|
| 237 |
+
the candidate-embedding cost before ranking.
|
| 238 |
|
| 239 |
## License
|
| 240 |
|