Downloads · 30 days
96
4% of all-time downloads
RichardErkhov/sartifyllc_-_sartify_gemma2-2B-16bit-gguf
sartifyllc_-_sartify_gemma2-2B-16bit-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
96
4% of all-time downloads
All-time downloads
2.2K
Public
Repo size
32.3 GB
Likes
0
Public
Click a slice to open those files.
.gguf37.3 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
sartify_gemma2-2B-16bit - GGUF
license: apache-2.0 language:
alpaca_prompt = """Hapo chini kuna maelezo ya kazi, pamoja na maelezo ya ziada yanayotoa muktadha zaidi. Andika jibu ambalo linakamilisha ombi hilo ipasavyo.
### Maelezo:
{}
### Ziada:
{}
### Jibu:
{}"""
EOS_TOKEN = tokenizer.eos_token # Must add EOS_TOKEN
def formatting_prompts_func(examples):
instructions = examples["instruction"]
inputs = examples["input"]
outputs = examples["output"]
texts = []
for instruction, input, output in zip(instructions, inputs, outputs):
# Must add EOS_TOKEN, otherwise your generation will go on forever!
text = alpaca_prompt.format(instruction, input, output) + EOS_TOKEN
texts.append(text)
return { "text" : texts, }
pass
from datasets import load_dataset
# pip install accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained("sartifyllc/sartify_gemma2-2B-16bit")
model = AutoModelForCausalLM.from_pretrained(
"sartifyllc/sartify_gemma2-2B-16bit",
device_map="auto",
torch_dtype=torch.bfloat16
)
input_text = "Je moja jumlisha moja ni ngapi?"
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(**input_ids)
print(tokenizer.decode(outputs[0]))