Upload svd_llm/heal/llama2-7b-base/README.md with huggingface_hub
Browse files
svd_llm/heal/llama2-7b-base/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 (ICLR 2025): LLaMA-2-7B base @ 4.02B, KD-healed
|
| 12 |
+
|
| 13 |
+
SVD-LLM: truncation-aware data whitening (256 wikitext2 samples) + closed-form parameter update, official code ([AIoT-MLSys-Lab/SVD-LLM @ 7538cca](https://github.com/AIoT-MLSys-Lab/SVD-LLM)), uniform 41.93% removal across all 7 projection types of all 32 layers.
|
| 14 |
+
|
| 15 |
+
- **4.022B params** (4,021,989,376; 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.0439 -> 0.2089**, probe MMLU (limit 40/subtask) **25.61% -> 34.12%**
|
| 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) | 25.61% |
|
| 26 |
+
| **this checkpoint (healed 60M)** | **34.12%** |
|
| 27 |
+
| SVD-LLM V2 base (same budget + same healing recipe) | 35.66% |
|
| 28 |
+
| TR-3 base (same budget + same healing recipe) | 41.97% |
|
| 29 |
+
| FP16 dense 6.74B base teacher | 47.41%* |
|
| 30 |
+
|
| 31 |
+
\* teacher number as measured by this heal run's own pre-eval; the TR-3 run's pre-eval of the
|
| 32 |
+
same probe set gave 47.50% (0.09pp run-to-run wobble, same harness and protocol file
|
| 33 |
+
`eval_protocol_llama2_7b_base.json`).
|
| 34 |
+
|
| 35 |
+
## How to load
|
| 36 |
+
|
| 37 |
+
```python
|
| 38 |
+
import json
|
| 39 |
+
from lowrank_linear import build, materialize_all
|
| 40 |
+
|
| 41 |
+
model = build("NousResearch/Llama-2-7b-hf",
|
| 42 |
+
json.load(open("ranks.json")), "state_dict_fp16.pt",
|
| 43 |
+
device="cuda")
|
| 44 |
+
# for generation/eval: fuse the factors first (inference-only)
|
| 45 |
+
materialize_all(model)
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
`ranks.json` maps each compressed projection path to its integer rank; untouched weights are
|
| 49 |
+
stock LLaMA-2-7B base tensors. The full healing-provenance record (data mixture & revisions,
|
| 50 |
+
decontamination, SHA256 of inputs/checkpoint, 5M milestone trajectory) is in `provenance.json`.
|
| 51 |
+
|
| 52 |
+
## License
|
| 53 |
+
|
| 54 |
+
Derived from Meta's LLaMA 2 (`NousResearch/Llama-2-7b-hf`, an unofficial redistribution of
|
| 55 |
+
the same weights). Subject to the **LLaMA 2 Community License** — see
|
| 56 |
+
https://ai.meta.com/llama/license/.
|