Rhett1 commited on
Commit
59a4868
·
verified ·
1 Parent(s): 1e2c002

Upload svd_llm2/heal/llama2-7b-base/README.md with huggingface_hub

Browse files
svd_llm2/heal/llama2-7b-base/README.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama2
3
+ base_model: NousResearch/Llama-2-7b-hf
4
+ tags:
5
+ - svd
6
+ - low-rank
7
+ - model-compression
8
+ - llama2
9
+ ---
10
+
11
+ # SVD-LLM V2 (NAACL 2025): LLaMA-2-7B base @ 4.02B, KD-healed
12
+
13
+ SVD-LLM V2: heterogeneous compression-ratio allocation from theoretical truncation loss (Algorithm 1) + loss-optimized weight truncation (Algorithm 2). Official code was never released; this is our faithful implementation of the published algorithms (per-layer ranks in ranks.json show the allocation).
14
+
15
+ - **4.023B params** (4,023,134,464; down from 6.74B, ~40% reduction)
16
+ - Healed with pure forward-KL distillation from the dense 7B base teacher: **60M tokens**,
17
+ held-out KL **2.0105 -> 0.1935**, probe MMLU (limit 40/subtask) **24.34% -> 35.66%**
18
+ - ⚠️ **Probe-only evaluation**: full-benchmark evaluation (full MMLU / HellaSwag / BoolQ /
19
+ TriviaQA / GSM8K) was intentionally NOT run for the base-model series. All numbers below
20
+ come from the same probe harness (lm-eval 0.4.12, MMLU limit=40 questions/subtask,
21
+ n=2280, seed 1234, fp16) and are mutually comparable.
22
+
23
+ | Reference (same probe harness) | probe MMLU |
24
+ |---|---:|
25
+ | unhealed 4.02B (same structure, unhealed sibling dir) | 24.34% |
26
+ | **this checkpoint (healed 60M)** | **35.66%** |
27
+ | TR-3 base (same 4.0231B budget + same healing recipe) | 41.97% |
28
+ | FP16 dense 6.74B base teacher | 47.41%* |
29
+
30
+ \* teacher number as measured by this heal run's own pre-eval; the TR-3 run's pre-eval of the
31
+ same probe set gave 47.50% (0.09pp run-to-run wobble, same harness and protocol file
32
+ `eval_protocol_llama2_7b_base.json`).
33
+
34
+ ## How to load
35
+
36
+ ```python
37
+ import json
38
+ from lowrank_linear import build, materialize_all
39
+
40
+ model = build("NousResearch/Llama-2-7b-hf",
41
+ json.load(open("ranks.json")), "state_dict_fp16.pt",
42
+ device="cuda")
43
+ # for generation/eval: fuse the factors first (inference-only)
44
+ materialize_all(model)
45
+ ```
46
+
47
+ `ranks.json` maps each compressed projection path to its integer rank; untouched weights are
48
+ stock LLaMA-2-7B base tensors. The full healing-provenance record (data mixture & revisions,
49
+ decontamination, SHA256 of inputs/checkpoint, 5M milestone trajectory) is in `provenance.json`.
50
+
51
+ ## License
52
+
53
+ Derived from Meta's LLaMA 2 (`NousResearch/Llama-2-7b-hf`, an unofficial redistribution of
54
+ the same weights). Subject to the **LLaMA 2 Community License** — see
55
+ https://ai.meta.com/llama/license/.