unsloth/llama-3-8b — lems search — 0.6 target ratio

This model was compressed using kfac_svd with lems rank search starting from unsloth/llama-3-8b as base model. You may check out our publication, the OpenReview page, our code, and project page for details on kfac-svd and our LEMS rank search.

Update (2026-10-23). The weights were recomputed with the fixed KFAC-SVD implementation. The first release of the code (v1, used for the published paper) whitened the output side of each weight with the Cholesky factor L of G = LLᵀ instead of Lᵀ. The correct version was described by the algorithm in the paper already. Those weights, which the paper's tables report, remain available as revision v1-paper: AutoModelForCausalLM.from_pretrained("MoritzMo123/kfac-svd_lems_llama-3-8b_0.6", revision="v1-paper", trust_remote_code=True).

Compression Details

Metric Value
Base Model unsloth/llama-3-8b
Method kfac_svd
Search Method lems
Target Ratio 0.6
Compression Metric params
Recommended Dtype float16
Compressed Layers 161
Total Parameters 5,237,846,177

Usage

The checkpoint records its recommended dtype in config.json; no explicit torch_dtype argument should be needed with this remote-code wrapper. For standard Transformers models, torch_dtype="auto" is the portable fallback.

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    "MoritzMo123/kfac-svd_lems_llama-3-8b_0.6",
    trust_remote_code=True,
    device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("MoritzMo123/kfac-svd_lems_llama-3-8b_0.6")

inputs = tokenizer('Hello, ', return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Evaluation Results

Dataset Perplexity
wikitext2 16.08
ptb 140.51
c4 63.83

Zero-shot accuracy (LM-Eval, %):

Task Accuracy
OpenBookQA 22.00
ARC-e 56.10
ARC-c 26.45
WinoGrande 60.77
HellaSwag 35.19
PIQA 64.64
Average 44.19

Rank Allocation

Per-layer ranks (click to expand)
Layer Rank
model.layers.0.self_attn.k_proj 272
model.layers.0.self_attn.q_proj 616
model.layers.1.self_attn.k_proj 408
model.layers.1.self_attn.q_proj 632
model.layers.10.mlp.down_proj 1496
model.layers.10.mlp.gate_proj 1152
model.layers.10.mlp.up_proj 1584
model.layers.10.self_attn.k_proj 568
model.layers.10.self_attn.o_proj 1048
model.layers.10.self_attn.q_proj 616
model.layers.11.mlp.down_proj 1344
model.layers.11.mlp.gate_proj 1024
model.layers.11.mlp.up_proj 1488
model.layers.11.self_attn.k_proj 640
model.layers.11.self_attn.o_proj 992
model.layers.11.self_attn.q_proj 616
model.layers.12.mlp.down_proj 1512
model.layers.12.mlp.gate_proj 1008
model.layers.12.mlp.up_proj 1536
model.layers.12.self_attn.k_proj 528
model.layers.12.self_attn.o_proj 1120
model.layers.12.self_attn.q_proj 624
model.layers.13.mlp.down_proj 1656
model.layers.13.mlp.gate_proj 1000
model.layers.13.mlp.up_proj 1680
model.layers.13.self_attn.k_proj 504
model.layers.13.self_attn.o_proj 1192
model.layers.13.self_attn.q_proj 616
model.layers.14.mlp.down_proj 1872
model.layers.14.mlp.gate_proj 1336
model.layers.14.mlp.up_proj 1816
model.layers.14.self_attn.o_proj 1096
model.layers.14.self_attn.q_proj 616
model.layers.15.mlp.gate_proj 1264
model.layers.15.mlp.up_proj 1856
model.layers.15.self_attn.k_proj 520
model.layers.15.self_attn.o_proj 1224
model.layers.15.self_attn.q_proj 616
model.layers.16.mlp.gate_proj 1568
model.layers.16.mlp.up_proj 1976
model.layers.16.self_attn.k_proj 400
model.layers.16.self_attn.o_proj 1032
model.layers.16.self_attn.q_proj 616
model.layers.17.mlp.gate_proj 1688
model.layers.17.mlp.up_proj 1936
model.layers.17.self_attn.k_proj 480
model.layers.17.self_attn.o_proj 888
model.layers.17.self_attn.q_proj 616
model.layers.18.mlp.gate_proj 1592
model.layers.18.mlp.up_proj 1752
model.layers.18.self_attn.k_proj 368
model.layers.18.self_attn.o_proj 848
model.layers.18.self_attn.q_proj 616
model.layers.19.mlp.down_proj 2168
model.layers.19.mlp.gate_proj 1560
model.layers.19.mlp.up_proj 1696
model.layers.19.self_attn.k_proj 432
model.layers.19.self_attn.o_proj 648
model.layers.19.self_attn.q_proj 624
model.layers.2.self_attn.k_proj 712
model.layers.2.self_attn.o_proj 1216
model.layers.2.self_attn.q_proj 832
model.layers.20.mlp.down_proj 2056
model.layers.20.mlp.gate_proj 1536
model.layers.20.mlp.up_proj 1664
model.layers.20.self_attn.k_proj 256
model.layers.20.self_attn.o_proj 632
model.layers.20.self_attn.q_proj 616
model.layers.21.mlp.down_proj 2064
model.layers.21.mlp.gate_proj 1520
model.layers.21.mlp.up_proj 1576
model.layers.21.self_attn.k_proj 256
model.layers.21.self_attn.o_proj 616
model.layers.21.self_attn.q_proj 616
model.layers.22.mlp.down_proj 2000
model.layers.22.mlp.gate_proj 1424
model.layers.22.mlp.up_proj 1448
model.layers.22.self_attn.k_proj 280
model.layers.22.self_attn.o_proj 624
model.layers.22.self_attn.q_proj 616
model.layers.22.self_attn.v_proj 608
model.layers.23.mlp.down_proj 1776
model.layers.23.mlp.gate_proj 1400
model.layers.23.mlp.up_proj 1376
model.layers.23.self_attn.k_proj 256
model.layers.23.self_attn.o_proj 624
model.layers.23.self_attn.q_proj 616
model.layers.23.self_attn.v_proj 544
model.layers.24.mlp.down_proj 1608
model.layers.24.mlp.gate_proj 1248
model.layers.24.mlp.up_proj 1224
model.layers.24.self_attn.k_proj 248
model.layers.24.self_attn.o_proj 616
model.layers.24.self_attn.q_proj 616
model.layers.24.self_attn.v_proj 512
model.layers.25.mlp.down_proj 1376
model.layers.25.mlp.gate_proj 1280
model.layers.25.mlp.up_proj 1224
model.layers.25.self_attn.k_proj 256
model.layers.25.self_attn.o_proj 616
model.layers.25.self_attn.q_proj 616
model.layers.25.self_attn.v_proj 576
model.layers.26.mlp.down_proj 1176
model.layers.26.mlp.gate_proj 1264
model.layers.26.mlp.up_proj 1080
model.layers.26.self_attn.k_proj 248
model.layers.26.self_attn.o_proj 616
model.layers.26.self_attn.q_proj 624
model.layers.27.mlp.down_proj 1032
model.layers.27.mlp.gate_proj 1368
model.layers.27.mlp.up_proj 1096
model.layers.27.self_attn.k_proj 248
model.layers.27.self_attn.o_proj 632
model.layers.27.self_attn.q_proj 616
model.layers.27.self_attn.v_proj 408
model.layers.28.mlp.down_proj 1096
model.layers.28.mlp.gate_proj 1424
model.layers.28.mlp.up_proj 1080
model.layers.28.self_attn.k_proj 392
model.layers.28.self_attn.o_proj 616
model.layers.28.self_attn.q_proj 616
model.layers.29.mlp.down_proj 1168
model.layers.29.mlp.gate_proj 1280
model.layers.29.mlp.up_proj 1064
model.layers.29.self_attn.k_proj 584
model.layers.29.self_attn.o_proj 616
model.layers.29.self_attn.q_proj 616
model.layers.3.self_attn.q_proj 832
model.layers.30.mlp.down_proj 1792
model.layers.30.mlp.gate_proj 1744
model.layers.30.mlp.up_proj 1904
model.layers.30.self_attn.k_proj 248
model.layers.30.self_attn.o_proj 624
model.layers.30.self_attn.q_proj 616
model.layers.30.self_attn.v_proj 656
model.layers.31.mlp.gate_proj 1816
model.layers.31.self_attn.k_proj 248
model.layers.31.self_attn.o_proj 616
model.layers.31.self_attn.q_proj 624
model.layers.4.self_attn.o_proj 1160
model.layers.4.self_attn.q_proj 840
model.layers.5.self_attn.o_proj 1048
model.layers.5.self_attn.q_proj 616
model.layers.6.self_attn.o_proj 1216
model.layers.6.self_attn.q_proj 616
model.layers.7.mlp.down_proj 2048
model.layers.7.mlp.gate_proj 1928
model.layers.7.self_attn.o_proj 1200
model.layers.7.self_attn.q_proj 632
model.layers.8.mlp.down_proj 1752
model.layers.8.mlp.gate_proj 1320
model.layers.8.mlp.up_proj 1912
model.layers.8.self_attn.k_proj 672
model.layers.8.self_attn.o_proj 1160
model.layers.8.self_attn.q_proj 704
model.layers.9.mlp.down_proj 1592
model.layers.9.mlp.gate_proj 1400
model.layers.9.mlp.up_proj 1864
model.layers.9.self_attn.k_proj 648
model.layers.9.self_attn.o_proj 1064
model.layers.9.self_attn.q_proj 616

Hydra Configuration Summary

Config Field Value
Model unsloth/llama-3-8b
SVD Method kfac_svd
Search Method lems
Compression Target 0.6
Target Metric params
Calibration Dataset wikitext2
Calibration Samples 256
Sequence Length 2048
Seed 42
Downloads last month
207
Safetensors
Model size
5B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for MoritzMo123/kfac-svd_lems_llama-3-8b_0.6

Finetuned
(179)
this model

Dataset used to train MoritzMo123/kfac-svd_lems_llama-3-8b_0.6

Collection including MoritzMo123/kfac-svd_lems_llama-3-8b_0.6

Paper for MoritzMo123/kfac-svd_lems_llama-3-8b_0.6

Evaluation results