Downloads · 30 days
22
6% of all-time downloads
ermiaazarkhalili/Gemma4-E2B-Function-Calling-xLAM-Unsloth
Gemma4-E2B-Function-Calling-xLAM-Unsloth is a text generation model from ermiaazarkhalili. 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.
Fine-tuned adapter-merged checkpoint of Gemma4-E2B-it on the Salesforce/xlam-function-calling-60k dataset, produced via Unsloth + Hugging Face TRL's SFTTrainer.
Downloads · 30 days
22
6% of all-time downloads
All-time downloads
388
Public
Parameters
5.1B
20.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors10.2 GB · 100%
From the Hugging Face model README
Fine-tuned adapter-merged checkpoint of Gemma4-E2B-it on the
Salesforce/xlam-function-calling-60k dataset, produced via
Unsloth + Hugging Face TRL's SFTTrainer.
| Field | Value |
|---|---|
| Base model | google/gemma-4-E2B-it |
| Architecture | Gemma4ForConditionalGeneration |
| Parameters | 2B (E2B, vision-language) |
| Precision | bfloat16 (merged 16-bit) |
| Fine-tuning method | QLoRA (4-bit base, LoRA r=16, α=16) |
| Dataset | Salesforce/xlam-function-calling-60k (60,000 examples) |
| Training | N=1 full epoch (7,500 steps, effective batch=8) |
| Learning rate | 2e-4 (linear decay, warmup 5 steps) |
| Unsloth version | 2026.4.6 |
| Trained on | DRAC Fir cluster, NVIDIA H100 80GB HBM3 MIG 3g.40gb |
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"ermiaazarkhalili/Gemma4-E2B-Function-Calling-xLAM-Unsloth",
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained("ermiaazarkhalili/Gemma4-E2B-Function-Calling-xLAM-Unsloth", trust_remote_code=True)
messages = [{"role": "user", "content": "Find flights from SFO to NYC on December 25th"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text=text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
"ermiaazarkhalili/Gemma4-E2B-Function-Calling-xLAM-Unsloth",
max_seq_length=2048,
load_in_4bit=False,
)
FastLanguageModel.for_inference(model)
Quantized GGUF versions are available at ermiaazarkhalili/Gemma4-E2B-Function-Calling-xLAM-Unsloth-GGUF:
# llama-cli
llama-cli -hf ermiaazarkhalili/Gemma4-E2B-Function-Calling-xLAM-Unsloth-GGUF --jinja -p "Find flights from SFO to NYC on December 25th" -n 256
# Ollama
ollama run hf.co/ermiaazarkhalili/Gemma4-E2B-Function-Calling-xLAM-Unsloth-GGUF:Q4_K_M
Function-calling fine-tuning on 60,000 examples from Salesforce/xlam-function-calling-60k.
FastLanguageModelFor research and non-commercial experimentation only. Outputs should be independently verified before any downstream use.
Gemma4-E2B-it, inherits its limitations and biases.@misc{ gemma4_e2b_xlam_unsloth_2026 ,
author = {Ermia Azarkhalili},
title = { Gemma4-E2B-xLAM-Unsloth — Function-calling fine-tune of Gemma4-E2B-it },
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/ermiaazarkhalili/Gemma4-E2B-Function-Calling-xLAM-Unsloth}}
}
This gemma4 model was trained 2× faster with Unsloth and Hugging Face's TRL library.