Upload asvd_llm/heal/llama2-13b-base/README.md with huggingface_hub
Browse files
asvd_llm/heal/llama2-13b-base/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: llama2
|
| 3 |
+
base_model: NousResearch/Llama-2-13b-hf
|
| 4 |
+
tags:
|
| 5 |
+
- asvd
|
| 6 |
+
- low-rank
|
| 7 |
+
- model-compression
|
| 8 |
+
- llama2
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# ASVD: LLaMA-2-13B base @ 7.75B, KD-healed
|
| 12 |
+
|
| 13 |
+
ASVD (official-style: activation-aware SVD with abs_mean scaling, ppl-based sensitivity
|
| 14 |
+
allocation, alpha=0.5, seed=233, 256 calibration samples, ratio target 0.5897).
|
| 15 |
+
|
| 16 |
+
- **7.747B params** (7,746,790,400 = factored 6,994,022,400 + untouched 752,768,000;
|
| 17 |
+
down from 13.02B, ~40.5% reduction)
|
| 18 |
+
- Healed with pure forward-KL distillation from the dense 13B base teacher: **60M tokens**,
|
| 19 |
+
held-out KL **3.9041 -> 0.1624**, probe MMLU (limit 40/subtask) **25.22% -> 43.99%**
|
| 20 |
+
- ⚠️ **Probe-only evaluation**: full-benchmark evaluation (full MMLU / HellaSwag / BoolQ /
|
| 21 |
+
TriviaQA / GSM8K) was intentionally NOT run for the base-model series. All numbers below
|
| 22 |
+
come from the same probe harness (lm-eval 0.4.12, MMLU limit=40 questions/subtask,
|
| 23 |
+
n=2280, seed 1234, fp16) and are mutually comparable.
|
| 24 |
+
|
| 25 |
+
| Reference (same probe harness) | probe MMLU |
|
| 26 |
+
|---|---:|
|
| 27 |
+
| unhealed 7.75B (same structure, unhealed sibling dir) | 25.22% |
|
| 28 |
+
| **this checkpoint (healed 60M)** | **43.99%** |
|
| 29 |
+
| SVD-LLM V1 base 13B (same budget + same healing recipe) | 43.33% |
|
| 30 |
+
| SVD-LLM V2 base 13B (same budget + same healing recipe) | 45.48% |
|
| 31 |
+
| FP16 dense 13B base teacher | 54.25% |
|
| 32 |
+
|
| 33 |
+
Note: the LLaMA-2-7B-base ASVD sibling (`asvd_llm/*/llama2-7b-base/`) is archived as a
|
| 34 |
+
negative result (capability not restored by healing); this 13B instance healed normally.
|
| 35 |
+
|
| 36 |
+
## How to load
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
import json
|
| 40 |
+
from lowrank_linear import build, materialize_all
|
| 41 |
+
|
| 42 |
+
model = build("NousResearch/Llama-2-13b-hf",
|
| 43 |
+
json.load(open("ranks.json")), "state_dict_fp16.pt",
|
| 44 |
+
device="cuda")
|
| 45 |
+
# for generation/eval: fuse the factors first (inference-only)
|
| 46 |
+
materialize_all(model)
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
`ranks.json` maps each compressed projection path to its integer rank; untouched weights are
|
| 50 |
+
stock LLaMA-2-13B base tensors. The full healing-provenance record (data mixture & revisions,
|
| 51 |
+
decontamination, SHA256 of inputs/checkpoint, 5M milestone trajectory) is in `provenance.json`.
|
| 52 |
+
|
| 53 |
+
## License
|
| 54 |
+
|
| 55 |
+
Derived from Meta's LLaMA 2 (`NousResearch/Llama-2-13b-hf`, an unofficial redistribution of
|
| 56 |
+
the same weights). Subject to the **LLaMA 2 Community License** — see
|
| 57 |
+
https://ai.meta.com/llama/license/.
|