Downloads · 30 days
4
22% of all-time downloads
RichardErkhov/teilomillet_-_MiniMerlin-3B-4bits
teilomillet_-_MiniMerlin-3B-4bits 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
4
22% of all-time downloads
All-time downloads
18
Public
Parameters
3.1B
2.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.1 GB · 100%
How the weights are stored.
U82.7B · 89%
From the Hugging Face model README
Quantization made by Richard Erkhov.
MiniMerlin-3B - bnb 4bits
license: apache-2.0 language:
SFT on a synthetic custom (french) dataset (2k), from general question answering, problem solving to code question. It's a POC.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
model = AutoModelForCausalLM.from_pretrained(
"teilomillet/MiniMerlin-3B",
revision="0.1",
return_dict=True,
torch_dtype=torch.bfloat16,
device_map='auto'
)
tokenizer = AutoTokenizer.from_pretrained("teilomillet/MiniMerlin-3B")
tokenizer.pad_token = tokenizer.eos_token
text = "[|User|] Comment faire un bon plat ? </s>[|Assistant|]"
inputs = tokenizer(text, return_tensors="pt").to(0)
outputs = model.generate(**inputs, max_new_tokens=800)
print(tokenizer.decode(outputs[0], skip_special_tokens=False))