Instruction Residuals
This repository contains instruction residuals (delta weights) computed as the parameter-wise difference between Qwen/Qwen2.5-3B-Instruct and Qwen/Qwen2.5-3B.
Apply these residuals to the base model to reconstruct the instruction-tuned weights without retraining.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from residuals import Residuals
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-3B")
tok = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-3B")
res = Residuals.from_pretrained("residuals/qwen2.5-3b")
res.apply(base, base_tokenizer=tok)
Provenance
- Created at: 2025-10-25T16:05:19.565132+00:00
- DType: float32
- Parameters: 435
- Shapes hash: 0270b462a2c7458fba25bc5be97a2b6d6e03eb11e573c8f621387231afa4791d
- Names hash: 05a2495a9fd8df03da07f3407419e4bc7e10cd0baaf571b25d9e1fb0e6812a46
- Base model: Qwen/Qwen2.5-3B
- Instruction model: Qwen/Qwen2.5-3B-Instruct
Files
- model.safetensors: Serialized residual tensors (safetensors format).
- (optional) model.safetensors.index.json + shard files model-00001-of-000N.safetensors, ... for multi-part weights.
- config.json: Residuals metadata and provenance.
- tokenizer files: Saved tokenizer for compatibility.
About this format
These are additive residuals (task vectors). Applying them to the base model's parameters reconstructs the instruction-tuned model.
Tools
Generated with the residuals Python package. Install via: pip install residuals.
- Downloads last month
- 11
Model tree for residuals/qwen2.5-3b
Base model
Qwen/Qwen2.5-3B