Instructions to use djelia/gemma-3n-bm-it-3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use djelia/gemma-3n-bm-it-3 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Configuration Parsing Warning:In adapter_config.json: "peft.task_type" must be a string
gemma-3n-bm-it-3
The third instruction-tuning run for Gemma 3n E4B in Bambara, trained with Unsloth and TRL.
Adapter weights only. Load onto oza75/gemma-3n-bm-it-merged, a bf16 merge of an earlier
stage in this line โ it is not quantised, so load it in bf16.
Config
Rank r |
16 |
lora_alpha |
32 |
use_rslora |
false โ effective scale alpha / r = 2.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 = Gemma3nForConditionalGeneration.from_pretrained(
"oza75/gemma-3n-bm-it-merged",
dtype=torch.bfloat16,
device_map="auto",
attn_implementation="sdpa",
)
model = PeftModel.from_pretrained(base, "djelia/gemma-3n-bm-it-3")
model.eval()
processor = AutoProcessor.from_pretrained("djelia/gemma-3n-bm-it-3", 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.
The base is ~16 GB in bf16. If that does not fit, quantise oza75/gemma-3n-bm-it-merged itself
at load time with a BitsAndBytesConfig rather than swapping in a different checkpoint.
- Downloads last month
- -
Model tree for djelia/gemma-3n-bm-it-3
Unable to build the model tree, the base model loops to the model itself. Learn more.