Downloads · 30 days
14
3% of all-time downloads
Mihaiii/MiniChat-2-3B-optimum-intel
MiniChat-2-3B-optimum-intel is a text generation model from Mihaiii. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This is a quantized version of GeneZC/MiniChat-2-3B
Downloads · 30 days
14
3% of all-time downloads
All-time downloads
458
Public
Repo size
3 GB
Likes
1
Public
Click a slice to open those files.
.bin3 GB · 100%
From the Hugging Face model README
This is a quantized version of GeneZC/MiniChat-2-3B
Optimum quantization using the command:
optimum-cli inc quantize --model GeneZC/MiniChat-2-3B --output ./mnch
Usage example:
from optimum.intel import INCModelForCausalLM
from transformers import AutoTokenizer, pipeline, AutoModelForCausalLM
import torch
model_id = "Mihaiii/MiniChat-2-3B-optimum-intel"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = INCModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16)
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
messages = [
{
"role": "system",
"content": "You are a friendly chatbot who always responds in the style of a pirate",
},
{"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
]
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.0001, repetition_penalty=1.2)
print(outputs[0]["generated_text"])