This repository contains quantized versions of NV-Reason-CXR-3B, a 3B parameter vision-language model specialized in chest X-ray analysis. The model has been converted to GGUF format and quantized for efficient deployment on edge devices (mobile, desktop, embedded systems).
Original Model:nvidia/NV-Reason-CXR-3BBase Architecture: Qwen2.5-VL 3B Instruct
Conversion: llama.cpp
Quantization: llama-cpp-python
Available Models
Filename
Format
Size
Use Case
Quality
Speed
nv-reason-cxr-3b-fp16.gguf
FP16
6.3 GB
Desktop with GPU (quality reference)
100%
Baseline
nv-reason-cxr-3b-Q4_K_M.gguf
Q4_K_M
1.96 GB
Recommended for edge devices
90-95%
Fast
mmproj-nv-reason-cxr-3b-f16.gguf
FP16 mmproj
1.25 GB
Vision encoder (required for image analysis)
100%
-
Model Details
Q4_K_M (Recommended):
Size: 1.96 GB (69% reduction from FP16)
Compression: 3.23x from original
Quality: 90-95% retention
Speed: 8-20 tokens/sec on mobile (device-dependent)
RAM Required: 3-4 GB
Best for: Mid-range to high-end mobile devices
FP16 (Reference):
Size: 6.3 GB
Quality: Original precision
Speed: Slower than quantized
RAM Required: 8+ GB
Best for: Desktop inference, quality comparison
Performance Benchmarks
Desktop (Apple M3 Mac)
Q4_K_M Performance:
Configuration
Load Time
Inference Speed
Memory Usage
CPU-only
1.87s
29.61 tok/s
~2 GB RAM
M3 GPU (Metal)
0.34s
33.24 tok/s
~2 GB RAM
Speedup
5.46x faster ⚡
1.12x faster
Same
Key Insights:
🚀 GPU provides 5.46x faster model loading - Huge benefit for app cold starts!
1from llama_cpp import Llama
23# Option 1: CPU-only (works great, 29.61 tok/s on M3)4llm = Llama(5 model_path="nv-reason-cxr-3b-Q4_K_M.gguf",6 n_ctx=4096,7 n_threads=4,8 n_gpu_layers=0,# CPU-only9)1011# Option 2: GPU acceleration (5.46x faster loading!)12llm = Llama(13 model_path="nv-reason-cxr-3b-Q4_K_M.gguf",14 n_ctx=4096,15 n_threads=4,16 n_gpu_layers=-1,# Use GPU (Metal on Mac, CUDA on Linux/Windows)17)1819# Analyze X-ray20response = llm(21"Analyze this chest X-ray image and identify key findings.",22 max_tokens=512,23 temperature=0.3,# Lower for medical = more deterministic24 top_p=0.9,25)2627print(response['choices'][0]['text'])
With Cactus Compute (Flutter/Mobile)
Note: You need BOTH the model file AND the mmproj file for image analysis.
dart
1import'package:cactus/cactus.dart';23// Initialize VLM with both model and mmproj files4final vlm =CactusVLM();5await vlm.init(6 modelFilename:'nv-reason-cxr-3b-Q4_K_M.gguf',// Model file7 mmprojFilename:'mmproj-nv-reason-cxr-3b-f16.gguf',// Vision encoder8 contextSize:2048,// Context window (2K-4K for mobile)9 threads:4,// CPU threads10 gpuLayers:0,// CPU-only (GPU may cause issues on some devices)11);1213// Create prompt14final messages =[15ChatMessage(16 role:'system',17 content:'You are a helpful radiologist assistant.',18),19ChatMessage(20 role:'user',21 content:'Describe what you see in this chest X-ray image.',22),23];2425// Analyze X-ray26final response =await vlm.completion(27 messages,28 imagePaths:['path/to/xray.jpg'],29 maxTokens:150,30 temperature:0.1,// Lower for medical analysis (0.1-0.5)31);3233print(response.text);
Mobile GPU Benefits:
🚀 5.46x faster model loading (critical for app startup)
📱 Better user experience on iOS (Metal) and Android (Vulkan/OpenCL)
🔋 Minimal battery impact during loading phase
✅ Falls back gracefully to CPU if GPU unavailable
Inference Parameters
Recommended settings for medical analysis:
python
1{2"temperature":0.3,# Lower = more deterministic (range: 0.1-0.5)3"top_p":0.9,# Nucleus sampling4"top_k":40,# Top-k sampling5"repeat_penalty":1.1,# Avoid repetition6"max_tokens":512,# Response length7"n_ctx":4096,# Context window (2048-4096 for mobile)8}
llama.cpp contributors for the GGUF format and conversion tools
Cactus Compute for mobile VLM deployment framework
License
This model inherits the NSCLV1 license from the original NV-Reason-CXR-3B model. See LICENSE for details.
Key points:
Research and educational use permitted
Commercial use may require additional permissions
Not for clinical/diagnostic use
See original model card for complete license terms
Disclaimer
⚠️ IMPORTANT MEDICAL DISCLAIMER
This model is provided for RESEARCH AND EDUCATIONAL PURPOSES ONLY. It is:
NOT intended for clinical diagnosis or treatment
NOT FDA approved or clinically validated
NOT a substitute for professional medical advice
NOT validated for production medical use
Always consult qualified healthcare professionals for medical decisions. The creators and distributors of this model assume no liability for any use of this software.
Contact & Support
Issues: Report issues on GitHub (link to your repo)