samwell Claude commited on
Commit
2ae6f9b
·
1 Parent(s): 78ca1de

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>

Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -35,17 +35,19 @@ tools = []
35
  if device == "cuda":
36
  # Load GPU-based tools
37
 
38
- # NV-Reason-CXR - Re-enabled for L4 GPU (24GB VRAM)
39
- try:
40
- from medrax.tools import NVReasonCXRTool
41
- nv_reason_tool = NVReasonCXRTool(
42
- device=device,
43
- load_in_4bit=True # Use quantization to save VRAM
44
- )
45
- tools.append(nv_reason_tool)
46
- print("✓ Loaded NV-Reason-CXR tool")
47
- except Exception as e:
48
- print(f"✗ Failed to load NV-Reason-CXR tool: {e}")
 
 
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