CoolFace
Modelpublic

pszemraj/Phi-3-small-8k-prune6

sourceHugging Facemitupdated 9mo agoView on Hugging Face
1likes13downloads
Model Card

Phi-3-small-8k-instruct: 6 layers pruned

This is a layer-pruned language model created using mergekit. Layers to prune were selected based off of the average distances as follows:

[image]

Quick eval

Quick eval for: pszemraj/Phi-3-small-8k-prune6

hf (pretrained=pszemraj/Phi-3-small-8k-prune6,trustremotecode=True,dtype=bfloat16), genkwargs: (None), limit: None, numfewshot: None, batch_size: 2

TasksVersionFiltern-shotMetricValueStderr
arc_easy1none0acc0.7479±0.0089
none0acc_norm0.7125±0.0093
boolq2none0acc0.7489±0.0076
lambada_openai1none0perplexity27.3270±1.0861
none0acc0.3600±0.0067
openbookqa1none0acc0.3360±0.0211
none0acc_norm0.4020±0.0219
piqa1none0acc0.7182±0.0105
none0acc_norm0.7329±0.0103
winogrande1none0acc0.7143±0.0127

Usage

While some further pre-training will be good, it seems capable of generating coherent text as is.

python
from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(
    "microsoft/Phi-3-small-8k-instruct", trust_remote_code=True
)
model = AutoModelForCausalLM.from_pretrained(
    "pszemraj/Phi-3-small-8k-prune6", trust_remote_code=True
)

Merge Details

Merge Method

This model was merged using the passthrough merge method.

Models Merged

The following models were included in the merge:

Configuration

The following YAML configuration was used to produce this model:

yaml
dtype: bfloat16
merge_method: passthrough
slices:
- sources:
  - layer_range: [0, 25]
    model: microsoft/Phi-3-small-8k-instruct
- sources:
  - layer_range: [31, 32]
    model: microsoft/Phi-3-small-8k-instruct