unsloth/mistral-7b — lems search — 0.9 target ratio

This model was compressed using kfac_svd with lems rank search starting from unsloth/mistral-7b as base model. You may check out our publication and project page for details on kfac-svd and our LEMS rank search.

Compression Details

Metric Value
Base Model unsloth/mistral-7b
Method kfac_svd
Search Method lems
Target Ratio 0.9
Compression Metric params
Recommended Dtype float16
Compressed Layers 85
Total Parameters 6,543,650,901

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_mistral-7b_0.9",
    trust_remote_code=True,
    device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("MoritzMo123/kfac-svd_lems_mistral-7b_0.9")

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 5.37
ptb 29.86
c4 8.49

Rank Allocation

Per-layer ranks (click to expand)
Layer Rank
model.layers.0.mlp.gate_proj 1992
model.layers.0.mlp.up_proj 2248
model.layers.0.self_attn.k_proj 248
model.layers.0.self_attn.o_proj 912
model.layers.0.self_attn.q_proj 616
model.layers.1.mlp.gate_proj 2208
model.layers.1.self_attn.k_proj 448
model.layers.1.self_attn.q_proj 624
model.layers.10.self_attn.k_proj 752
model.layers.10.self_attn.o_proj 1712
model.layers.10.self_attn.q_proj 704
model.layers.11.mlp.down_proj 2360
model.layers.11.mlp.gate_proj 2128
model.layers.11.self_attn.k_proj 744
model.layers.11.self_attn.q_proj 808
model.layers.12.mlp.down_proj 2232
model.layers.12.mlp.gate_proj 1864
model.layers.12.mlp.up_proj 2304
model.layers.12.self_attn.k_proj 712
model.layers.12.self_attn.q_proj 792
model.layers.13.mlp.gate_proj 2104
model.layers.13.mlp.up_proj 2312
model.layers.13.self_attn.k_proj 776
model.layers.13.self_attn.q_proj 936
model.layers.14.mlp.gate_proj 2208
model.layers.14.self_attn.k_proj 696
model.layers.14.self_attn.q_proj 768
model.layers.15.mlp.gate_proj 2184
model.layers.15.self_attn.k_proj 720
model.layers.15.self_attn.q_proj 928
model.layers.16.self_attn.k_proj 616
model.layers.16.self_attn.q_proj 808
model.layers.17.self_attn.k_proj 688
model.layers.17.self_attn.q_proj 800
model.layers.18.self_attn.k_proj 664
model.layers.18.self_attn.q_proj 624
model.layers.19.self_attn.k_proj 616
model.layers.19.self_attn.q_proj 744
model.layers.2.self_attn.q_proj 1000
model.layers.20.self_attn.k_proj 776
model.layers.20.self_attn.o_proj 1784
model.layers.20.self_attn.q_proj 768
model.layers.21.self_attn.k_proj 728
model.layers.21.self_attn.o_proj 1336
model.layers.21.self_attn.q_proj 624
model.layers.22.self_attn.k_proj 704
model.layers.22.self_attn.o_proj 1120
model.layers.22.self_attn.q_proj 640
model.layers.23.self_attn.k_proj 672
model.layers.23.self_attn.o_proj 1016
model.layers.23.self_attn.q_proj 656
model.layers.23.self_attn.v_proj 752
model.layers.24.self_attn.k_proj 584
model.layers.24.self_attn.o_proj 848
model.layers.24.self_attn.q_proj 616
model.layers.25.self_attn.k_proj 776
model.layers.25.self_attn.o_proj 736
model.layers.25.self_attn.q_proj 688
model.layers.26.self_attn.k_proj 616
model.layers.26.self_attn.o_proj 784
model.layers.26.self_attn.q_proj 616
model.layers.27.self_attn.k_proj 720
model.layers.27.self_attn.o_proj 840
model.layers.27.self_attn.q_proj 680
model.layers.28.self_attn.k_proj 528
model.layers.28.self_attn.o_proj 872
model.layers.28.self_attn.q_proj 616
model.layers.29.self_attn.k_proj 704
model.layers.29.self_attn.o_proj 1256
model.layers.29.self_attn.q_proj 632
model.layers.3.self_attn.q_proj 688
model.layers.30.self_attn.k_proj 672
model.layers.30.self_attn.o_proj 1024
model.layers.30.self_attn.q_proj 640
model.layers.31.self_attn.k_proj 632
model.layers.31.self_attn.o_proj 1384
model.layers.31.self_attn.q_proj 752
model.layers.4.self_attn.q_proj 624
model.layers.5.self_attn.q_proj 816
model.layers.6.self_attn.q_proj 832
model.layers.7.self_attn.k_proj 776
model.layers.7.self_attn.q_proj 688
model.layers.8.self_attn.o_proj 1496
model.layers.8.self_attn.q_proj 1088
model.layers.9.self_attn.q_proj 784

Hydra Configuration Summary

Config Field Value
Model unsloth/mistral-7b
SVD Method kfac_svd
Search Method lems
Compression Target 0.9
Target Metric params
Calibration Dataset wikitext2
Sequence Length 2048
Seed 42
Downloads last month
2
Safetensors
Model size
7B 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_mistral-7b_0.9

Finetuned
(30)
this model

Dataset used to train MoritzMo123/kfac-svd_lems_mistral-7b_0.9

Collection including MoritzMo123/kfac-svd_lems_mistral-7b_0.9