Downloads · 30 days
10
2% of all-time downloads
delayedkarma/gemma-4-finetune-finetome10k
gemma-4-finetune-finetome10k is a text generation model from delayedkarma. 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.
Original Unsloth Finetuning Resources:: https://unsloth.ai/docs/models/gemma-4/train
Downloads · 30 days
10
2% of all-time downloads
All-time downloads
647
Public
Parameters
8B
16 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors16 GB · 100%
From the Hugging Face model README
Original Unsloth Finetuning Resources:: https://unsloth.ai/docs/models/gemma-4/train
A merged, instruction-tuned fine-tune of Gemma 4 E4B trained with Unsloth and TRL on a cleaned conversational subset of FineTome-style data.
This model is a supervised fine-tune of unsloth/gemma-4-e4b-it-unsloth-bnb-4bit for general-purpose text instruction following and assistant-style responses.
Although the underlying architecture supports multimodal prompting, this fine-tuning run was performed on text-only conversational data. Best results are obtained with chat-formatted prompts using the tokenizer chat template.
unsloth/gemma-4-e4b-it-unsloth-bnb-4bitThis model is intended for:
This model was fine-tuned on a conversational instruction/response dataset:: 10k rows of Maxime Labonne's FineTome-100k dataset in ShareGPT style(https://huggingface.co/datasets/mlabonne/FineTome-100k)
Gemma-4 renders multi turn conversations like below:
The training data was normalized into alternating user / assistant turns before formatting with the Gemma chat template. Invalid or malformed conversations were filtered during preprocessing.
The model was fine-tuned using LoRA adapters and later exported as a merged model.
The source data used ShareGPT-style fields such as:
from: humanfrom: gptThese were converted into standard chat roles:
userassistantConversations were cleaned to ensure valid alternating turns before being serialized with the Gemma chat template.
This model performs best when prompted in chat format, not as a plain raw completion prompt.
Use tokenizer.apply_chat_template(..., add_generation_prompt=True) before generation.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "<username>/gemma-4-finetune-finetome10k"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto"
)
messages = [
{"role": "user", "content": "Explain what a modulus operator is in programming."}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True
).to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=200,
do_sample=True,
temperature=0.7,
top_p=0.9
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))