Instructions to use ajvikram/emergency-triage-4b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ajvikram/emergency-triage-4b-gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf ajvikram/emergency-triage-4b-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf ajvikram/emergency-triage-4b-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ajvikram/emergency-triage-4b-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf ajvikram/emergency-triage-4b-gguf:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf ajvikram/emergency-triage-4b-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ajvikram/emergency-triage-4b-gguf:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf ajvikram/emergency-triage-4b-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ajvikram/emergency-triage-4b-gguf:Q4_K_M
Use Docker
docker model run hf.co/ajvikram/emergency-triage-4b-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use ajvikram/emergency-triage-4b-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ajvikram/emergency-triage-4b-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ajvikram/emergency-triage-4b-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ajvikram/emergency-triage-4b-gguf:Q4_K_M
- Ollama
How to use ajvikram/emergency-triage-4b-gguf with Ollama:
ollama run hf.co/ajvikram/emergency-triage-4b-gguf:Q4_K_M
- Unsloth Studio
How to use ajvikram/emergency-triage-4b-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ajvikram/emergency-triage-4b-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ajvikram/emergency-triage-4b-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ajvikram/emergency-triage-4b-gguf to start chatting
- Pi
How to use ajvikram/emergency-triage-4b-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ajvikram/emergency-triage-4b-gguf:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ajvikram/emergency-triage-4b-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use ajvikram/emergency-triage-4b-gguf with Docker Model Runner:
docker model run hf.co/ajvikram/emergency-triage-4b-gguf:Q4_K_M
- Lemonade
How to use ajvikram/emergency-triage-4b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ajvikram/emergency-triage-4b-gguf:Q4_K_M
Run and chat with the model
lemonade run user.emergency-triage-4b-gguf-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use ajvikram/emergency-triage-4b-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ajvikram/emergency-triage-4b-gguf:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default ajvikram/emergency-triage-4b-gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ajvikram/emergency-triage-4b-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ajvikram/emergency-triage-4b-gguf:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "ajvikram/emergency-triage-4b-gguf:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Emergency Triage 4B (GGUF)
A fine-tuned Qwen3-4B model specialized for 911/emergency incident triage in remote locations. Designed for on-device inference on phones, tablets, and edge hardware where connectivity is limited or unavailable.
What it does
Given a free-text emergency incident report, the model produces a structured JSON triage assessment:
{
"severity": "CRITICAL",
"incident_type": "MEDICAL",
"summary": "Hiker fell 30 feet from cliff, unable to move legs...",
"location": {
"description": "Pacific Crest Trail, mile marker 1847",
"accessibility": "TRAIL"
},
"resources_needed": ["Helicopter EMS", "Rope rescue team", "Trauma kit"],
"priority_actions": ["Immobilize legs", "Apply thermal protection", "Request helicopter evacuation"],
"requires_evacuation": true,
"communication_status": "LIMITED"
}
How to run
1. Ollama (Mac / Linux / Windows)
The easiest way to run locally.
# Download the GGUF file
hf download ajvikram/emergency-triage-4b-gguf emergency-triage-4b-q4_k_m.gguf
# Create a Modelfile
cat > Modelfile << 'EOF'
FROM ./emergency-triage-4b-q4_k_m.gguf
TEMPLATE """{{- if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""
SYSTEM """You are an emergency incident triage system. Analyze the incident and respond with a JSON triage assessment."""
PARAMETER temperature 0.3
PARAMETER num_ctx 2048
PARAMETER stop "<|im_end|>"
EOF
# Import into Ollama
ollama create emergency-triage -f Modelfile
# Run it
ollama run emergency-triage "A hiker has collapsed on a remote trail 8 miles from the nearest road. They are unresponsive, breathing shallow. Two other hikers are present. No cell service. Temperature is 95F with high humidity."
2. llama.cpp (Mac / Linux / Windows)
For direct GGUF inference without Ollama.
# Download the GGUF
hf download ajvikram/emergency-triage-4b-gguf emergency-triage-4b-q4_k_m.gguf
# Run inference (Metal GPU on Mac, CUDA on Linux)
llama-cli \
-m emergency-triage-4b-q4_k_m.gguf \
-p "<|im_start|>system
You are an emergency incident triage system. Analyze the incident and respond with a JSON triage assessment.<|im_end|>
<|im_start|>user
Your emergency scenario here<|im_end|>
<|im_start|>assistant" \
-n 512 --temp 0.3 -ngl 99 --single-turn
3. iPhone / iPad (iOS)
Using LLM Farm (free) or PocketPal AI:
- Download
emergency-triage-4b-q4_k_m.gguf(2.4 GB) to your device - Open the app and import the GGUF file
- Set the system prompt to:
You are an emergency incident triage system. Analyze the incident and respond with a JSON triage assessment. - Set temperature to 0.3 for consistent outputs
- Type or speak your emergency scenario
Device requirements: iPhone 12+ or iPad Air 4+ (4GB+ RAM). The Q4_K_M quantization runs well on A14 chip and newer.
4. Android
Using ChatterUI or llama.cpp Android:
- Download
emergency-triage-4b-q4_k_m.ggufto your device - Open the app and load the model
- Set system prompt as above
- Set temperature to 0.3
Device requirements: 6GB+ RAM recommended. Works on Snapdragon 8 Gen 1+ or equivalent.
5. Python (transformers)
For the full-precision merged model:
from transformers import AutoModelForCausalLM, AutoTokenizer
import json
model = AutoModelForCausalLM.from_pretrained("ajvikram/emergency-triage-4b-gguf", subfolder="merged")
tokenizer = AutoTokenizer.from_pretrained("ajvikram/emergency-triage-4b-gguf", subfolder="merged")
messages = [
{"role": "system", "content": "You are an emergency incident triage system. Analyze the incident and respond with a JSON triage assessment."},
{"role": "user", "content": "Your scenario here"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.3)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
6. Edge Deployment (Raspberry Pi / Jetson)
The Q4_K_M GGUF works on edge devices with 4GB+ RAM:
# On Raspberry Pi 5 (8GB) or Jetson Nano
# Build llama.cpp for your platform
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp && cmake -B build && cmake --build build
# Run inference (CPU-only on Pi, CUDA on Jetson)
./build/bin/llama-cli -m emergency-triage-4b-q4_k_m.gguf \
-p "your prompt" -n 512 --temp 0.3 --single-turn
Expected speeds: ~5-10 tok/s on Pi 5, ~30+ tok/s on Jetson Orin.
Training details
- Method: QLoRA (r=32, alpha=64) via Unsloth
- Data: 500 examples (52 hand-crafted seeds + 448 synthetic via knowledge distillation)
- Teacher: 120B parameter model for synthetic data generation and quality judging
- Epochs: 3
- Final eval loss: 0.52
- Hardware: NVIDIA RTX A6000 (48GB), ~8 minutes training time
Quantization
| Format | Size | BPW | Use case |
|---|---|---|---|
| F16 (merged) | 7.6 GB | 16.0 | Server / fine-tuning base |
| Q4_K_M | 2.4 GB | 4.95 | Mobile / edge deployment |
Performance
| Platform | Speed | Notes |
|---|---|---|
| Mac (Metal) | ~84 tok/s | M1/M2/M3 Apple Silicon |
| NVIDIA GPU | ~100+ tok/s | CUDA, depends on GPU |
| iPhone 15 Pro | ~15-20 tok/s | A17 Pro chip |
| Raspberry Pi 5 | ~5-10 tok/s | CPU only, 8GB model |
Output schema
{
"severity": "CRITICAL | HIGH | MEDIUM | LOW",
"incident_type": "MEDICAL | NATURAL_DISASTER | RESCUE | INFRASTRUCTURE | WILDLIFE | WEATHER | VEHICLE | OTHER",
"summary": "1-2 sentence dispatch summary",
"location": {
"description": "location details",
"accessibility": "ROAD | TRAIL | OFF_TRAIL | AIR_ONLY"
},
"resources_needed": ["specific resources"],
"priority_actions": ["ordered by urgency"],
"requires_evacuation": true/false,
"communication_status": "FULL | LIMITED | NONE"
}
Limitations
- Phase 0 prototype trained on 500 examples โ production would use 40,000+
- Schema adherence is good but not perfect with limited training data
- Optimized for English-language incident reports
- Designed for remote/rural emergency scenarios
- Not a replacement for trained dispatchers โ intended as a decision support tool
License
Apache 2.0 (inherited from Qwen3-4B base model)
- Downloads last month
- 85
4-bit