File size: 1,354 Bytes
e21ddb7 cf36bc6 e21ddb7 afeccf8 cf36bc6 e21ddb7 cf36bc6 e21ddb7 f669f75 c891eaf f669f75 e21ddb7 cf36bc6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
---
base_model:
- microsoft/Phi-3-small-8k-instruct
library_name: transformers
tags:
- mergekit
- merge
license: mit
language:
- en
---
# Phi-3-small-8k-instruct: 6 layers pruned
This is a layer-pruned language model created using [mergekit](https://github.com/cg123/mergekit). Layers to prune were selected based off of the average distances as follows:
![image](phi3small.png)
## 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:
* [microsoft/Phi-3-small-8k-instruct](https://huggingface.co/microsoft/Phi-3-small-8k-instruct)
### 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
``` |