Spectral Surgery — Code
Collection
Code generation models and evaluations for Spectral Surgery. • 5 items • Updated
How to use tianzl66/Llama-3.1-8B-Instruct-Magicoder-50K-SpectralSurgery-HNS8p2 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-Magicoder-50K-SpectralSurgery-HNS8p2")This repository contains the Spectral Surgery adapter obtained from Llama-3.1-8B-Instruct fine-tuned on 50K Magicoder examples.
meta-llama/Llama-3.1-8B-Instruct
Greedy decoding with Pass@1.
| Model | HumanEval | MBPP |
|---|---|---|
| Base | 54.27% (89/164) | 65.37% (168/257) |
| LoRA E1 | 56.10% (92/164) | 60.70% (156/257) |
| HNS 4+1 | 58.54% (96/164) | 65.37% (168/257) |
| HNS 8+2 | 60.98% (100/164) | 64.98% (167/257) |
Relative to the base model, HNS 8+2 improves HumanEval by 6.71 percentage points while approximately preserving MBPP performance.
Relative to the vanilla LoRA checkpoint, HNS 8+2 improves HumanEval by 4.88 percentage points and MBPP by 4.28 percentage points.
Base model
meta-llama/Llama-3.1-8B