Downloads · 30 days
42
8% of all-time downloads
MrOvkill/Phi-3-Instruct-Bloated
Phi-3-Instruct-Bloated is a text generation model from MrOvkill. 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.
Phi-3-Instruct-Bloated is a merge of the following models using LazyMergekit: microsoft/Phi-3-mini-128k-instruct NexaAIDev/Octopus-v4
Downloads · 30 days
42
8% of all-time downloads
All-time downloads
528
Public
Parameters
3.8B
7.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors7.6 GB · 100%
From the Hugging Face model README
Phi-3-Instruct-Bloated is a merge of the following models using LazyMergekit:
slices:
- sources:
- model: microsoft/Phi-3-mini-128k-instruct
layer_range: [0, 32]
- model: NexaAIDev/Octopus-v4
layer_range: [0, 32]
merge_method: slerp
base_model: microsoft/Phi-3-mini-128k-instruct
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
# Installation
!pip install -qU transformers accelerate
# Imports
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
# Loading
tokenizer = AutoTokenizer.from_pretrained("MrOvkill/Phi-3-Instruct-Bloated")
model = AutoModelForCausalLM.from_pretrained("MrOvkill/Phi-3-Instruct-Bloated")
# Completion function
def infer(prompt, **kwargs):
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(**inputs, **kwargs)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Some silliness
infer("<|user|>\nBen is going to the store for some Ice Cream. So is Jerry. They mix up the ice cream at the store. Is the ice cream: (a. Ben's (b. Jerry's (c. Ben and Jerry's <|end|>\n<|assistant|>\nMy answer is (", max_new_tokens=1024)
# A proper test
infer(
"""
<|user|>
Explain what a Mixture of Experts is in less than 100 words.
<|assistant|>
""",
max_new_tokens=1024,
do_sample=False,
temperature=0.0,
top_k=50,
top_p=0.89,
)