Downloads · 30 days
111
5% of all-time downloads
RichardErkhov/mii-llm_-_maestrale-chat-v0.2-alpha-sft-gguf
mii-llm_-_maestrale-chat-v0.2-alpha-sft-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
111
5% of all-time downloads
All-time downloads
2.1K
Public
Repo size
71.4 GB
Likes
0
Public
Click a slice to open those files.
.gguf84.5 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
maestrale-chat-v0.2-alpha-sft - GGUF
| Name | Quant method | Size |
|---|---|---|
| maestrale-chat-v0.2-alpha-sft.Q2_K.gguf | Q2_K | 2.53GB |
| maestrale-chat-v0.2-alpha-sft.Q3_K_S.gguf | Q3_K_S | 2.95GB |
| maestrale-chat-v0.2-alpha-sft.Q3_K.gguf | Q3_K | 3.28GB |
| maestrale-chat-v0.2-alpha-sft.Q3_K_M.gguf | Q3_K_M | 3.28GB |
| maestrale-chat-v0.2-alpha-sft.Q3_K_L.gguf | Q3_K_L | 2.39GB |
| maestrale-chat-v0.2-alpha-sft.IQ4_XS.gguf | IQ4_XS | 3.67GB |
| maestrale-chat-v0.2-alpha-sft.Q4_0.gguf | Q4_0 | 3.83GB |
| maestrale-chat-v0.2-alpha-sft.IQ4_NL.gguf | IQ4_NL | 3.87GB |
| maestrale-chat-v0.2-alpha-sft.Q4_K_S.gguf | Q4_K_S | 3.86GB |
| maestrale-chat-v0.2-alpha-sft.Q4_K.gguf | Q4_K | 4.07GB |
| maestrale-chat-v0.2-alpha-sft.Q4_K_M.gguf | Q4_K_M | 4.07GB |
| maestrale-chat-v0.2-alpha-sft.Q4_1.gguf | Q4_1 | 4.24GB |
| maestrale-chat-v0.2-alpha-sft.Q5_0.gguf | Q5_0 | 4.65GB |
| maestrale-chat-v0.2-alpha-sft.Q5_K_S.gguf | Q5_K_S | 4.65GB |
| maestrale-chat-v0.2-alpha-sft.Q5_K.gguf | Q5_K | 4.78GB |
| maestrale-chat-v0.2-alpha-sft.Q5_K_M.gguf | Q5_K_M | 4.78GB |
| maestrale-chat-v0.2-alpha-sft.Q5_1.gguf | Q5_1 | 5.07GB |
| maestrale-chat-v0.2-alpha-sft.Q6_K.gguf | Q6_K | 5.53GB |
| maestrale-chat-v0.2-alpha-sft.Q8_0.gguf | Q8_0 | 7.17GB |
tags:
By @efederici and @mferraretto
This model uses ChatML prompt format:
<|im_start|>system
Assisti sempre con cura, rispetto e verità. Rispondi con la massima utilità ma in modo sicuro. Evita contenuti dannosi, non etici, pregiudizievoli o negativi. Assicurati che le risposte promuovano equità e positività.<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant
from transformers import (
AutoTokenizer,
AutoModelForCausalLM,
GenerationConfig,
TextStreamer
)
import torch
torch.backends.cuda.matmul.allow_tf32 = True
tokenizer = AutoTokenizer.from_pretrained("mii-llm/maestrale-chat-v0.2-alpha")
model = AutoModelForCausalLM.from_pretrained("mii-llm/maestrale-chat-v0.2-alpha", load_in_8bit=True, device_map="auto")
gen = GenerationConfig(
do_sample=True,
temperature=0.7,
repetition_penalty=1.2,
top_k=50,
top_p=0.95,
max_new_tokens=500,
pad_token_id=tokenizer.eos_token_id,
eos_token_id=tokenizer.convert_tokens_to_ids("<|im_end|>")
)
messages = [
{"role": "system", "content": "Assisti sempre con cura, rispetto e verità. Rispondi con la massima utilità ma in modo sicuro. Evita contenuti dannosi, non etici, pregiudizievoli o negativi. Assicurati che le risposte promuovano equità e positività."},
{"role": "user", "content": "{prompt}"}
]
with torch.no_grad(), torch.backends.cuda.sdp_kernel(
enable_flash=True,
enable_math=False,
enable_mem_efficient=False
):
temp = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(temp, return_tensors="pt").to("cuda")
streamer = TextStreamer(tokenizer, skip_prompt=True)
_ = model.generate(
**inputs,
streamer=streamer,
generation_config=gen
)
It's an alpha version, it's not aligned. We are working on alignment data and evals.