Spaces:
Paused
Paused
Disable NV-Reason-CXR to prioritize VQA tool on L4 GPU
Browse files- Commented out NV-Reason-CXR (~7GB VRAM)
- MAIRA-2 Grounding uses ~15GB, leaving ~7GB for other tools
- Prioritizing CheXagent VQA for interactive Q&A capabilities
- With L4 (24GB), can run: Grounding + VQA + Classification + Report Gen
VRAM allocation with this config:
- MAIRA-2: ~15GB
- VQA: ~2GB
- Others: ~1GB
- Free: ~6GB
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
app.py
CHANGED
|
@@ -35,17 +35,19 @@ tools = []
|
|
| 35 |
if device == "cuda":
|
| 36 |
# Load GPU-based tools
|
| 37 |
|
| 38 |
-
# NV-Reason-CXR -
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
| 49 |
|
| 50 |
try:
|
| 51 |
from medrax.tools import XRayPhraseGroundingTool
|
|
|
|
| 35 |
if device == "cuda":
|
| 36 |
# Load GPU-based tools
|
| 37 |
|
| 38 |
+
# NV-Reason-CXR - Temporarily disabled (uses ~7GB VRAM)
|
| 39 |
+
# Taking up too much memory alongside MAIRA-2 (15GB), leaving no room for VQA
|
| 40 |
+
# Priority: VQA is more useful for interactive Q&A
|
| 41 |
+
# try:
|
| 42 |
+
# from medrax.tools import NVReasonCXRTool
|
| 43 |
+
# nv_reason_tool = NVReasonCXRTool(
|
| 44 |
+
# device=device,
|
| 45 |
+
# load_in_4bit=True # Use quantization to save VRAM
|
| 46 |
+
# )
|
| 47 |
+
# tools.append(nv_reason_tool)
|
| 48 |
+
# print("✓ Loaded NV-Reason-CXR tool")
|
| 49 |
+
# except Exception as e:
|
| 50 |
+
# print(f"✗ Failed to load NV-Reason-CXR tool: {e}")
|
| 51 |
|
| 52 |
try:
|
| 53 |
from medrax.tools import XRayPhraseGroundingTool
|