antonyamal071/crisisgraph-qwen3-4b-triage-lora-v3
CrisisGraph Qwen3-4B Triage LoRA V3
This repository contains an experimental PEFT LoRA adapter, not a standalone language model. It adapts `Qwen/Qwen3-4B-Instruct-2507` for structured extraction of candidate emergency-triage facts from English, Malayalam, and Manglish reports.
The adapter was developed for the `CrisisGraph` research and portfolio prototype. CrisisGraph uses the model only to propose typed incident facts. Deterministic Rust graph logic retains responsibility for resource allocation, path calculation, and route-safety verification.
Safety warning: This artifact is not a production emergency-dispatch model. It must not independently allocate resources, close roads, calculate routes, certify safety, or issue operational instructions.
Artifact contents
adapter_model.safetensors— PEFT LoRA weights.adapter_config.json— LoRA configuration and pinned base revision.tokenizer.json,tokenizer_config.json,chat_template.jinja— tokenizer artifacts saved with the training run.prompt/triage-extraction-v2.1.1.txt— evaluated system prompt.schema/triage-extraction-v2.json— strict structured-output contract.gguf/crisisgraph-qwen3-4b-triage-lora-v3-f16.gguf— F16 LoRA adapter for llama.cpp; it still requires a compatible Qwen3-4B-Instruct-2507 base GGUF.release-manifest.jsonandSHA256SUMS— provenance and integrity data.
Base model
The base model is not redistributed in this repository.
Intended use
The adapter is intended for controlled experimentation with extraction of:
- victim or pickup location;
- headcount;
- explicitly requested response asset;
- named road hazards and reported duration;
- uncertainty and the need for human review.
The evaluated output is governed by the included prompt and JSON schema. Using a different prompt, schema, decoding configuration, base revision, or adapter scale is a different system configuration and is not covered by the reported results.
Training
The adapter was trained with QLoRA on a Tesla T4 for two epochs.
The synthetic data covers clear, missing, contradictory, hazard, adversarial, irrelevant, Malayalam, and Manglish cases. Records received an AI-assisted first-pass semantic review. An independent second review was not completed, so the data and adapter must not be described as independently reviewed.
Teacher-forced validation loss was 0.01027 and teacher-forced token accuracy was 0.99685. Those training metrics are not extraction accuracy and do not establish real-world generalization.
Frozen regression evaluation
The adapter was evaluated on the existing 120-case CrisisGraph regression suite using prompt triage-extraction-v2.1.1, strict JSON-schema decoding, temperature zero, and a Q4KM GGUF of the pinned base model through llama.cpp.
This suite was used repeatedly during development and is not a blind holdout. The adapter failed the predeclared clear-case exact-match gate with 18/20 rather than the required 20/20. It produced eight review false negatives and three review false positives. V3 is therefore the leading experimental CrisisGraph adapter, not an unconditionally promoted model.
Loading with Transformers and PEFT
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_id = "Qwen/Qwen3-4B-Instruct-2507"
base_revision = "cdbee75f17c01a7cc42f958dc650907174af0554"
adapter_id = "antonyamal071/crisisgraph-qwen3-4b-triage-lora-v3"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
base = AutoModelForCausalLM.from_pretrained(
base_id,
revision=base_revision,
torch_dtype="auto",
device_map="auto",
)
model = PeftModel.from_pretrained(base, adapter_id)
model.eval()Use the included system prompt and JSON schema when reproducing the structured extraction configuration.
Loading with llama.cpp
The GGUF file in gguf/ is an adapter, not a complete GGUF model:
llama-server \
--model /path/to/Qwen3-4B-Instruct-2507-Q4_K_M.gguf \
--lora /path/to/crisisgraph-qwen3-4b-triage-lora-v3-f16.gguf \
--port 8000Use a compatible GGUF conversion of the same base model. Reproduction details for the measured CPU run are available in the CrisisGraph repository.
Limitations
- Training and validation data are synthetic and narrowly task-specific.
- The regression suite is exposed, not a blind generalization test.
- Real Kerala emergency-call or field-report distributions were not available.
- Malayalam and Manglish coverage is limited and cannot represent all dialects, spelling variation, code-switching, or operational language.
- The adapter may invent missing facts, choose one side of a contradiction, or over-escalate a complete report.
- Model confidence values are task-policy labels, not calibrated probabilities.
- Structured-output validity does not imply semantic correctness.
Any downstream system should validate the schema, apply deterministic missing and contradiction guards, preserve the raw report, record model provenance, and require human authority for uncertain facts and operational hazards.
License
This adapter is released under Apache 2.0, consistent with the base model's published license. Users must also review and comply with the base model's terms and all laws and policies applicable to their deployment.
