Matias commited on
Commit
c9b74ae
·
verified ·
1 Parent(s): 2213a28

distributor-wiki@v2: trajectory LoRA on gemma-4-E4B-it (B5 [ran])

Browse files
Files changed (3) hide show
  1. README.md +67 -0
  2. adapter_config.json +50 -0
  3. adapter_model.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: google/gemma-4-E4B-it
3
+ library_name: peft
4
+ license: apache-2.0
5
+ pipeline_tag: text-generation
6
+ language: [en]
7
+ tags:
8
+ - base_model:adapter:google/gemma-4-E4B-it
9
+ - lora
10
+ - peft
11
+ - gemma
12
+ - knowledge-base
13
+ - tool-use
14
+ - research
15
+ ---
16
+
17
+ # distributor-wiki@v2 — a LoRA that navigates a wiki instead of memorising it
18
+
19
+ **Research preview from [lora-kernel](https://github.com/EvolvingAgentsLabs/lora-kernel).** This adapter isn't a general
20
+ assistant, and it holds no facts. It learned one habit: walking a library of short markdown pages to
21
+ answer a question. It searches, opens a page, opens the one section it needs, follows the link written
22
+ inside that sentence, sends arithmetic to a calculator, and cites the statement its answer rests on.
23
+ When the library holds nothing on the question, it says `Not in my library.`
24
+
25
+ The weights hold the navigation and the markdown holds the content. When a fact changes, you edit a
26
+ page and leave the model as it is.
27
+
28
+ ## What it was measured on [ran]
29
+
30
+ The evaluation world is a generated distributor wiki (`knowledge/distributor-wiki`, seed 20260924). The
31
+ adapter never saw that world in training: its corpus was drawn from 32 *other* generated worlds. An
32
+ answer counts only if the value is right **and** the cited section actually says it.
33
+
34
+ | arm | W9 headline (2–3 hops, 40) | W9 all (67) | comparison band (40) |
35
+ |---|---|---|---|
36
+ | bare `gemma-4-E4B-it`, same runtime and prompt | 19/40 | — | — |
37
+ | `distributor-wiki@v1` (no comparisons in corpus) | 39/40 | 63/67 | 10/40 |
38
+ | **`distributor-wiki@v2` (this adapter)** | **39/40** | **63/67** | **37/40** (28 : 1 paired vs v1, p = 1.1e-7) |
39
+
40
+ Runs: `results/M7-W9-atomic-statements-20260924`, B1, and `results/B5-comparison-corpus-20260926` in the
41
+ repository. The release manifest is `releases/distributor-wiki@v2.json`, and the adapter sha256 is
42
+ `d4d91ea4aa7a8ffcd82beabb87d07112c02b212388412fb61f43df49d3eb93d6`.
43
+
44
+ ## Limits, stated plainly
45
+
46
+ - **Every world it has seen or been scored on is generated by one generator.** It hasn't been measured
47
+ on a hand-written or real organisation's library. A model trained on generated data can learn the
48
+ generator's quirks, and this one hasn't been tested outside them.
49
+ - **It expects this page format**: YAML front matter (`id`, `when`, `what`) followed by one `§anchor`
50
+ statement per line, with links as `[[page-id]]` inside the statements. See `knowledge/distributor-wiki/`.
51
+ - **It needs the runtime.** The model writes `<search>`, `<open>` and `<calc>` tags. The runtime stops at
52
+ each closing tag, writes the result inline after `= `, and lets generation continue. This is not
53
+ OpenAI `tool_calls`: one adapter in this project scored 11/90 served that way and 90/90 served inline
54
+ as it was trained.
55
+ - Thinking is **off** (`enable_thinking=false`) in every render. The vision and audio towers are excluded
56
+ from the LoRA.
57
+
58
+ ## How to run it
59
+
60
+ The runtime lives in `memory/` (`Library`, `Conversation`). The runner that produced the numbers above
61
+ is `training/wiki/wiki_arm.py`, served through vLLM with LoRA enabled. To reproduce a score, see
62
+ `docs/SERVING.md` and `docs/MEMORY.md` §1.6 in the repository.
63
+
64
+ Recipe: r 16, alpha 32, 3 epochs, lr 2e-4, effective batch 16, max_seq 1536, all attention and MLP
65
+ projections, seed 1. The corpus is `training/wiki/data/train_cmp.jsonl` (728 walks, sha256 `7b307d53…`).
66
+
67
+ Apache-2.0, like the base model.
adapter_config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "google/gemma-4-E4B-it",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": ".*(vision_tower|audio_tower|multi_modal_projector|embed_vision|embed_audio).*",
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "layer_replication": null,
16
+ "layers_pattern": null,
17
+ "layers_to_transform": null,
18
+ "loftq_config": {},
19
+ "lora_alpha": 32,
20
+ "lora_bias": false,
21
+ "lora_dropout": 0.05,
22
+ "lora_ga_config": null,
23
+ "megatron_config": null,
24
+ "megatron_core": "megatron.core",
25
+ "modules_to_save": null,
26
+ "monteclora_config": null,
27
+ "peft_type": "LORA",
28
+ "peft_version": "0.20.0",
29
+ "qalora_group_size": 16,
30
+ "r": 16,
31
+ "rank_pattern": {},
32
+ "revision": null,
33
+ "target_modules": [
34
+ "up_proj",
35
+ "down_proj",
36
+ "gate_proj",
37
+ "q_proj",
38
+ "o_proj",
39
+ "v_proj",
40
+ "k_proj"
41
+ ],
42
+ "target_parameters": null,
43
+ "task_type": "CAUSAL_LM",
44
+ "trainable_token_indices": null,
45
+ "use_bdlora": null,
46
+ "use_dora": false,
47
+ "use_qalora": false,
48
+ "use_rslora": false,
49
+ "velora_config": null
50
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4d91ea4aa7a8ffcd82beabb87d07112c02b212388412fb61f43df49d3eb93d6
3
+ size 139602776