Redflag Detection V4.0 (V20 Red Flad_New spec)

Medical red-flag symptom extraction model fine-tuned from Qwen2.5-7B-Instruct. Aligned with 2026-08 Medical Advisory "Red Flad_New" specification: 59 rules, strict IF+AND semantics.

Extraction Schema

  • 96 atomic symptoms (V17 base 78 + 18 new: coughing_blood, collapse, pale_cold_clammy_skin, mottled_skin, very_drowsy, reduced_responsiveness, no_urine, sunken_eyes, dry_mouth, high_pitched_cry, blue_grey_color, difficulty_swallowing, abnormal_behavior, deep_rapid_breathing, palpitations, eye_injury, neck_swelling, severe_weakness)
  • New severity modifiers: has_severe_complication, is_life_threatening, is_recurring, severity_level
  • New context flags: smoke_inhalation, chemical_exposure, venomous_bite, electrical_injury, cold_exposure, drowning, serious_assault
  • Population gates: is_pregnant, is_postpartum, is_elderly, is_child, is_baby, is_immunocompromised, has_diabetes, has_asthma, age_band

Performance (val 269, strict)

  • Exact Match: 89.2%
  • Precision: 0.918
  • Recall: 0.749
  • F1: 0.825

Performance (val 269, clinical-fair, SUSPECTED counted for recall)

  • Precision: 0.787
  • Recall: 0.851
  • F1: 0.818

Usage with vLLM

python3 -m vllm.entrypoints.openai.api_server \
    --model ningpy/redflag-detection-V4.0 \
    --served-model-name redflag \
    --dtype float16

Requires the V20 rule engine (data-driven, 59 compiled rules). Extraction output JSON is fed to engine.evaluate_rules() to produce matched_flags / suspected_flags.

Training

  • 3766 samples (V17 base 3505 + patch20 68 + patch20c 193)
  • LoRA r=32 alpha=64, 7 target projections
  • 3 epochs @ 2e-5, seq len 1900
  • 8×V100 DDP
Downloads last month
-
Safetensors
Model size
8B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ningpy/redflag-detection-V4.0

Base model

Qwen/Qwen2.5-7B
Finetuned
(3031)
this model