ningpy/redflag-detection-V4.1

TEXT GENERATIONPricing:Input $0.4 / Cached $0.08 / Output $0.8Concurrent Unit Cost:1Model Size:7.6BQuant:FP8Context Size:32kTool Calling:SupportedPublished:Aug 28, 2026License:apache-2.0Architecture:Transformer Open Weights Featherless Exclusive Cold

ningpy/redflag-detection-V4.1 is a 7.6 billion parameter instruction-tuned Qwen2.5 model developed by ningpy, fine-tuned for medical red-flag extraction. It is specifically aligned with the 2026-08 "Red Flag_New" specification, incorporating 65 rules including critical updates for surgical and OB emergencies. This model excels at identifying medical red flags from patient information, offering improved recall compared to previous versions.

Loading preview...

Overview

ningpy/redflag-detection-V4.1 is a 7.6 billion parameter model, fine-tuned from Qwen2.5-7B-Instruct, specifically designed for medical red-flag extraction. It is aligned with the 2026-08 "Red Flag_New" specification, incorporating 65 rules, including 6 new critical rules for surgical and OB emergencies.

Key Capabilities & Improvements

  • Enhanced Red-Flag Detection: Includes new rules for conditions like testicular torsion, pyelonephritis, severe PID, eye emergencies, cauda equina, and postpartum hemorrhage.
  • Improved Robustness: Addresses and fixes is_male hallucination issues present in previous versions.
  • Defensive Gates: Implements defensive sex gates for pregnancy-related rules and pediatric age fallback for is_child/is_baby when age_band is absent.
  • Multilingual Sex Extraction: Enhanced training with 50 new samples for sex extraction from patient information blocks in English, Chinese, and Bahasa Malaysia.

Performance

On a strict 269-case validation set, V4.1 achieves an F1 score of 0.839 and a recall of 0.786, showing an improvement in recall over V4.0. In a clinical-fair evaluation (where 'SUSPECTED' is counted as True Positive for recall), it achieves a recall of 0.853 and an F1 score of 0.800.

Training Details

The model was trained on 3816 samples using LoRA (r=32, alpha=64) across 7 target projections for 3 epochs at a learning rate of 2e-5, with a sequence length of 1900.