Danger SNIP Scores for Llama-2-7B-Chat-HF

This repository contains SNIP (Sparse Neural Implant Pruning) scores computed on the danger dataset using a pruned model (p=0.07, q=0.03).

Details

  • Base Model: Llama-2-7B-Chat-HF
  • Pruned Model: p=0.07, q=0.03 (pruned with wandg_set_difference)
  • Dataset: danger.txt (generated with GCG suffix 2)
  • GCG Suffix ID: 2 (applied during SNIP score computation)
  • Method: wandg (WANDA + gradient-based scoring)
  • Sparsity Type: unstructured
  • Number of Files: 224

Usage

These SNIP scores can be used for two-stage pruning experiments where:

  1. Stage 1: Prune top d% danger neurons that are NOT in top q% utility neurons
  2. Stage 2: Apply standard p,q pruning on the Stage 1 pruned model

File Structure

wanda_score/
  β”œβ”€β”€ W_metric_layer_0_name_model.layers.0.*.pkl
  β”œβ”€β”€ W_metric_layer_1_name_model.layers.1.*.pkl
  └── ...

Each .pkl file contains SNIP scores for a specific layer and weight matrix.

Loading the Scores

import pickle
from huggingface_hub import hf_hub_download

# Download a score file
file_path = hf_hub_download(
    repo_id="jeqcho/llama2-7b-chat-danger-snip-scores-gcg2",
    filename="wanda_score/W_metric_layer_0_name_model.layers.0.mlp.down_proj_weight.pkl",
    repo_type="model"
)

# Load the scores
with open(file_path, "rb") as f:
    scores = pickle.load(f)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support