Downloads · 30 days
65
3% of all-time downloads
RichardErkhov/MaziyarPanahi_-_calme-2.3-phi3-4b-gguf
MaziyarPanahi_-_calme-2.3-phi3-4b-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
65
3% of all-time downloads
All-time downloads
1.9K
Public
Repo size
43.9 GB
Likes
0
Public
Click a slice to open those files.
.gguf51.1 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
calme-2.3-phi3-4b - GGUF
| Name | Quant method | Size |
|---|---|---|
| calme-2.3-phi3-4b.Q2_K.gguf | Q2_K | 1.32GB |
| calme-2.3-phi3-4b.IQ3_XS.gguf | IQ3_XS | 1.51GB |
| calme-2.3-phi3-4b.IQ3_S.gguf | IQ3_S | 1.57GB |
| calme-2.3-phi3-4b.Q3_K_S.gguf | Q3_K_S | 1.57GB |
| calme-2.3-phi3-4b.IQ3_M.gguf | IQ3_M | 1.73GB |
| calme-2.3-phi3-4b.Q3_K.gguf | Q3_K | 1.82GB |
| calme-2.3-phi3-4b.Q3_K_M.gguf | Q3_K_M | 1.82GB |
| calme-2.3-phi3-4b.Q3_K_L.gguf | Q3_K_L | 1.94GB |
| calme-2.3-phi3-4b.IQ4_XS.gguf | IQ4_XS | 1.93GB |
| calme-2.3-phi3-4b.Q4_0.gguf | Q4_0 | 2.03GB |
| calme-2.3-phi3-4b.IQ4_NL.gguf | IQ4_NL | 2.04GB |
| calme-2.3-phi3-4b.Q4_K_S.gguf | Q4_K_S | 2.04GB |
| calme-2.3-phi3-4b.Q4_K.gguf | Q4_K | 2.23GB |
| calme-2.3-phi3-4b.Q4_K_M.gguf | Q4_K_M | 2.23GB |
| calme-2.3-phi3-4b.Q4_1.gguf | Q4_1 | 2.24GB |
| calme-2.3-phi3-4b.Q5_0.gguf | Q5_0 | 2.46GB |
| calme-2.3-phi3-4b.Q5_K_S.gguf | Q5_K_S | 2.46GB |
| calme-2.3-phi3-4b.Q5_K.gguf | Q5_K | 2.62GB |
| calme-2.3-phi3-4b.Q5_K_M.gguf | Q5_K_M | 2.62GB |
| calme-2.3-phi3-4b.Q5_1.gguf | Q5_1 | 2.68GB |
| calme-2.3-phi3-4b.Q6_K.gguf | Q6_K | 2.92GB |
| calme-2.3-phi3-4b.Q8_0.gguf | Q8_0 | 3.78GB |
language:
This model is a fine-tune (DPO) of microsoft/Phi-3-mini-4k-instruct model.
All GGUF models are available here: MaziyarPanahi/calme-2.3-phi3-4b-GGUF
Detailed results can be found here
** Leaderboard 2**
| Metric | Value |
|---|---|
| Avg. | 23.38 |
| IFEval (0-Shot) | 49.26 |
| BBH (3-Shot) | 37.66 |
| MATH Lvl 5 (4-Shot) | 2.95 |
| GPQA (0-shot) | 9.06 |
| MuSR (0-shot) | 7.75 |
| MMLU-PRO (5-shot) | 31.42 |
** Leaderboard 1**
| Metric | Value |
|---|---|
| Avg. | 70.26 |
| AI2 Reasoning Challenge (25-Shot) | 63.48 |
| HellaSwag (10-Shot) | 80.86 |
| MMLU (5-Shot) | 69.24 |
| TruthfulQA (0-shot) | 60.66 |
| Winogrande (5-shot) | 72.77 |
| GSM8k (5-shot) | 74.53 |
MaziyarPanahi/calme-2.3-phi3-4b is the best-performing Phi-3-mini-4k model on the Open LLM Leaderboard. (03/06/2024).

This model uses ChatML prompt template:
<|im_start|>system
{System}
<|im_end|>
<|im_start|>user
{User}
<|im_end|>
<|im_start|>assistant
{Assistant}
You can use this model by using MaziyarPanahi/calme-2.3-phi3-4b as the model name in Hugging Face's
transformers library.
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
from transformers import pipeline
import torch
model_id = "MaziyarPanahi/calme-2.3-phi3-4b"
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
# attn_implementation="flash_attention_2"
)
tokenizer = AutoTokenizer.from_pretrained(
model_id,
trust_remote_code=True
)
streamer = TextStreamer(tokenizer)
messages = [
{"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
{"role": "user", "content": "Who are you?"},
]
# this should work perfectly for the model to stop generating
terminators = [
tokenizer.eos_token_id, # this should be <|im_end|>
tokenizer.convert_tokens_to_ids("<|assistant|>"), # sometimes model stops generating at <|assistant|>
tokenizer.convert_tokens_to_ids("<|end|>") # sometimes model stops generating at <|end|>
]
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
)
generation_args = {
"max_new_tokens": 500,
"return_full_text": False,
"temperature": 0.0,
"do_sample": False,
"streamer": streamer,
"eos_token_id": terminators,
}
output = pipe(messages, **generation_args)
print(output[0]['generated_text'])