--- 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 ```