Edit model card

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
19
Safetensors
Model size
2.78B params
Tensor type
BF16
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for ayoubkirouane/Phi-2.7B_MERGED