cjdd3b commited on
Commit
ac20c52
·
verified ·
1 Parent(s): 7248cac

v0.2.0: broad-question consistency fine-tune (108), web export, card

Browse files
Files changed (6) hide show
  1. README.md +36 -12
  2. cite.json +6 -6
  3. encoder/config.json +1 -1
  4. web/cite-web.json +13 -13
  5. web/model.onnx +1 -1
  6. weights.safetensors +1 -1
README.md CHANGED
@@ -29,7 +29,7 @@ calibrated probability per paragraph and two thresholds (`needed`,
29
  | **Task** | Paragraph citation / needed-blocks |
30
  | **Size** | ~42 MB weights (trimmed vocab, int8 embeddings, fp16 rest) |
31
  | **Runtime** | CPU (PyTorch); browser (ONNX Runtime WASM) |
32
- | **Weights** | [v0.1.0](https://huggingface.co/localangle/cite/tree/v0.1.0) · [`web/`](https://huggingface.co/localangle/cite/tree/main/web) for WASM |
33
  | **Demo** | [localangle/cite-demo](https://huggingface.co/spaces/localangle/cite-demo) (in-browser) |
34
 
35
  Cite does **not** write an answer. It ranks the paragraphs you already have and
@@ -72,8 +72,8 @@ for score in scores:
72
  print(score.index, score.probability, paragraphs[score.index])
73
  ```
74
 
75
- `score.needed` uses the packaged threshold (0.71). `score.contributing` is a
76
- looser relatedness cut (0.15). Logits are Platt-scaled to probabilities at load
77
  time; you do not fit thresholds yourself for the published package.
78
 
79
  Load a local folder the same way:
@@ -102,14 +102,34 @@ news outlets; threshold chosen on a separate calibration split):
102
 
103
  | Metric | Cite-32M package |
104
  | --- | --- |
105
- | Coverage | 0.696 |
106
- | Exact set match | 0.727 |
107
- | Empty-set accuracy | 0.895 |
108
- | Any-extra rate | 0.057 |
109
-
110
- Same operating point as the fp32 student within the packaging tolerance. See
111
- the research reports in the [cite](https://github.com/localangle/cite) repository
112
- (`experiments/105-cite-distill`, `experiments/106-cite-compress`).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
 
114
  ## Latency
115
 
@@ -124,12 +144,16 @@ Cite is a fine-tuned [Ettin](https://huggingface.co/jhu-clsp/ettin-encoder-32m)
124
  encoder (ModernBERT family). The question and each paragraph are packed into
125
  one sequence with a `[MASK]` marker before every paragraph; the head reads the
126
  marker states. A 400M teacher labeled real news; the 32M student was distilled
127
- and then compressed (trimmed vocabulary, int8 embeddings, fp16 weights).
 
 
128
 
129
  ## Limitations
130
 
131
  - Cite ranks paragraphs; it does not generate answers or quote spans inside a
132
  paragraph.
 
 
133
  - Eval is English news-style text. Other domains are unmeasured.
134
  - Empty-set accuracy drops a few points from calibration to eval; treat the
135
  packaged threshold as a starting point for a new domain.
 
29
  | **Task** | Paragraph citation / needed-blocks |
30
  | **Size** | ~42 MB weights (trimmed vocab, int8 embeddings, fp16 rest) |
31
  | **Runtime** | CPU (PyTorch); browser (ONNX Runtime WASM) |
32
+ | **Weights** | [v0.2.0](https://huggingface.co/localangle/cite/tree/v0.2.0) · [`web/`](https://huggingface.co/localangle/cite/tree/main/web) for WASM |
33
  | **Demo** | [localangle/cite-demo](https://huggingface.co/spaces/localangle/cite-demo) (in-browser) |
34
 
35
  Cite does **not** write an answer. It ranks the paragraphs you already have and
 
72
  print(score.index, score.probability, paragraphs[score.index])
73
  ```
74
 
75
+ `score.needed` uses the packaged threshold (0.72). `score.contributing` is a
76
+ looser relatedness cut (0.19). Logits are Platt-scaled to probabilities at load
77
  time; you do not fit thresholds yourself for the published package.
78
 
79
  Load a local folder the same way:
 
102
 
103
  | Metric | Cite-32M package |
104
  | --- | --- |
105
+ | Coverage | 0.695 |
106
+ | Exact set match | 0.719 |
107
+ | Empty-set accuracy | 0.900 |
108
+ | Any-extra rate | 0.072 |
109
+
110
+ The browser ONNX build matches these on the same eval (exact 0.724, empty
111
+ 0.902).
112
+
113
+ ### Broad and abstract questions
114
+
115
+ The eval above uses specific fact-lookup questions. v0.2.0 adds a second
116
+ training stage so that broad questions ("How will the library change as a result
117
+ of the renovations?") score the paragraph that answers them instead of washing
118
+ out. On a 117-item hand-written probe (specific question vs. an abstract
119
+ rewrite of it, same target paragraph; 92 items after removing 25 where more
120
+ than one paragraph plausibly answers the rewrite):
121
+
122
+ | Abstract question | v0.1.0 | v0.2.0 |
123
+ | --- | --- | --- |
124
+ | Top-1 (all 117) | 0.650 | 0.744 |
125
+ | Needed recall (all 117) | 0.402 | 0.752 |
126
+ | Top-1 (92 audited) | 0.826 | 0.848 |
127
+ | Needed recall (92 audited) | 0.511 | 0.848 |
128
+ | Median gold-paragraph probability (all) | 0.627 | 0.942 |
129
+
130
+ Specific-question probe results did not regress (top-1 0.949). The probe is small
131
+ and written by one author; treat it as a regression check, not a benchmark. See
132
+ `experiments/107-cite-abstract-probe` and `experiments/108-cite-broad-consistency`.
133
 
134
  ## Latency
135
 
 
144
  encoder (ModernBERT family). The question and each paragraph are packed into
145
  one sequence with a `[MASK]` marker before every paragraph; the head reads the
146
  marker states. A 400M teacher labeled real news; the 32M student was distilled
147
+ then fine-tuned on LLM-written broad rewrites of its training questions
148
+ (consistency distillation), and compressed (trimmed vocabulary, int8
149
+ embeddings, fp16 weights).
150
 
151
  ## Limitations
152
 
153
  - Cite ranks paragraphs; it does not generate answers or quote spans inside a
154
  paragraph.
155
+ - Lexical overlap still matters: "big 10" and "Big Ten" can score differently.
156
+ Scores for a paragraph also drift down in very long articles.
157
  - Eval is English news-style text. Other domains are unmeasured.
158
  - Empty-set accuracy drops a few points from calibration to eval; treat the
159
  packaged threshold as a starting point for a new domain.
cite.json CHANGED
@@ -4,8 +4,8 @@
4
  "marker": "mask",
5
  "max_tokens": 7999,
6
  "platt": {
7
- "bias": 0.28167128937742075,
8
- "slope": 0.6159961343551152
9
  },
10
  "readout": "mlm_head",
11
  "source": {
@@ -13,13 +13,13 @@
13
  "repo": "jhu-clsp/ettin-encoder-32m",
14
  "revision": "1b8ba06455dd44f80fc9c1ca9e22806157a57379"
15
  },
16
- "experiment": "experiments/106-cite-compress",
17
- "student": "cjdd3b/angle-core-private-evals/105-clip-32m-distill"
18
  },
19
  "storage": "token embeddings int8 per row; other weights fp16; computed in fp32",
20
  "thresholds": {
21
- "contributing": 0.15,
22
- "needed": 0.71,
23
  "needed_rule": "lowest threshold with graf_calibration empty-set accuracy >= 0.93 (104 amendment), per variant"
24
  },
25
  "vocabulary_full": 50368
 
4
  "marker": "mask",
5
  "max_tokens": 7999,
6
  "platt": {
7
+ "bias": -0.20788197094514388,
8
+ "slope": 0.6112809889428109
9
  },
10
  "readout": "mlm_head",
11
  "source": {
 
13
  "repo": "jhu-clsp/ettin-encoder-32m",
14
  "revision": "1b8ba06455dd44f80fc9c1ca9e22806157a57379"
15
  },
16
+ "experiment": "experiments/108-cite-broad-consistency",
17
+ "student": "cjdd3b/angle-core-private-evals/108-cite-broad-consistency"
18
  },
19
  "storage": "token embeddings int8 per row; other weights fp16; computed in fp32",
20
  "thresholds": {
21
+ "contributing": 0.19,
22
+ "needed": 0.72,
23
  "needed_rule": "lowest threshold with graf_calibration empty-set accuracy >= 0.93 (104 amendment), per variant"
24
  },
25
  "vocabulary_full": 50368
encoder/config.json CHANGED
@@ -62,6 +62,6 @@
62
  "sparse_pred_ignore_index": -100,
63
  "sparse_prediction": false,
64
  "tie_word_embeddings": true,
65
- "transformers_version": "5.17.0",
66
  "vocab_size": 41655
67
  }
 
62
  "sparse_pred_ignore_index": -100,
63
  "sparse_prediction": false,
64
  "tie_word_embeddings": true,
65
+ "transformers_version": "5.22.1",
66
  "vocab_size": 41655
67
  }
web/cite-web.json CHANGED
@@ -1,15 +1,15 @@
1
  {
2
  "check": {
3
- "max_abs_drift": 0.14566,
4
  "ort_logits": [
5
- -0.56092,
6
- 6.50446,
7
- -10.71199
8
  ],
9
  "torch_logits": [
10
- -0.55125,
11
- 6.42715,
12
- -10.85765
13
  ]
14
  },
15
  "cls_token_id": 50281,
@@ -19,8 +19,8 @@
19
  "max_tokens_package": 7999,
20
  "model": "model.onnx",
21
  "platt": {
22
- "bias": 0.28167128937742075,
23
- "slope": 0.6159961343551152
24
  },
25
  "quantization": "int8-mixed-rr",
26
  "sep_token_id": 50282,
@@ -31,12 +31,12 @@
31
  "repo": "jhu-clsp/ettin-encoder-32m",
32
  "revision": "1b8ba06455dd44f80fc9c1ca9e22806157a57379"
33
  },
34
- "experiment": "experiments/106-cite-compress",
35
- "student": "cjdd3b/angle-core-private-evals/105-clip-32m-distill"
36
  },
37
  "thresholds": {
38
- "contributing": 0.15,
39
- "needed": 0.71,
40
  "needed_rule": "lowest threshold with graf_calibration empty-set accuracy >= 0.93 (104 amendment), per variant"
41
  },
42
  "tokenizer": "tokenizer",
 
1
  {
2
  "check": {
3
+ "max_abs_drift": 0.73542,
4
  "ort_logits": [
5
+ -1.95314,
6
+ 7.07392,
7
+ -8.72236
8
  ],
9
  "torch_logits": [
10
+ -1.21772,
11
+ 7.04268,
12
+ -8.94507
13
  ]
14
  },
15
  "cls_token_id": 50281,
 
19
  "max_tokens_package": 7999,
20
  "model": "model.onnx",
21
  "platt": {
22
+ "bias": -0.20788197094514388,
23
+ "slope": 0.6112809889428109
24
  },
25
  "quantization": "int8-mixed-rr",
26
  "sep_token_id": 50282,
 
31
  "repo": "jhu-clsp/ettin-encoder-32m",
32
  "revision": "1b8ba06455dd44f80fc9c1ca9e22806157a57379"
33
  },
34
+ "experiment": "experiments/108-cite-broad-consistency",
35
+ "student": "cjdd3b/angle-core-private-evals/108-cite-broad-consistency"
36
  },
37
  "thresholds": {
38
+ "contributing": 0.19,
39
+ "needed": 0.72,
40
  "needed_rule": "lowest threshold with graf_calibration empty-set accuracy >= 0.93 (104 amendment), per variant"
41
  },
42
  "tokenizer": "tokenizer",
web/model.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:01519d20a260dd5dde5e47d93e54295cec53e1f767445f558b64c6f2eeba5664
3
  size 36324533
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4574f34f042f07bc7d9000650dac164d10336c79aa1cff5b8030bd343be21dbc
3
  size 36324533
weights.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:88110b9fe6cbd84b5534e5957322d8e925bdae8785aefbec3771a8263a639aba
3
  size 41750550
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cdf8757387e373d1285eab4b34cf2db8e4f4f8aa3e510f19144b48738f37b7e3
3
  size 41750550