--- language: - en license: apache-2.0 library_name: peft base_model: Qwen/Qwen3.8-27B tags: - radiology - medical - healthcare - clinical-nlp - qwen - impression-generation - lora - 4bit pipeline_tag: text-generation widget: - text: '[EXAM: CT CHEST] FINDINGS: Large saddle pulmonary embolus with right ventricular dilation (RV/LV ratio 1.4).' example_title: CT Pulmonary Embolism - text: '[EXAM: MRI BRAIN] FINDINGS: Restricted diffusion in left MCA territory with abrupt flow truncation at M1 bifurcation.' example_title: Brain MRI Stroke --- # 🩻 Qwen 3.8-27B Clinical Radiology Impression & Consultation AI
[![Hugging Face Space Demo](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Live%20Demo%20Space-blue?style=for-the-badge)](https://huggingface.co/spaces/Medico/Qwen3.8-27B-Radiology-Impression-Demo) [![Model Size](https://img.shields.io/badge/Parameters-27B%20Dense-purple?style=for-the-badge)](#) [![Dataset](https://img.shields.io/badge/Dataset-659K%20Clinical%20Reports-green?style=for-the-badge)](https://huggingface.co/datasets/Medico/radiology-reports-curated) [![License](https://img.shields.io/badge/License-Apache%202.0-yellow?style=for-the-badge)](#)
--- ## 🌟 Overview & Key Links **`Medico/Qwen3.8-27B-Radiology-Impression`** is a dense 27-Billion parameter clinical foundation model fine-tuned on **659,381 real-world clinical findings-to-impression pairs** across diverse imaging modalities (CT, MRI, Chest Radiography, Ultrasound, and PET/CT). * 🌐 **Live Interactive Web Demo**: [**Hugging Face Space Demo**](https://huggingface.co/spaces/Medico/Qwen3.8-27B-Radiology-Impression-Demo) * 📊 **Curated Training Corpus**: [**Medico/radiology-reports-curated**](https://huggingface.co/datasets/Medico/radiology-reports-curated) * ⚡ **Base Architecture**: `Qwen/Qwen3.8-27B` (Dense 27B model, `qwen3_5` architecture) --- ## 🚀 Free Unlimited Chat & Deployment Options You can chat with this model with **unlimited access for free** using any of the following methods: ### Option 1: Live Web App (Instant Free Access) Open the official Hugging Face Space: 👉 [**https://huggingface.co/spaces/Medico/Qwen3.8-27B-Radiology-Impression-Demo**](https://huggingface.co/spaces/Medico/Qwen3.8-27B-Radiology-Impression-Demo) ### Option 2: Free 1-Line Local Chat (Ollama) Run directly on your local machine with GPU/CPU: ```bash ollama run hf.co/Medico/Qwen3.8-27B-Radiology-Impression ``` ### Option 3: Free Cloud GPU Inference (Google Colab / Kaggle / Lightning AI) Run this Python snippet on any free GPU environment (Tesla T4, L4, A10G): ```python import torch from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig from peft import PeftModel BASE_MODEL = "Qwen/Qwen3.8-27B" LORA_REPO = "Medico/Qwen3.8-27B-Radiology-Impression" bnb_config = BitsAndBytesConfig( load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.float16, bnb_4bit_use_double_quant=True ) tokenizer = AutoTokenizer.from_pretrained(LORA_REPO, trust_remote_code=True) base_model = AutoModelForCausalLM.from_pretrained( BASE_MODEL, quantization_config=bnb_config, device_map="auto", trust_remote_code=True ) model = PeftModel.from_pretrained(base_model, LORA_REPO) # Clinical Prompting findings = """ CTA CHEST: Large saddle pulmonary embolus straddling the bifurcation with RV/LV ratio of 1.4 and interventricular flattening. """ messages = [ {"role": "system", "content": "You are an expert diagnostic radiologist. Generate a structured clinical IMPRESSION."}, {"role": "user", "content": f"FINDINGS:\n{findings}"} ] prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) inputs = tokenizer(prompt, return_tensors="pt").to("cuda") with torch.no_grad(): outputs = model.generate(**inputs, max_new_tokens=300, temperature=0.2) print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)) ``` --- ## 🎯 Clinical Benchmark Capabilities 1. **Findings-to-Impression Synthesis**: Condenses verbose imaging observations into clear, prioritized clinical impressions. 2. **Critical Findings & Urgent Alerts**: Highlights acute conditions (pulmonary embolism, large vessel occlusion, aortic dissection, tension pneumothorax, appendicitis). 3. **Structured Staging & Reporting**: Aligned with ACR Fleischner Society criteria, BI-RADS, LI-RADS, and PI-RADS reporting frameworks. --- ## 🔒 Clinical Disclaimer *This model is released for research, clinical decision support benchmarking, and medical NLP exploration. It should not replace independent radiological interpretation by certified medical professionals.*