PEFT
Safetensors
qwen2.5
qwen2
lora
instruction-following
ifeval
spectral-surgery
hybrid-newton-schulz
Instructions to use tianzl66/Qwen2.5-7B-Instruct-InstructionFollowing-SpectralSurgery-HNS8p2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use tianzl66/Qwen2.5-7B-Instruct-InstructionFollowing-SpectralSurgery-HNS8p2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/root/autodl-tmp/Qwen2.5-7B-Instruct") model = PeftModel.from_pretrained(base_model, "tianzl66/Qwen2.5-7B-Instruct-InstructionFollowing-SpectralSurgery-HNS8p2") - Notebooks
- Google Colab
- Kaggle
Qwen2.5-7B-Instruct + Instruction Following + Spectral Surgery
This repository contains a Spectral Surgery adapter derived from the instruction-following LoRA checkpoint of Qwen2.5-7B-Instruct.
Post-hoc Spectral Surgery applies Hybrid Newton-Schulz (HNS) editing directly to the LoRA adapter. No additional gradient-based training is performed during Spectral Surgery.
Base Model
Qwen/Qwen2.5-7B-Instruct
Source LoRA
- Dataset: Tulu-3 SFT instruction-following split
- Samples: 29,980
- Epochs: 2
- Sequence length: 4096
- Global batch size: 128
- LoRA rank: 16
- LoRA alpha: 32
- Learning rate: 2e-4
- Seed: 42
Spectral Surgery
- Target: all LoRA modules
- Fast HNS steps: 8
- Stable HNS steps: 2
- Output rank: 16
- Nuclear norm: preserved
- See
spectral_edit_meta.jsonfor exact edit metadata.
Evaluation
Evaluation on IFEval (541 prompts, 834 instructions).
| Model | Prompt Strict | Prompt Loose | Instruction Strict | Instruction Loose |
|---|---|---|---|---|
| Base | 65.43% | 70.43% | 75.18% | 79.38% |
| LoRA SFT | 64.70% | 69.32% | 73.38% | 77.82% |
| Spectral Surgery HNS 4+1 | 69.69% | 75.05% | 77.94% | 82.49% |
| Spectral Surgery HNS 8+2 | 69.13% | 73.94% | 77.70% | 81.65% |
Relative to the vanilla LoRA checkpoint, Spectral Surgery HNS 8+2 improves:
- Prompt Strict by 4.44 percentage points
- Prompt Loose by 4.62 percentage points
- Instruction Strict by 4.32 percentage points
- Instruction Loose by 3.84 percentage points
The edited adapter also exceeds the base model on all four IFEval metrics.
Settings: tokenizer chat template, greedy decoding, max_new_tokens=2048, vLLM backend, max model length 4096, seed 42.
Files
adapter_model.safetensors: PEFT LoRA weightsadapter_config.json: PEFT configurationeval-ifeval/metrics.json: aggregate IFEval metricseval-ifeval/outputs.jsonl: per-prompt generations and instruction resultsspectral_edit_meta.json: exact HNS edit metadata
- Downloads last month
- 17
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for tianzl66/Qwen2.5-7B-Instruct-InstructionFollowing-SpectralSurgery-HNS8p2
Collection including tianzl66/Qwen2.5-7B-Instruct-InstructionFollowing-SpectralSurgery-HNS8p2
Collection
Instruction-following LoRA and Spectral Surgery adapters evaluated on IFEval. • 12 items • Updated