Downloads · 30 days
0
veri-safe/SWD-Qwen2.5-3B
SWD-Qwen2.5-3B is a machine learning model from veri-safe. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as other.
This repository contains the factor-only Sparse Weight Decomposition (SWD) checkpoints used for the Qwen2.5-3B layer 18 mlp.downproj experiments. It does not redistribute the Qwen2.5-3B base model. Load the base model…
Downloads · 30 days
0
Access
Public
Updated Aug 4, 2026
Repo size
214 MB
Likes
1
Public
Click a slice to open those files.
.safetensors214 MB · 100%
From the Hugging Face model README
This repository contains the factor-only Sparse Weight Decomposition (SWD)
checkpoints used for the Qwen2.5-3B layer 18 mlp.down_proj experiments. It
does not redistribute the Qwen2.5-3B base model. Load the base model first,
then apply one checkpoint with swd_loader.py.
| Replacement | Setting | Data used | CE delta vs dense |
|---|---|---|---|
Layer 18 mlp.down_proj | s=0.5 | 2,048 tokens | 0.000733 |
Layer 18 mlp.down_proj | s=0.75 | 1,048,576 tokens | 0.000611 |
Each replaced matrix is represented as
output = input @ read @ write + bias
The intermediate coordinates are the SWD bottleneck units used for circuit
scoring and ablation. s=0.5 and s=0.75 mean that 50% and 75% of all entries
across the two factors are zero, respectively.
pip install torch safetensors transformers huggingface_hub
from transformers import AutoModelForCausalLM
from swd_loader import apply_swd_checkpoint
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-3B")
apply_swd_checkpoint(
model,
"checkpoints/qwen2.5-3b/layer18-down-proj/s0p5-tokens2048",
mode="factorized",
)
Use mode="folded" to write read @ write into the original dense module for
conventional inference. Every checkpoint directory contains
model.safetensors, config.json, and provenance.json.
The Qwen2.5-3B-derived factor checkpoints are distributed under the Qwen
Research License and are limited to non-commercial research and evaluation.
See LICENSE and NOTICE. The SWD loader code is available under Apache-2.0;
see LICENSES/APACHE-2.0.txt.