scombat commited on
Commit
3c25f48
·
verified ·
1 Parent(s): 507fa16

Card: pipeline and TEI warning, loader from the Hub, link to the main card

Browse files
Files changed (1) hide show
  1. README.md +13 -10
README.md CHANGED
@@ -16,14 +16,18 @@ tags:
16
  # s1d1-router, six sources, tiny, PyTorch fp16 (safetensors)
17
 
18
  A "System 1" router: it reads a user prompt and returns its complexity score (0.01 to 1.00), its task type (19 classes)
19
- and whether it needs tools. It never picks a model; the deployer maps these outputs to models with rules.
 
 
20
 
21
  - Variant: `v7_small_l6-fp16`, mmBERT-small cut to 6 layers, 32k vocabulary, distilled from the full model.
22
  - Format: PyTorch fp16 (safetensors), 85 MB.
23
  - Outputs: 21 logits. Output 0 is the complexity in tier units (score = 0.5 + 0.25 x output, clipped to 0.01..1.00),
24
- outputs 1 to 19 are the task logits, output 20 is the needs_tools logit. Task order and decoding:
25
- `release/s1d1-router/s1d1_router.py` in the project.
26
- - Pruned vocabulary variants ship `vocab_map.npy` (full tokenizer id -> pruned id); the project's loader applies it.
 
 
27
 
28
  ## Measures (validation, 4,914 rows, six sources, unweighted)
29
 
@@ -38,13 +42,12 @@ Full results and method: `docs/15-catalog-v4-v7.md` in the project; `eval.json`
38
 
39
  ## Use
40
 
41
- ```bash
42
- hf download scombat/s1d1-router-6src-tiny --local-dir s1d1-router-tiny
43
- ```
44
 
45
  ```python
46
- from s1d1_router import Router # release/s1d1-router/s1d1_router.py in the project
47
- router = Router("s1d1-router-tiny")
48
  router.route(["Quelle est la capitale de l'Australie ?"])
49
  ```
50
 
@@ -63,6 +66,6 @@ condition).
63
  title = {s1d1-router: a one-pass multilingual router for LLM requests},
64
  author = {scombat},
65
  year = {2026},
66
- howpublished = {\url{https://huggingface.co/scombat}}
67
  }
68
  ```
 
16
  # s1d1-router, six sources, tiny, PyTorch fp16 (safetensors)
17
 
18
  A "System 1" router: it reads a user prompt and returns its complexity score (0.01 to 1.00), its task type (19 classes)
19
+ and whether it needs tools. It never picks a model; the deployer maps these outputs to models with rules. The method,
20
+ the training data, the full results and the limitations are in the card of the main repository,
21
+ [scombat/s1d1-router](https://huggingface.co/scombat/s1d1-router).
22
 
23
  - Variant: `v7_small_l6-fp16`, mmBERT-small cut to 6 layers, 32k vocabulary, distilled from the full model.
24
  - Format: PyTorch fp16 (safetensors), 85 MB.
25
  - Outputs: 21 logits. Output 0 is the complexity in tier units (score = 0.5 + 0.25 x output, clipped to 0.01..1.00),
26
+ outputs 1 to 19 are the task logits (order in `task_names` of `config.json`), output 20 is the needs_tools logit.
27
+ - Pruned vocabulary variants ship `vocab_map.npy` (full tokenizer id -> pruned id); the loader below applies it.
28
+ - **Do not read it through `pipeline("text-classification")` with its defaults, nor through Text Embeddings
29
+ Inference**: both apply one softmax over the 21 outputs. `config.json` declares `problem_type: regression`, so
30
+ `pipeline(..., top_k=None)` returns the raw outputs; decode them as the main card shows.
31
 
32
  ## Measures (validation, 4,914 rows, six sources, unweighted)
33
 
 
42
 
43
  ## Use
44
 
45
+ `s1d1_router.py` from [scombat/s1d1-router](https://huggingface.co/scombat/s1d1-router) loads this repository directly (Python >= 3.10,
46
+ `tokenizers`, `huggingface_hub` and `torch`):
 
47
 
48
  ```python
49
+ from s1d1_router import Router
50
+ router = Router("scombat/s1d1-router-6src-tiny")
51
  router.route(["Quelle est la capitale de l'Australie ?"])
52
  ```
53
 
 
66
  title = {s1d1-router: a one-pass multilingual router for LLM requests},
67
  author = {scombat},
68
  year = {2026},
69
+ howpublished = {\url{https://huggingface.co/scombat/s1d1-router}}
70
  }
71
  ```