PrepareBot 🆘

PrepareBot is a fine-tuned language model specialising in emergency preparedness, trained on official FEMA, CDC, and US government emergency preparedness documents. It provides clear, actionable, and accurate guidance for disaster preparedness, response, and recovery.


Model Details

Property Details
Base Model Google Gemma 4
Fine-tuning Framework Unsloth
Task Instruction-following / Text Generation
Language English
License Apache 2.0

Capabilities

  • 72-hour emergency kit guidance
  • Water & food storage recommendations
  • Evacuation planning and routes
  • Flood, earthquake, and hurricane preparedness
  • Important document safekeeping
  • First aid and medical supply checklists
  • Communication and family reunification planning

Usage

System Prompt

All queries should use the following system prompt for best results:

You are PrepareBot, an expert emergency preparedness assistant 
trained on official FEMA, CDC, and government emergency preparedness documents. 
Provide clear, actionable, and accurate guidance for disaster preparedness, 
response, and recovery. Always prioritize safety and direct users to official 
resources when appropriate.

Option 1 — Using Unsloth (Recommended)

⚠️ Run the install cell first, then restart your kernel/runtime before importing.

# Install (restart runtime after this)
!pip install git+https://github.com/huggingface/transformers.git -q
!pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git" -q
from unsloth import FastLanguageModel
import torch

MAX_SEQ_LENGTH = 2048
MODEL_NAME = "nuhmanpk/preparebot"

SYSTEM_PROMPT = """You are PrepareBot, an expert emergency preparedness assistant 
trained on official FEMA, CDC, and government emergency preparedness documents. 
Provide clear, actionable, and accurate guidance for disaster preparedness, 
response, and recovery. Always prioritize safety and direct users to official 
resources when appropriate."""

# Load model
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name=MODEL_NAME,
    max_seq_length=MAX_SEQ_LENGTH,
    dtype=None,
    load_in_4bit=True,
)
FastLanguageModel.for_inference(model)
model.eval()
print("Model Loaded ✓")

# Inference
def ask(question: str, max_new_tokens: int = 512) -> str:
    messages = [
        {"role": "system", "content": SYSTEM_PROMPT},
        {"role": "user",   "content": question},
    ]
    prompt = tokenizer.apply_chat_template(
        messages, tokenize=False, add_generation_prompt=True
    )
    inputs = tokenizer(
        prompt, return_tensors="pt",
        truncation=True, max_length=MAX_SEQ_LENGTH,
    ).to(model.device)

    with torch.inference_mode():
        output_ids = model.generate(
            **inputs,
            max_new_tokens=max_new_tokens,
            temperature=0.7,
            do_sample=True,
            top_p=0.9,
            repetition_penalty=1.1,
            pad_token_id=tokenizer.eos_token_id,
        )

    new_tokens = output_ids[0][inputs["input_ids"].shape[1]:]
    return tokenizer.decode(new_tokens, skip_special_tokens=True)

# Example
questions = [
    "What should I include in a 72-hour emergency kit?",
    "How much water should I store per person?",
    "What are the most important documents to keep safe during disasters?",
    "How do I prepare for a flood?",
    "What should I do during an earthquake?",
]

for i, question in enumerate(questions, 1):
    print(f"\n--- Q{i}: {question} ---")
    print(ask(question))

Option 2 — Using Transformers (without Unsloth)

⚠️ Gemma 4 requires transformers installed from source until an official release includes it.

# Install (restart runtime after this)
!pip install git+https://github.com/huggingface/transformers.git -q
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

MODEL_NAME = "nuhmanpk/preparebot"

SYSTEM_PROMPT = """You are PrepareBot, an expert emergency preparedness assistant 
trained on official FEMA, CDC, and government emergency preparedness documents. 
Provide clear, actionable, and accurate guidance for disaster preparedness, 
response, and recovery. Always prioritize safety and direct users to official 
resources when appropriate."""

tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
model = AutoModelForCausalLM.from_pretrained(
    MODEL_NAME,
    dtype=torch.float16,
    device_map="auto",
)
model.eval()

def ask(question: str, max_new_tokens: int = 512) -> str:
    messages = [
        {"role": "system", "content": SYSTEM_PROMPT},
        {"role": "user",   "content": question},
    ]
    prompt = tokenizer.apply_chat_template(
        messages, tokenize=False, add_generation_prompt=True
    )
    inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

    with torch.inference_mode():
        output_ids = model.generate(
            **inputs,
            max_new_tokens=max_new_tokens,
            temperature=0.7,
            do_sample=True,
            top_p=0.9,
            repetition_penalty=1.1,
            pad_token_id=tokenizer.eos_token_id,
        )

    new_tokens = output_ids[0][inputs["input_ids"].shape[1]:]
    return tokenizer.decode(new_tokens, skip_special_tokens=True)

print(ask("What should I include in a 72-hour emergency kit?"))

Option 3 — Ollama

ollama run nuhmanpk/preparebot

Or pull and query via API:

ollama pull nuhmanpk/preparebot

curl http://localhost:11434/api/chat -d '{
  "model": "nuhmanpk/preparebot",
  "messages": [
    { "role": "user", "content": "What should I include in a 72-hour emergency kit?" }
  ]
}'

Example Output

Q: What should I include in a 72-hour emergency kit?

A 72-hour emergency kit should contain enough supplies to sustain you and your family for at least three days without outside assistance. Here is a comprehensive checklist organized by category:

Water & Food

  • 1 gallon of water per person per day (3-day supply minimum)
  • Non-perishable food (canned goods, energy bars, dried fruit, nuts)
  • Manual can opener

First Aid & Medications

  • First aid kit with bandages, antiseptic wipes, and pain relievers
  • 72-hour supply of all prescription medications
  • Copies of medical records and prescriptions

Documents & Communication

  • Waterproof copies of IDs, insurance policies, and bank information
  • Battery-powered or hand-crank radio
  • Portable phone charger

Always tailor your kit to your household's specific needs, including pets, infants, or individuals with medical conditions.


Training Data

Fine-tuned on curated emergency preparedness content sourced from:


Limitations

  • PrepareBot is an AI assistant and not a substitute for official emergency services. In a real emergency, always call 911 or your local emergency number.
  • Responses reflect training data and may not account for regional or local regulations.
  • Always verify critical preparedness information against the latest official FEMA and CDC guidelines.

Citation

@misc{preparebot2025,
  author    = {Nuhman PK},
  title     = {PrepareBot: Emergency Preparedness Language Model},
  year      = {2025},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/nuhmanpk/preparebot}
}
Downloads last month
117
Safetensors
Model size
5B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support