Downloads · 30 days
0
lottery7/gemma-3n-e4b-fleurs-ru-lora
gemma-3n-e4b-fleurs-ru-lora is a machine learning model from lottery7. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
- Developed by: lottery7 - License: apache-2.0 - Finetuned from model : unsloth/gemma-3n-e4b-it-unsloth-bnb-4bit
Downloads · 30 days
0
Access
Public
Updated Aug 18, 2025
Repo size
119 MB
Likes
0
Public
Click a slice to open those files.
.safetensors80.9 MB · 67%
From the Hugging Face model README
This gemma3n model was trained 2x faster with Unsloth and Huggingface's TRL library.
from unsloth import FastModel
from datasets import load_dataset,Audio,concatenate_datasets
from transformers import TextStreamer
def do_gemma_3n_inference(messages, max_new_tokens = 128):
_ = model.generate(
**processor.apply_chat_template(
messages,
add_generation_prompt = True, # Must add for generation
tokenize = True,
return_dict = True,
return_tensors = "pt",
).to("cuda"),
max_new_tokens = max_new_tokens,
do_sample=False,
streamer = TextStreamer(processor, skip_prompt = True),
)
model, processor = FastModel.from_pretrained(
model_name = "lottery7/gemma-3n-e4b-fleurs-ru-lora", # YOUR MODEL YOU USED FOR TRAINING
max_seq_length = 2048,
load_in_4bit = True,
)
dataset = load_dataset("google/fleurs", "ru_ru", split="train")
test_audio = dataset[2]
messages = [
{
"role": "system",
"content": [
{
"type": "text",
"text": "You are an assistant that transcribes speech accurately.",
}
],
},
{
"role": "user",
"content": [
{"type": "audio", "audio": test_audio['audio']['array']},
{"type": "text", "text": "Please transcribe this audio."}
]
}
]
do_gemma_3n_inference(messages, max_new_tokens = 256)