Views
No views yet
unsloth/gemma-4-E2B-it for the OfflineAid project — an offline AI assistant for Australian consumer-safety scenarios (anti-scam, disaster, travel) targeting the Kaggle Gemma 4 Good Hackathon.peft.PeftModel.merge_and_unload() from the LoRA adapter at helenk/gemma-4-E2B-lora. For the Q4_K_M GGUF quantization, see helenk/gemma-4-E2B-finetune-GGUF.helenk/gemma-4-E4B-finetune. It targets lower-memory inference (Pixel 7 class) and was trained on the same corpus with identical hyperparameters via scripts/render_finetune_variant.py.helenk/gemma-4-E2B-loraunsloth/gemma-4-E2B-itq,k,v,o,gate,up,down_proj, vision layers offgemma-4-thinkingtrain_on_responses_only (mask user + evidence turn, train only on answer tokens)helenkwok/offlineaid v3 — 1,002-row train split (90/10 stratified per-language EN/ZH/AR from 1,113-row total, seed=3407). Each row is {instruction, input (= verbatim evidence_quote from .gov.au source), output (grounded answer in target language), language}.MODEL_VARIANT = "E2B" switch.1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base = AutoModelForCausalLM.from_pretrained("unsloth/gemma-4-E2B-it", torch_dtype="float16", device_map="cpu")
5# Unsloth wraps Linear layers in Gemma4ClippableLinear — strip before peft injection
6# (see scripts/merge_e2b_lora.py for the unwrap helper)
7model = PeftModel.from_pretrained(base, "helenk/gemma-4-E2B-lora").merge_and_unload()
8model.save_pretrained("gemma-4-E2B-offlineaid-merged", safe_serialization=True, max_shard_size="5GB")
9AutoTokenizer.from_pretrained("helenk/gemma-4-E2B-lora").save_pretrained("gemma-4-E2B-offlineaid-merged")scripts/merge_e2b_lora.py.helenk/gemma-4-E4B-finetune-GGUF for the methodology and results table. Both variants share identical training data, recipe, and merge pipeline.gemma-4-E2B-it.litertlm plus retrieval, not this fine-tune; see the project writeup for the architectural rationale.helenkwok/offlineaid) is CC-BY-4.0.helenk/gemma-4-E2B-lorahelenk/gemma-4-E2B-finetune-GGUFhelenk/gemma-4-E4B-finetune