Release reflex-search v0.4.1 (gemini-4-carbon anti-overextraction WSP + bar_locked ECE 0.0248)
Browse files- README.md +14 -27
- calibration.json +16 -16
- heads.json +5 -5
- heads.safetensors +1 -1
README.md
CHANGED
|
@@ -14,39 +14,26 @@ tags:
|
|
| 14 |
- mcp
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# `youdotcom/reflex-search` (`v0.4.
|
| 18 |
|
| 19 |
-
`v0.4.
|
| 20 |
|
| 21 |
It powers the `reflex-search` and `reflex-extract` MCP tools (`https://api.you.com/mcp/reflex`):
|
| 22 |
|
| 23 |
1. **Gate 1 (Sub-query preflight):** Scores parallel candidate sub-queries (`noul_query_matches_intent`, `choice_best_query_for_intent`) to filter off-topic hallucinations and rank over-budget queries before spending Search API calls.
|
| 24 |
-
2. **Gate 2 (Unified SERP + Knowledge ranking & routing):** Scores web highlights and licensed knowledge facts (`attribution` + `as_of`) on one unified relevance scale (`choice_best_search_hit` + `score_return_relevance`), estimates counterfactual full-page read gain (`noul_hit_worth_reading`), and scores set-level coverage (`score_evidence_coverage` + `choice_next_step` in `{answer, read, revise, stop}`).
|
| 25 |
-
3. **Parallel Extract Intent Scoring:** Scores
|
| 26 |
|
| 27 |
---
|
| 28 |
|
| 29 |
-
##
|
| 30 |
|
| 31 |
-
`v0.4.
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
- **`
|
| 36 |
-
- **Sealed Benchmark Holdout-53 (`int8` `libs1_eg2cpu` FFI):** Improves out-of-distribution `
|
| 37 |
-
|
| 38 |
-
---
|
| 39 |
-
|
| 40 |
-
## Architecture & Artifact Layout
|
| 41 |
-
|
| 42 |
-
| File | Format | Size | Contents |
|
| 43 |
-
| :--- | :--- | ---: | :--- |
|
| 44 |
-
| `model.safetensors` | `BF16` | `517 MB` | Frozen text-only `google/embeddinggemma-2` weights (`language_model.*`; zero vision/audio weights) |
|
| 45 |
-
| `heads.safetensors` | `F32` | `58 MB` | Rank-16 LoRA (`layers [17, 20, 21, 22, 23]` + `embedding_projection`, bypassed during prompt embedding for `0.0` retrieval drift) + `v0.4.0` `ChoiceHead`, `NoulHead`, and `ScoreHead` |
|
| 46 |
-
| `heads.json` | JSON | `9.8 KB` | Head dimensions, query templates, LoRA metadata, and `v0.4.0` `(T, b)` calibration tables |
|
| 47 |
-
| `calibration.json` | JSON | `2.6 KB` | Single-shot untouched `bar_locked` holdout seal (`v0.4.0`) |
|
| 48 |
-
| `tokenizer.json` | JSON | `31 MB` | Gemma fast BPE tokenizer |
|
| 49 |
-
| `config.json` | JSON | `5.0 KB` | Backbone text configuration |
|
| 50 |
|
| 51 |
---
|
| 52 |
|
|
@@ -54,10 +41,10 @@ It powers the `reflex-search` and `reflex-extract` MCP tools (`https://api.you.c
|
|
| 54 |
|
| 55 |
| Cell | Holdout Rows | Proper Loss (vs. Base Rate) | Accuracy / Conditional RPS | Quantile ECE (Gate `<= 0.045`) | Perturbation JS (Gate `<= 0.005`) |
|
| 56 |
| :--- | ---: | :--- | :--- | :--- | :--- |
|
| 57 |
-
| **`Choice:text`** | `2,024` | `0.
|
| 58 |
-
| **`Noul:text`** | `2,040` | `0.
|
| 59 |
-
| **`Score:text`** | `2,091` | `0.
|
| 60 |
-
| **Combined** | **`6,155`** | **All `3/3` Heads Admitted** | — | **`0.
|
| 61 |
|
| 62 |
---
|
| 63 |
|
|
|
|
| 14 |
- mcp
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# `youdotcom/reflex-search` (`v0.4.1`)
|
| 18 |
|
| 19 |
+
`v0.4.1` release of `reflex-search` — a compact, CPU-native System 1 search decision and source-ranking model built on the text encoder of [`google/embeddinggemma-2`](https://huggingface.co/google/embeddinggemma-2) (`d = 768`, 24 text layers with hybrid 512-token sliding and global full attention). Vision and audio towers are removed so the text-only `bf16` checkpoint occupies **517 MB on disk** and runs in **~196 MB RSS (`int8`) / ~315 MB RSS (`bf16`)** on commodity CPUs via `s1_eg2cpu` (adapted from `undrgrnd-labs/hunch/eg2cpu`).
|
| 20 |
|
| 21 |
It powers the `reflex-search` and `reflex-extract` MCP tools (`https://api.you.com/mcp/reflex`):
|
| 22 |
|
| 23 |
1. **Gate 1 (Sub-query preflight):** Scores parallel candidate sub-queries (`noul_query_matches_intent`, `choice_best_query_for_intent`) to filter off-topic hallucinations and rank over-budget queries before spending Search API calls.
|
| 24 |
+
2. **Gate 2 (Unified SERP + Knowledge ranking & turn-adaptive routing):** Scores web highlights and licensed knowledge facts (`attribution` + `as_of`) on one unified relevance scale (`choice_best_search_hit` + `score_return_relevance`), estimates counterfactual full-page read gain (`noul_hit_worth_reading`), and scores set-level coverage (`score_evidence_coverage` + `choice_next_step` in `{answer, read, revise, stop}`).
|
| 25 |
+
3. **Parallel Extract Intent Scoring:** Scores dual-window BM25 webpage and PDF passages against caller-supplied `document_intent` (`score_extract_relevance` on `doc_kind = "extracted_doc"`).
|
| 26 |
|
| 27 |
---
|
| 28 |
|
| 29 |
+
## Progression Across `v0.3.3 → v0.4.0 → v0.4.1`
|
| 30 |
|
| 31 |
+
`v0.4.1` completes a two-stage Weight-Space Programming progression (`69` declarative operations, `836` parameters in `heads.safetensors` + `heads.json`; `model.safetensors` and `tokenizer.json` unchanged for `0.0` embedding drift) derived strictly from multi-rollout counterfactual trajectories on a 54-task Discovery Split (`0` overlap with `bar_locked` or the 53-task benchmark Holdout Split):
|
| 32 |
|
| 33 |
+
1. **`v0.4.0` (Empirical-Bayes Moderated-$t$ Multi-Head WSP):** Refined top discriminative post-SiLU units across `ChoiceHead` and `NoulHead` + `ScoreHead` rank temperature, lifting Arena-30 `pass@5` by `+1.62 pp` and streaming score by `+3.28 pts`.
|
| 34 |
+
2. **`v0.4.1` (`google/gemini-4-carbon` Anti-Overextraction WSP):** Mined `676` clean-pass vs. `440` over-extracting turn-exhausted `v0.4.0` Discovery-Split rollouts to suppress distractor `worth_reading` traps while sharpening `ChoiceHead` recall:
|
| 35 |
+
- **Untouched `bar_locked` (`6,155` rows):** Reduces overall Quantile ECE to **`0.0248`** (best of all versions, vs. `0.0262` in `v0.3.3` and `0.0266` in `v0.4.0`), lowers overall Perturbation JS by **`11.1%`** (`0.00113 → 0.00101 <= 0.005`), and lifts 5-way `Choice:text` accuracy to **`49.60%`**.
|
| 36 |
+
- **Sealed Benchmark Holdout-53 (`int8` `libs1_eg2cpu` FFI):** Improves out-of-distribution `winningRecall@6` to **`55.46%`** (`+6.36 pp` over `v0.3.3` prod; `+0.91 pp` over `v0.4.0`) and `worthReadingAlignment` to **`0.8768`** (`+0.87 pp` over `v0.3.3`; `+0.51 pp` over `v0.4.0`).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
---
|
| 39 |
|
|
|
|
| 41 |
|
| 42 |
| Cell | Holdout Rows | Proper Loss (vs. Base Rate) | Accuracy / Conditional RPS | Quantile ECE (Gate `<= 0.045`) | Perturbation JS (Gate `<= 0.005`) |
|
| 43 |
| :--- | ---: | :--- | :--- | :--- | :--- |
|
| 44 |
+
| **`Choice:text`** | `2,024` | `0.1249 < 0.1599` | `49.6%` (`5`-way) | `0.0252` (`-17.9%` vs `v0.3.3`) | `0.00067` (`-15.5%` vs `v0.3.3`) |
|
| 45 |
+
| **`Noul:text`** | `2,040` | `0.1587 < 0.2500` | `77.3%` | `0.0302` (`-18.8%` vs `v0.4.0`) | `0.00120` (`-7.3%` vs `v0.3.3`) |
|
| 46 |
+
| **`Score:text`** | `2,091` | `0.1284 < 0.3340` | `RPS 0.1685 < 0.2004` | `0.0192` | `0.00114` (`-12.2%` vs `v0.3.3`) |
|
| 47 |
+
| **Combined** | **`6,155`** | **All `3/3` Heads Admitted** | — | **`0.0248 <= 0.040`** | **`0.00101 <= 0.005`** |
|
| 48 |
|
| 49 |
---
|
| 50 |
|
calibration.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"version": "0.4.
|
| 3 |
"backbone": "google/embeddinggemma-2",
|
| 4 |
"admitted_heads": [
|
| 5 |
"Choice",
|
|
@@ -7,37 +7,37 @@
|
|
| 7 |
"Score"
|
| 8 |
],
|
| 9 |
"all_text_cells_passed": true,
|
| 10 |
-
"overall_text_ece": 0.
|
| 11 |
-
"overall_text_js": 0.
|
| 12 |
"cells": {
|
| 13 |
"Choice:text": {
|
| 14 |
"rows": 2024,
|
| 15 |
-
"proper": 0.
|
| 16 |
"baseRate": 0.15993022918701172,
|
| 17 |
-
"accuracy": 0.
|
| 18 |
-
"ece": 0.
|
| 19 |
-
"js": 0.
|
| 20 |
"admitted": true
|
| 21 |
},
|
| 22 |
"Noul:text": {
|
| 23 |
"rows": 2040,
|
| 24 |
-
"proper": 0.
|
| 25 |
"baseRate": 0.25,
|
| 26 |
-
"accuracy": 0.
|
| 27 |
-
"ece": 0.
|
| 28 |
-
"js": 0.
|
| 29 |
"admitted": true
|
| 30 |
},
|
| 31 |
"Score:text": {
|
| 32 |
"rows": 2091,
|
| 33 |
-
"proper": 0.
|
| 34 |
"baseRate": 0.3339491779521442,
|
| 35 |
-
"conditionalRps": 0.
|
| 36 |
"conditionalRpsBase": 0.20038728415966034,
|
| 37 |
-
"ece": 0.
|
| 38 |
"presenceEce": 2.9e-05,
|
| 39 |
-
"rankEce": 0.
|
| 40 |
-
"js": 0.
|
| 41 |
"admitted": true
|
| 42 |
},
|
| 43 |
"Choice:image": {
|
|
|
|
| 1 |
{
|
| 2 |
+
"version": "0.4.1",
|
| 3 |
"backbone": "google/embeddinggemma-2",
|
| 4 |
"admitted_heads": [
|
| 5 |
"Choice",
|
|
|
|
| 7 |
"Score"
|
| 8 |
],
|
| 9 |
"all_text_cells_passed": true,
|
| 10 |
+
"overall_text_ece": 0.024804,
|
| 11 |
+
"overall_text_js": 0.001006,
|
| 12 |
"cells": {
|
| 13 |
"Choice:text": {
|
| 14 |
"rows": 2024,
|
| 15 |
+
"proper": 0.124858,
|
| 16 |
"baseRate": 0.15993022918701172,
|
| 17 |
+
"accuracy": 0.496047,
|
| 18 |
+
"ece": 0.025221,
|
| 19 |
+
"js": 0.000666,
|
| 20 |
"admitted": true
|
| 21 |
},
|
| 22 |
"Noul:text": {
|
| 23 |
"rows": 2040,
|
| 24 |
+
"proper": 0.158729,
|
| 25 |
"baseRate": 0.25,
|
| 26 |
+
"accuracy": 0.772549,
|
| 27 |
+
"ece": 0.030164,
|
| 28 |
+
"js": 0.001204,
|
| 29 |
"admitted": true
|
| 30 |
},
|
| 31 |
"Score:text": {
|
| 32 |
"rows": 2091,
|
| 33 |
+
"proper": 0.128448,
|
| 34 |
"baseRate": 0.3339491779521442,
|
| 35 |
+
"conditionalRps": 0.168495,
|
| 36 |
"conditionalRpsBase": 0.20038728415966034,
|
| 37 |
+
"ece": 0.019171,
|
| 38 |
"presenceEce": 2.9e-05,
|
| 39 |
+
"rankEce": 0.038312,
|
| 40 |
+
"js": 0.001141,
|
| 41 |
"admitted": true
|
| 42 |
},
|
| 43 |
"Choice:image": {
|
heads.json
CHANGED
|
@@ -34,8 +34,8 @@
|
|
| 34 |
"b_abstain": -0.058805350214242935
|
| 35 |
},
|
| 36 |
"choice_best_search_hit": {
|
| 37 |
-
"T": 1.
|
| 38 |
-
"b_abstain": -0.
|
| 39 |
},
|
| 40 |
"choice_next_step": {
|
| 41 |
"T": 0.5006811022758484,
|
|
@@ -52,15 +52,15 @@
|
|
| 52 |
"b": -0.8235207292718201
|
| 53 |
},
|
| 54 |
"noul_hit_worth_reading": {
|
| 55 |
-
"T": 0.
|
| 56 |
-
"b": 0.
|
| 57 |
}
|
| 58 |
},
|
| 59 |
"score": {
|
| 60 |
"score_return_relevance": {
|
| 61 |
"T_pres": 0.4000000059604645,
|
| 62 |
"b_pres": 0.6136154532432556,
|
| 63 |
-
"T_rank": 2.
|
| 64 |
"b_rank": [
|
| 65 |
0.09833735227584839,
|
| 66 |
0.039705585688352585,
|
|
|
|
| 34 |
"b_abstain": -0.058805350214242935
|
| 35 |
},
|
| 36 |
"choice_best_search_hit": {
|
| 37 |
+
"T": 1.74,
|
| 38 |
+
"b_abstain": -0.288
|
| 39 |
},
|
| 40 |
"choice_next_step": {
|
| 41 |
"T": 0.5006811022758484,
|
|
|
|
| 52 |
"b": -0.8235207292718201
|
| 53 |
},
|
| 54 |
"noul_hit_worth_reading": {
|
| 55 |
+
"T": 0.868,
|
| 56 |
+
"b": 0.2815
|
| 57 |
}
|
| 58 |
},
|
| 59 |
"score": {
|
| 60 |
"score_return_relevance": {
|
| 61 |
"T_pres": 0.4000000059604645,
|
| 62 |
"b_pres": 0.6136154532432556,
|
| 63 |
+
"T_rank": 2.03,
|
| 64 |
"b_rank": [
|
| 65 |
0.09833735227584839,
|
| 66 |
0.039705585688352585,
|
heads.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 61226932
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39f7efcfdaa27c7d3ca3621fc70cc143571ac7548734008354e685d8004dfce8
|
| 3 |
size 61226932
|