Spectral Surgery — Math
Collection
Math reasoning adapters and Spectral Surgery ablations on MetaMathQA-50K. • 12 items • Updated
How to use tianzl66/Llama-3.1-8B-Instruct-MetaMathQA-50K-SpectralSurgery-HNS8p2-OD with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("/root/autodl-tmp/Llama-3.1-8B-Instruct")
model = PeftModel.from_pretrained(base_model, "tianzl66/Llama-3.1-8B-Instruct-MetaMathQA-50K-SpectralSurgery-HNS8p2-OD")This repository contains a Spectral Surgery adapter derived from the Llama-3.1-8B-Instruct MetaMathQA-50K LoRA checkpoint.
meta-llama/Llama-3.1-8B-Instruct
o_proj + down_projEvaluation on GSM8K.
| Model | GSM8K |
|---|---|
| Base | 65.20% (860/1319) |
| LoRA | 77.18% (1018/1319) |
| HNS 8+2, o_proj + down_proj | 78.39% (1034/1319) |
| HNS 8+2, all modules | 79.38% (1047/1319) |
| HNS 4+1, o_proj + down_proj | 78.17% (1031/1319) |
| HNS 4+1, all modules | 79.38% (1047/1319) |
Relative to the vanilla LoRA checkpoint, this configuration improves GSM8K accuracy by 1.21 percentage points (+16 correct answers).
Base model
meta-llama/Llama-3.1-8B