Merge Method

This model was merged using the SLERP merge method.

Models Merged

The following models were included in the merge:

Configuration

The following YAML configuration was used to produce this model:


slices:
  - sources:
      - model: rhysjones/phi-2-orange
        layer_range: [0, 32]
      - model: Yhyu13/phi-2-sft-dpo-gpt4_en-ep1
        layer_range: [0, 32]
merge_method: slerp
base_model: rhysjones/phi-2-orange
parameters:
  t:
    - filter: self_attn
      value: [0, 0.5, 0.3, 0.7, 1]
    - filter: mlp
      value: [1, 0.5, 0.7, 0.3, 0]
    - value: 0.5
dtype: bfloat16

Usage :

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
torch.set_default_device("cuda")
model = AutoModelForCausalLM.from_pretrained("ayoubkirouane/phi-2_MERGED", torch_dtype="auto", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("ayoubkirouane/phi-2_MERGED", trust_remote_code=True)
inputs = tokenizer('What Machine Learning ? ', return_tensors="pt", return_attention_mask=False)
outputs = model.generate(**inputs, max_length=50)
text = tokenizer.batch_decode(outputs)[0]
print(text)
Downloads last month
20
Safetensors
Model size
2.78B params
Tensor type
BF16
·
Inference Providers NEW
This model is not currently available via any of the supported third-party Inference Providers, and the model is not deployed on the HF Inference API.

Model tree for ayoubkirouane/Phi-2.7B_MERGED