Downloads · 30 days
11
39% of all-time downloads
Jeesup/svd-safety-mistral_7b_instruct_v02_up_svdllm_jbbmix_finetuned_keep_0p50
svd-safety-mistral_7b_instruct_v02_up_svdllm_jbbmix_finetuned_keep_0p50 is a machine learning model from Jeesup. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
mistralai/Mistral-7B-Instruct-v0.2 compressed with the complete SVD-LLM method using the authors' code (AIoT-MLSys-Lab/SVD-LLM, 7538cca98880), with one necessary change.
Downloads · 30 days
11
39% of all-time downloads
All-time downloads
28
Public
Parameters
7.2B
14.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors14.5 GB · 100%
From the Hugging Face model README
mistralai/Mistral-7B-Instruct-v0.2 compressed with the complete SVD-LLM method using the authors' code
(AIoT-MLSys-Lab/SVD-LLM, 7538cca98880), with one
necessary change.
Low-rank dimension patch. Upstream's
SVD_MistralAttentionsizes k/v bynum_key_value_headscorrectly, but computes their rank with the square-matrix formulaint(hidden * ratio / 2)it shares with q and o. For a (1024 x 4096) k/v matrixwhitening()producesint(kv*hidden*r / (kv+hidden))instead, so the weights are correct butnn.Linear.in_featuresis stale, and PEFT builds the LoRA adapters from it: the LoRA stage fails outright.component/svd_mistral.pywas patched to declare the rankwhitening()actually writes, plus a causal-mask slice for transformers >=4.43. Patched file sha256b8c277613b72. The truncation arithmetic is unchanged --whitening()derives every factor from the real weight shapes. Only the module's declared shapes differ.
wikitext2:256,jbb_harmful:2, prompt + assistant header only, no response; 0.78% of the whitening tokens)yahma/alpaca-cleanedSafety-data baseline arm (
calibration_mix). This cell differs from the plain SVD-LLM cell at the same ratio in the whitening calibration set: JailbreakBench harmful behaviours were mixed in to test whether safety data at that stage preserves refusal. 11 of AdvBench's 520 prompts are verbatim JailbreakBench behaviours.
The factors are folded back to dense Mistral shapes (W = U @ V), so this loads
with stock transformers and needs no custom modelling code. It is
rank-deficient, not smaller on disk.
| Metric | Value |
|---|---|
| Parameter fraction retained | 0.4997 |
| WikiText-2 perplexity | 12.7328 |
| arc_easy (acc_norm) | 0.5518 |
| arc_challenge (acc_norm) | 0.3294 |
| hellaswag (acc_norm) | 0.5246 |
| winogrande (acc) | 0.5817 |
| openbookqa (acc_norm) | 0.3320 |
| piqa (acc_norm) | 0.6594 |
| mathqa (acc_norm) | 0.2462 |
| AdvBench HarmBench ASR | 0.4308 |
| StrongREJECT HarmBench ASR | 0.4505 |
| Over-refusal rate (XSTest-safe) | 0.1165 |
| Over-refusal rate (OR-Bench-Hard-1K) | 0.1011 |
| Over-refusal macro rate | 0.1088 |
Over-refusal judging is reliable for this cell (XSTest-safe scored fraction 1.00; OR-Bench-Hard-1K scored fraction 1.00).
Full per-prompt outputs and raw metric files are in utility/ and safety/.
WikiText-2 perplexity; ARC-Easy/Challenge, HellaSwag, WinoGrande, OpenBookQA,
PIQA and MathQA zero-shot; AdvBench and StrongREJECT generation judged by
cais/HarmBench-Llama-2-13b-cls; over-refusal on XSTest-safe and OR-Bench-Hard-1K
judged by allenai/wildguard. All generation uses the chat template, greedy.
Compression at this ratio can degrade generation quality. Safety numbers from a model that has become degenerate are not evidence about alignment -- read the over-refusal and instruction-following columns alongside the ASR before drawing behavioural conclusions.