Instructions to use hitheshkaranth/Skanda-0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sam2
How to use hitheshkaranth/Skanda-0 with sam2:
# Use SAM2 with images import torch from sam2.sam2_image_predictor import SAM2ImagePredictor predictor = SAM2ImagePredictor.from_pretrained("hitheshkaranth/Skanda-0") with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16): predictor.set_image(<your_image>) masks, _, _ = predictor.predict(<input_prompts>)# Use SAM2 with videos import torch from sam2.sam2_video_predictor import SAM2VideoPredictor predictor = SAM2VideoPredictor.from_pretrained("hitheshkaranth/Skanda-0") with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16): state = predictor.init_state(<your_video>) # add new prompts and instantly get the output on the same frame frame_idx, object_ids, masks = predictor.add_new_points(state, <your_prompts>) # propagate the prompts to get masklets throughout the video for frame_idx, object_ids, masks in predictor.propagate_in_video(state): ... - Notebooks
- Google Colab
- Kaggle
Skanda-0
Reads chest X-ray, CT and MRI, writes the report, and outlines the findings it reports
Results · By disease · Limitations · Files · Memory · int8 / int4 · Licence
Research use only. Skanda drafts findings for a radiologist to review. It is not a medical device and has not been cleared or approved for clinical use by any regulator.
✨ At a glance
72%CT finding named rightMedGemma 27B: 49% |
89%MRI finding named rightMedGemma 27B: 42% |
91% · 94%lesion-free CT · MRI clearedMedGemma 27B: 6% · 2% |
4× · 22× · 12×box precision vs MedGemma 27BX-ray · CT · MRI |
🏁 Results
All numbers are percentages on held-out test cases. No test patient was seen in training.
| 🩻 Chest X-ray · 111 films | ||||
|---|---|---|---|---|
| Metric | MedGemma 27B | MedGemma + MAIRA-2 | Skanda run 2† | Skanda-0 |
| Abnormal flagged | 90 | 91 | 85 | 84 |
| Normals called normal | 72 | 72 | 83 | 69 |
| Right finding type | 41 | 47 | 37 | 40.5 |
| Box precision | 6 | – | 28 | 25.5 |
| Box recall | 4 | – | 15.5 | 10 |
| 🫁 CT · 340 cases | ||||
| Abnormal flagged | 97 | – | 80 | 82 |
| Normals called normal | 6 | – | 88 | 91 |
| Right finding type | 49 | – | 69 | 72 |
| Box precision | 1 | – | 20 | 22 |
| Box recall | 3 | – | 14 | 16 |
| 🧠 MRI · 240 cases | ||||
| Abnormal flagged | 99 | – | 89 | 89 |
| Normals called normal | 2 | – | 97 | 94 |
| Right finding type | 42 | – | 87 | 89 |
| Box precision | 6 | – | 64 | 70 |
| Box recall | 8 | – | 59 | 65 |
Percent, higher is better; bold = best per row. MAIRA-2 reads chest X-rays only, so it has no CT or MRI numbers. † An earlier development checkpoint, shown for comparison; it is not published. Skanda-0 is the run-3 checkpoint.
💡 What the numbers say
- 🫁🧠 On CT and MRI, Skanda is well ahead of MedGemma.
- It names the right finding 72% / 89% of the time, against 49% / 42% for MedGemma 27B.
- It clears 91% / 94% of lesion-free cases, where MedGemma clears 6% / 2%: it calls nearly every case abnormal.
- 🩻 On chest X-ray, Skanda-0 is a trade-off against the earlier run 2.
- Finding type rose from 37% to 40.5%, but it clears fewer normals than run 2 (69% vs 83%) and finds fewer boxes (recall 10% vs 15.5%).
- Each X-ray number moves about ±10 points by chance across 111 films. On the 106 dev films the same checkpoint cleared 74% of normals at 15.5% recall.
- 🎯 Skanda outlines; the baselines write coordinates. MedGemma and MAIRA-2 give boxes only as text. Skanda's box precision is 4× MedGemma's on X-ray, 22× on CT and 12× on MRI.
- 🩻 On X-ray boxes, MAIRA-2 alone is ahead. Read on the same 111 films in a later benchmark, MAIRA-2 reached box precision 30% and recall 13%, against Skanda's 24.5% and 9.5% (see the quantized builds below). MAIRA-2 is licensed for research use only.
📏 How it is measured
| Metric | Meaning |
|---|---|
| Abnormal flagged | abnormal cases the model calls abnormal |
| Normals called normal | normal or lesion-free cases the model clears |
| Right finding type | abnormal cases where the model names a ground-truth finding class |
| Box precision / recall | X-ray: a predicted box counts when its centre lies inside a radiologist box of the same class. CT/MRI: box IoU ≥ 0.3 with a radiologist outline, matched one-to-one |
- Chest X-ray: ChestX-Det test films, scored by the Skanda Radiology app's own benchmark. The same runner is used for every model. Skanda's numbers are the mean of two passes.
- CT and MRI: a fixed sample of held-out slices and volumes, with and without lesions. One script scores every model.
- Two reads of the same cases. The table above is from 1 November 2026. The quantized-build table below and the int8 / int4 cards use a later re-read (8 November), with every baseline served at bf16, 8-bit and 4-bit through the same stack. On X-ray the two reads differ by a few points (MedGemma 27B finding type 41% here, 36% there), within the ±10-point chance range of 111 films; CT and MRI reads of Skanda were identical.
🦠 Detection by disease
How often each model names each kind of finding, on the same held-out cases as the table above.
| Skanda leads | MedGemma leads | |
|---|---|---|
| 🩻 X-ray | consolidation 78% vs 69% · effusion 64% vs 30% (53% fused) · cardiomegaly 75% vs 25% · diffuse nodule 50% vs 0% | pneumothorax 100% vs 15% · atelectasis · nodule · mass · fibrosis · emphysema |
| 🫁 CT | lung 92% vs 76% · liver 74% vs 57% · pancreas 46% vs 0% · mediastinum 69% vs 38% | colon 20% vs 13% |
| 🧠 MRI | brain tumour 96% vs 74% · acute stroke 47 of 60 found vs 0 | – |
Groups under about 15 cases (kidney, mediastinum, colon, most rare X-ray labels) are directional only.
🔍 Side by side
⚠️ Limitations
- Rare X-ray findings are weak. Skanda named pneumothorax on 15% of the films that have it (MedGemma 27B: 100%), and trails MedGemma on atelectasis, nodule, mass, fibrosis and emphysema. Do not use it for triage.
- It misses findings. The report often names fewer findings than a film has, and X-ray box recall is about 10%.
- CT outlines can follow enhanced vessels instead of the lesion, and CT box recall is 16%.
- Small, internal test sets. 111 X-ray films (about ±10 points by chance) and held-out cases from the training sources. There has been no external test set, no reader study and no radiologist review of its reports.
- Template reports. Evidence sentences come from measured masks and fixed templates; severity is a per-class constant.
📦 Files and loading
| File | What it is |
|---|---|
vlm/ |
Merged Qwen3-VL-30B-A3B (bf16 safetensors, 17 shards, LoRA merged) with tokenizer, processor and chat template |
skanda_heads.pt |
SAM 2.1 (image encoder and trained mask decoder), the [SEG] projector and the score head |
skanda_config.json |
[SEG] token id 151669, training arguments, calibrated gate thresholds per modality, hint thresholds |
hint_scores.jsonl |
Score-head outputs the hint thresholds were chosen on (validation and dev only, never test) |
62.6 GB in total (58.3 GiB); see memory and quantization. The inference code is not public
yet: it lives in the private GitHub repo Hitheshkaranth/skanda-grounding.
huggingface-cli download hitheshkaranth/Skanda-0 --local-dir skanda-0 # bf16
huggingface-cli download hitheshkaranth/Skanda-0-int8 --local-dir skanda-0-int8 # int8 build of main
huggingface-cli download hitheshkaranth/Skanda-0-int4 --local-dir skanda-0-int4 # int4 build of main
# in a checkout of skanda-grounding
from PIL import Image
from skanda.serve import Skanda
sk = Skanda("skanda-0") # vlm/ + skanda_heads.pt + skanda_config.json; int8/int4 load the same way
report, raw_text, finished, n_tokens = sk.read(Image.open("chest.png").convert("RGB"))
python -m skanda.serve --model skanda-0 --port 1234 # the HTTP server the Skanda Radiology app calls
💾 Memory and quantization
Memory (bf16, measured)
| Size | Notes | |
|---|---|---|
| Download / disk | 62.6 GB | 58.3 GiB: vlm/ 57.9 GiB + skanda_heads.pt 0.43 GiB |
| Inference, steady | ~68 GB | chest X-ray, CT/MRI slices and 32-slice volumes alike; one read at a time |
| Inference, peak | ~93 GB | while loading the checkpoint and on the largest volumes |
Measured on an NVIDIA DGX Spark (GB10, 128 GB unified memory) from node memory during run 3's test evaluation and app benchmark, minus the idle baseline. The server runs in a container capped at 112 GB.
| Hardware | Fits? |
|---|---|
| DGX Spark / GB10, 128 GB unified | ✅ tested: everything here was trained and benchmarked on one |
| 1 × 80 GB GPU (A100 / H100 80 GB) | ⚠️ expected to fit: 62 GB of weights + activations; not tested |
2 × 48 GB GPUs (device_map="auto") |
⚠️ expected to fit; not tested |
| 24–48 GB GPUs | ❌ not at bf16; needs a quantized build (below) |
Quantized builds
Weight-only builds of this checkpoint, with gates re-calibrated per build. Only the language model is
quantized; the SAM 2.1 decoder, [SEG] projector and score head stay bf16. Each build's card has the full benchmark
against MedGemma 27B, MAIRA-2 and MedGemma + MAIRA-2 at the matching precision.
| bf16 (this repo) | int8 | int4 | |
|---|---|---|---|
| Download | 62.6 GB | 32.8 GB | 18.2 GB |
| Method | – | int8 per-row | int4 group-128 |
| 🩻 X-ray right finding type | 39 | 40.5 | 36 |
| 🩻 X-ray box precision | 24.5 | 24 | 17.5 |
| 🩻 X-ray box recall | 9.5 | 8.5 | 8.5 |
| 🫁 CT normals called normal | 91 | 85 | 78 |
| 🫁 CT right finding type | 72 | 72 | 74 |
| 🫁 CT box precision | 22 | 21 | 19 |
| 🧠 MRI right finding type | 89 | 87 | 80 |
| 🧠 MRI box recall | 65 | 67 | 49 |
| Loss per token on bf16's own replies | 0.0823 | 0.0824 | 0.1181 |
Percent on the held-out test cases above (bf16 re-read with the same code and calibration as the builds). int8 is effectively lossless and is the recommended smaller build; int4 loses accuracy, most on MRI box recall.
📜 Licence
CC BY-NC 4.0 (Creative Commons Attribution-NonCommercial 4.0):
free for research and other non-commercial use, with attribution. Commercial use requires written permission from
the author: open a request in this repository's Discussions.
The licence text is in LICENSE; upstream licences and data attributions (Qwen3-VL, Sa2VA, SAM 2 and the
training datasets) are in NOTICE. Research use only; not a medical device.
- Downloads last month
- 39