Instruction Residuals

This repository contains instruction residuals (delta weights) computed as the parameter-wise difference between Qwen/Qwen3-8B and Qwen/Qwen3-8B-Base.

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/Qwen3-8B-Base")
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-8B-Base")

res = Residuals.from_pretrained("residuals/qwen3-8b")
res.apply(base, base_tokenizer=tok)

Provenance

  • Created at: 2025-10-25T18:07:02.477992+00:00
  • DType: float32
  • Parameters: 399
  • Shapes hash: d407a3808304e731c92d47b53df9dfac91f2a4c9f4b8a0180002560640b46547
  • Names hash: c7ea601f93da30767936050c6d439b2eb034eafb07ad70f7d1dd29a41dfc0ba0
  • Base model: Qwen/Qwen3-8B-Base
  • Instruction model: Qwen/Qwen3-8B

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
10
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for residuals/qwen3-8b

Base model

Qwen/Qwen3-8B-Base
Adapter
(43)
this model