You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Configuration Parsing Warning:In adapter_config.json: "peft.task_type" must be a string

gemma-3n-bm-it-2

The second instruction-tuning run for Gemma 3n E4B in Bambara, trained with Unsloth and TRL.

Adapter weights only โ€” they need a base model to load onto. The base for this run was a local directory on the training machine, so it is not recorded in this repository; point BASE below at your own Gemma 3n E4B checkpoint.

Config

Rank r 32
lora_alpha 32
use_rslora false โ€” effective scale alpha / r = 1.0
lora_dropout 0

Adapted: the decoder's attention and MLP projections, the 12 audio conformer blocks, and both multimodal embedding projectors.

Usage

import torch
from transformers import AutoProcessor, Gemma3nForConditionalGeneration
from peft import PeftModel

BASE = "..."   # your Gemma 3n E4B checkpoint

base = Gemma3nForConditionalGeneration.from_pretrained(
    BASE, dtype=torch.bfloat16, device_map="auto", attn_implementation="sdpa",
)
model = PeftModel.from_pretrained(base, "djelia/gemma-3n-bm-it-2")
model.eval()

processor = AutoProcessor.from_pretrained("djelia/gemma-3n-bm-it-2", padding_side="left")

messages = [{"role": "user", "content": [{"type": "text", "text": "I ni ce"}]}]
inputs = processor.apply_chat_template(
    messages, tokenize=True, return_dict=True,
    return_tensors="pt", add_generation_prompt=True,
).to(model.device)

out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(processor.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

Notes

The chat template requires strictly alternating user/assistant roles. Audio content items ({"type": "audio", "path": ...}) also work โ€” the adapter tunes the audio path.

For a run from this line whose base is published on the Hub, use djelia/gemma-3n-bm-it-3.

Downloads last month
3
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support