Downloads · 30 days
8
2% of all-time downloads
pszemraj/Phi-3-small-8k-prune6
Phi-3-small-8k-prune6 is a text generation model from pszemraj. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This is a layer-pruned language model created using mergekit. Layers to prune were selected based off of the average distances as follows:
Downloads · 30 days
8
2% of all-time downloads
All-time downloads
330
Public
Parameters
6.1B
12.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors12.2 GB · 100%
From the Hugging Face model README
This is a layer-pruned language model created using mergekit. Layers to prune were selected based off of the average distances as follows:

Quick eval for: pszemraj/Phi-3-small-8k-prune6
hf (pretrained=pszemraj/Phi-3-small-8k-prune6,trust_remote_code=True,dtype=bfloat16), gen_kwargs: (None), limit: None, num_fewshot: None, batch_size: 2
| Tasks | Version | Filter | n-shot | Metric | Value | Stderr | |
|---|---|---|---|---|---|---|---|
| arc_easy | 1 | none | 0 | acc | 0.7479 | ± | 0.0089 |
| none | 0 | acc_norm | 0.7125 | ± | 0.0093 | ||
| boolq | 2 | none | 0 | acc | 0.7489 | ± | 0.0076 |
| lambada_openai | 1 | none | 0 | perplexity | 27.3270 | ± | 1.0861 |
| none | 0 | acc | 0.3600 | ± | 0.0067 | ||
| openbookqa | 1 | none | 0 | acc | 0.3360 | ± | 0.0211 |
| none | 0 | acc_norm | 0.4020 | ± | 0.0219 | ||
| piqa | 1 | none | 0 | acc | 0.7182 | ± | 0.0105 |
| none | 0 | acc_norm | 0.7329 | ± | 0.0103 | ||
| winogrande | 1 | none | 0 | acc | 0.7143 | ± | 0.0127 |
While some further pre-training will be good, it seems capable of generating coherent text as is.
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
)
This model was merged using the passthrough merge method.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
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