Downloads · 30 days
29
7% of all-time downloads
EpistemeAI/Iceball-Phi-3.5-mini-instruct-shareGPT
Iceball-Phi-3.5-mini-instruct-shareGPT is a text generation model from EpistemeAI. Use it when you need the model to write or continue text. It is set up for transformers.
- Developed by: EpistemeAI - License: apache-2.0 - Finetuned from model : unsloth/phi-3.5-mini-instruct-bnb-4bit
Downloads · 30 days
29
7% of all-time downloads
All-time downloads
404
Public
Parameters
3.8B
15.3 GB on disk
Likes
1
Public
Click a slice to open those files.
.bin7.6 GB · 50%
From the Hugging Face model README
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
Iceball-Phi-3.5-mini-instruct-shareGPT and Phi-3 family has been integrated in the 4.43.0 version of transformers. The current transformers version can be verified with: pip list | grep transformers.
Examples of required packages:
flash_attn==2.5.8
torch==2.3.1
accelerate==0.31.0
transformers==4.43.0
Iceball-Phi-3.5-mini-instruct-shareGPT, Phi-3.5-mini-Instruct supports a vocabulary size of up to 32064 tokens. The tokenizer files already provide placeholder tokens that can be used for downstream fine-tuning, but they can also be extended up to the model's vocabulary size.
Given the nature of the training data, the Phi-3.5-mini-instruct model is best suited for prompts using the chat format as follows:
<|system|>
You are a helpful assistant.<|end|>
<|user|>
How to explain Internet for a medieval knight?<|end|>
<|assistant|>
After obtaining the Iceball-Phi-3.5-mini-instruct-shareGPT model checkpoint, users can use this sample code for inference.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
torch.random.manual_seed(0)
model = AutoModelForCausalLM.from_pretrained(
"EpistemeAI/Iceball-Phi-3.5-mini-instruct-shareGPT",
device_map="cuda",
torch_dtype="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3.5-mini-instruct")
messages = [
{"role": "system", "content": "You are a helpful AI assistant."},
{"role": "user", "content": "Can you provide ways to eat combinations of bananas and dragonfruits?"},
{"role": "assistant", "content": "Sure! Here are some ways to eat bananas and dragonfruits together: 1. Banana and dragonfruit smoothie: Blend bananas and dragonfruits together with some milk and honey. 2. Banana and dragonfruit salad: Mix sliced bananas and dragonfruits together with some lemon juice and honey."},
{"role": "user", "content": "What about solving an 2x + 3 = 7 equation?"},
]
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
)
generation_args = {
"max_new_tokens": 500,
"return_full_text": False,
"temperature": 0.0,
"do_sample": False,
}
output = pipe(messages, **generation_args)
print(output[0]['generated_text'])
Notes: If you want to use flash attention, call AutoModelForCausalLM.from_pretrained() with attn_implementation="flash_attention_2"
Like other language models, the Phi family of models can potentially behave in ways that are unfair, unreliable, or offensive. Some of the limiting behaviors to be aware of include:
Developers should apply responsible AI best practices, including mapping, measuring, and mitigating risks associated with their specific use case and cultural, linguistic context. Phi-3 family of models are general purpose models. As developers plan to deploy these models for specific use cases, they are encouraged to fine-tune the models for their use case and leverage the models as part of broader AI systems with language-specific safeguards in place. Important areas for consideration include: