CCRss commited on
Commit
44fc906
·
verified ·
1 Parent(s): 23fade1

Initial release: R14 endpoint (sibling-distilled capability-floor probe)

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst 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
README.md ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gemma
3
+ language:
4
+ - en
5
+ - kk
6
+ base_model:
7
+ - google/gemma-3-270m
8
+ pipeline_tag: text-generation
9
+ tags:
10
+ - edge-cloud-routing
11
+ - verbalized-confidence
12
+ - self-aware
13
+ - routing
14
+ - continual-learning
15
+ - multi-round
16
+ - sibling-distilled
17
+ - capability-floor
18
+ library_name: transformers
19
+ ---
20
+
21
+ # FogGen (Gemma-3-270m, sibling-distilled): capability-floor R14 endpoint
22
+
23
+ > **The 270M-parameter capability-floor probe of the FogGen recipe.** Sibling-distilled from the Gemma-3-1b-it buffer to install the FogGen output format, then run through the same 14-round self-evolving chain. Demonstrates the recipe pays off at deployment-grade magnitudes from roughly 0.6B upward; below that, lift becomes order-of-magnitude smaller and a sibling-distilled SFT pass is required to install the format at all.
24
+
25
+ This is a **capability-floor diagnostic checkpoint**, not a deployment model. The canonical deployment endpoint is [`issai/foggen`](https://huggingface.co/issai/foggen) at the 0.6B scale.
26
+
27
+ For background on the system overview, training pipeline, and routing protocol, see the [`issai/foggen`](https://huggingface.co/issai/foggen) model card.
28
+
29
+ ## Why this exists
30
+
31
+ Native zero-shot routing is infeasible at the 270M scale: no prompting or constrained-decoding setup we tried exceeded 54% format compliance on the FogGen output schema (the model fails to emit the `Confidence:`/`Final answer:` pattern reliably enough to extract a routing signal). We therefore probe this scale with a two-stage protocol:
32
+
33
+ 1. **Sibling-distillation SFT pass** — one round of SFT on the calibration buffer of the [Gemma-3-1b-it sibling](https://huggingface.co/issai/foggen-gemma3-1b), using the larger model's bucket labels as targets. This installs the FogGen format on the 270M backbone.
34
+ 2. **Standard 14-round chain** — identical recipe to [`issai/foggen`](https://huggingface.co/issai/foggen) from there: 7 domain rotation, LoRA r=16 α=32, bf16, 2 epochs/round, same cloud teacher.
35
+
36
+ The released checkpoint is R14 of the post-distillation chain.
37
+
38
+ ## Performance
39
+
40
+ System accuracy at τ=0.5 on the seven MCQ domains (full test sets, ~16,200 queries). Cloud baseline is Qwen3-30B-A3B-Instruct-2507.
41
+
42
+ | Domain | Cloud only | R14 raw | Random @ τ=0.5 | **FogGen @ τ=0.5** | Cloud routed |
43
+ |---|---|---|---|---|---|
44
+ | Finance | 69.5% | 32.2% | 58.2% | **60.2%** | 69.5% |
45
+ | Science | 72.7% | 30.4% | 58.2% | **59.5%** | 65.6% |
46
+ | Coding | 74.2% | 34.3% | 64.7% | **65.7%** | 76.3% |
47
+ | Law | 70.7% | 31.7% | 58.5% | **59.7%** | 68.7% |
48
+ | Math | 60.1% | 24.5% | 58.3% | **58.5%** | 94.9% |
49
+ | Kazakh culture | 95.8% | 43.7% | 60.3% | **59.3%** | 31.9% |
50
+ | Medical | 74.0% | 32.2% | 59.8% | **60.8%** | 65.9% |
51
+ | **Mean** | **73.9%** | **32.7%** | **59.7%** | **60.5%** | **67.5%** |
52
+
53
+ **Routing benefit over Random: +0.8 percentage points mean at τ=0.5** — positive on six of seven domains, negative on Kazakh culture (the headroom-collapse domain).
54
+
55
+ Compared to [`issai/foggen`](https://huggingface.co/issai/foggen) (+4.6 pp at 0.6B) and [`issai/foggen-gemma3-1b`](https://huggingface.co/issai/foggen-gemma3-1b) (+5.9 pp at 1B), the lift here is an order of magnitude smaller. The recipe still produces positive lift, but the magnitude scales sharply with edge capacity below the 0.6B mark.
56
+
57
+ ## When to use this
58
+
59
+ This checkpoint is intended for:
60
+
61
+ - **Reproducing the capability-floor analysis** in the paper.
62
+ - **Studying the sibling-distillation bootstrap** as a technique for installing a calibrated output format on edge models too small to host it natively.
63
+ - **Tightly memory-constrained deployments** where 270M is the only feasible size and a modest routing lift over Random is still preferable to no routing at all.
64
+
65
+ For any deployment with a 0.6B-or-larger budget, prefer [`issai/foggen`](https://huggingface.co/issai/foggen).
66
+
67
+ ## Quick demo
68
+
69
+ ```python
70
+ from transformers import AutoTokenizer, AutoModelForCausalLM
71
+
72
+ model = AutoModelForCausalLM.from_pretrained("issai/foggen-gemma3-270m", torch_dtype="bfloat16", device_map="auto")
73
+ tokenizer = AutoTokenizer.from_pretrained("issai/foggen-gemma3-270m")
74
+
75
+ SYSTEM = """You are a self-aware multiple-choice assistant.
76
+
77
+ Rules:
78
+ - First, assess your confidence in solving this question.
79
+ - Then give your answer.
80
+ - Output format:
81
+ Confidence: <0.0|0.25|0.5|0.75|1.0>
82
+ Final answer: <OPTION_LETTER>"""
83
+
84
+ messages = [
85
+ {"role": "system", "content": SYSTEM},
86
+ {"role": "user", "content": "<your MCQ here>"},
87
+ ]
88
+ inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
89
+ outputs = model.generate(inputs, max_new_tokens=64, do_sample=False)
90
+ print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))
91
+ ```
92
+
93
+ The routing decision (`route_query` helper, threshold τ) is identical to the [`issai/foggen`](https://huggingface.co/issai/foggen) card.
94
+
95
+ ## License
96
+
97
+ Inherits the [Gemma Terms of Use](https://ai.google.dev/gemma/terms) from google/gemma-3-270m.
98
+
99
+ ## Limitations
100
+
101
+ - **Format compliance is bootstrap-dependent.** Without the sibling-distillation pass the model cannot reliably emit the FogGen output schema; the released checkpoint inherits the format installation from its 1B sibling.
102
+ - **Small absolute lift.** +0.8 pp mean over Random — the recipe pays off here but at a magnitude an order smaller than at the 0.6B–1.7B scales tested in the paper.
103
+ - **Kazakh culture regression.** −1.0 pp at τ=0.5 — the headroom-collapse domain is also the one place the recipe slips below Random at this scale.
104
+
105
+ ## Citation
106
+
107
+ See [`issai/foggen`](https://huggingface.co/issai/foggen) for the paper citation.
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<image_soft_token>": 262144
3
+ }
chat_template.jinja ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {{ bos_token }}
2
+ {%- if messages[0]['role'] == 'system' -%}
3
+ {%- if messages[0]['content'] is string -%}
4
+ {%- set first_user_prefix = messages[0]['content'] + '
5
+
6
+ ' -%}
7
+ {%- else -%}
8
+ {%- set first_user_prefix = messages[0]['content'][0]['text'] + '
9
+
10
+ ' -%}
11
+ {%- endif -%}
12
+ {%- set loop_messages = messages[1:] -%}
13
+ {%- else -%}
14
+ {%- set first_user_prefix = "" -%}
15
+ {%- set loop_messages = messages -%}
16
+ {%- endif -%}
17
+ {%- for message in loop_messages -%}
18
+ {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
19
+ {{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
20
+ {%- endif -%}
21
+ {%- if (message['role'] == 'assistant') -%}
22
+ {%- set role = "model" -%}
23
+ {%- else -%}
24
+ {%- set role = message['role'] -%}
25
+ {%- endif -%}
26
+ {{ '<start_of_turn>' + role + '
27
+ ' + (first_user_prefix if loop.first else "") }}
28
+ {%- if message['content'] is string -%}
29
+ {{ message['content'] | trim }}
30
+ {%- elif message['content'] is iterable -%}
31
+ {%- for item in message['content'] -%}
32
+ {%- if item['type'] == 'image' -%}
33
+ {{ '<start_of_image>' }}
34
+ {%- elif item['type'] == 'text' -%}
35
+ {{ item['text'] | trim }}
36
+ {%- endif -%}
37
+ {%- endfor -%}
38
+ {%- else -%}
39
+ {{ raise_exception("Invalid content type") }}
40
+ {%- endif -%}
41
+ {{ '<end_of_turn>
42
+ ' }}
43
+ {%- endfor -%}
44
+ {%- if add_generation_prompt -%}
45
+ {{'<start_of_turn>model
46
+ '}}
47
+ {%- endif -%}
config.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_sliding_window_pattern": 6,
3
+ "architectures": [
4
+ "Gemma3ForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "attn_logit_softcapping": null,
9
+ "bos_token_id": 2,
10
+ "dtype": "bfloat16",
11
+ "eos_token_id": 1,
12
+ "final_logit_softcapping": null,
13
+ "head_dim": 256,
14
+ "hidden_activation": "gelu_pytorch_tanh",
15
+ "hidden_size": 640,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 2048,
18
+ "layer_types": [
19
+ "sliding_attention",
20
+ "sliding_attention",
21
+ "sliding_attention",
22
+ "sliding_attention",
23
+ "sliding_attention",
24
+ "full_attention",
25
+ "sliding_attention",
26
+ "sliding_attention",
27
+ "sliding_attention",
28
+ "sliding_attention",
29
+ "sliding_attention",
30
+ "full_attention",
31
+ "sliding_attention",
32
+ "sliding_attention",
33
+ "sliding_attention",
34
+ "sliding_attention",
35
+ "sliding_attention",
36
+ "full_attention"
37
+ ],
38
+ "max_position_embeddings": 32768,
39
+ "model_type": "gemma3_text",
40
+ "num_attention_heads": 4,
41
+ "num_hidden_layers": 18,
42
+ "num_key_value_heads": 1,
43
+ "pad_token_id": 0,
44
+ "query_pre_attn_scalar": 256,
45
+ "rms_norm_eps": 1e-06,
46
+ "rope_local_base_freq": 10000.0,
47
+ "rope_scaling": null,
48
+ "rope_theta": 1000000.0,
49
+ "sliding_window": 512,
50
+ "transformers_version": "4.57.6",
51
+ "use_bidirectional_attention": false,
52
+ "use_cache": true,
53
+ "vocab_size": 262144
54
+ }
generation_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cache_implementation": "hybrid",
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 1,
6
+ 106
7
+ ],
8
+ "top_k": 64,
9
+ "top_p": 0.95,
10
+ "transformers_version": "4.57.6"
11
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4596b28b96c4ccd194b213b9be40ef896909625441a3757718854e21239362c0
3
+ size 536223056
special_tokens_map.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "boi_token": "<start_of_image>",
3
+ "bos_token": {
4
+ "content": "<bos>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ },
10
+ "eoi_token": "<end_of_image>",
11
+ "eos_token": {
12
+ "content": "<eos>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false
17
+ },
18
+ "image_token": "<image_soft_token>",
19
+ "pad_token": {
20
+ "content": "<pad>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false
25
+ },
26
+ "unk_token": {
27
+ "content": "<unk>",
28
+ "lstrip": false,
29
+ "normalized": false,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ }
33
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4667f2089529e8e7657cfb6d1c19910ae71ff5f28aa7ab2ff2763330affad795
3
+ size 33384568
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c
3
+ size 4689074
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff