Downloads · 30 days
10
8% of all-time downloads
agp9/gemma-4-e2b-sos-lora
gemma-4-e2b-sos-lora is a text generation model from agp9. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as gemma.
Fine-tuned LoRA adapter for disaster triage and emergency response. Built on Gemma 4 E2B using Unsloth + TRL SFTTrainer. Trained on a synthetic dataset of ~2000 START Protocol triage and FEMA emergency scenarios.
Downloads · 30 days
10
8% of all-time downloads
All-time downloads
130
Public
Repo size
156 MB
Likes
0
Public
Click a slice to open those files.
.safetensors124 MB · 79%
From the Hugging Face model README
Fine-tuned LoRA adapter for disaster triage and emergency response.
Built on Gemma 4 E2B using Unsloth + TRL SFTTrainer. Trained on a synthetic dataset of ~2000 START Protocol triage and FEMA emergency scenarios.
unsloth/gemma-4-e2b-it-unsloth-bnb-4bit — Gemma 4 E2B (5.15B total, 2.3B effective parameters) in 4-bit NF4 quantization.
Synthetic dataset with 2000 examples across three categories:
START Protocol triage (1200 examples) — Victim assessment based on respiratory rate, pulse, capillary refill, and mental status. Outputs RED (Immediate), YELLOW (Delayed), GREEN (Minor), or BLACK (Deceased) per the START triage system.
FEMA emergency response (500 examples) — Protocols for earthquake, fire, flood, tornado, tsunami, CPR, bleeding control, burns, hypothermia, heat stroke, snake bites, chemical exposure, choking, allergic reactions, and more.
Triage edge cases (300 examples) — Respiratory distress, mass casualty scenarios, pediatric victims, pregnant patients, amputations, and multi-casualty sorting.
from unsloth import FastLanguageModel
import torch
model, tokenizer = FastLanguageModel.from_pretrained(
model_name='unsloth/gemma-4-e2b-it-unsloth-bnb-4bit',
max_seq_length=2048,
load_in_4bit=True,
)
model.load_adapter('agp9/gemma-4-e2b-sos-lora')
FastLanguageModel.for_inference(model)
messages = [{'role': 'user', 'content': [{'type': 'text', 'text': 'START triage: Adult male found crushed under rubble. RR=6, pulse=absent, cap_refill=4s, mental=unresponsive.'}]}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors='pt').to('cuda')
outputs = model.generate(inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("unsloth/gemma-4-e2b-it-unsloth-bnb-4bit", device_map="auto")
model = PeftModel.from_pretrained(base, "agp9/gemma-4-e2b-sos-lora")
tokenizer = AutoTokenizer.from_pretrained("unsloth/gemma-4-e2b-it-unsloth-bnb-4bit")
Example outputs from the fine-tuned model:
| Input | Output |
|---|---|
| RR=6, pulse=absent, unresponsive | RED - Immediate |
| RR=22, pulse=present, cap_refill=2s, alert | YELLOW - Delayed |
| "What to do during an earthquake?" | DROP, COVER, HOLD ON. |
| "How do I stop severe bleeding?" | Direct pressure. Elevate. Tourniquet as last resort. |
Gemma-SOS — An offline Android app for disaster response. Runs Gemma 4 E2B on-device via LiteRT-LM. Features:
This adapter was created for the Gemma 4 Good Hackathon (Google DeepMind x Kaggle) — Unsloth Special Technology Track.