Downloads · 30 days
13
18% of all-time downloads
a7m1st/medigent-one-gemma4-crc-lora
medigent-one-gemma4-crc-lora is a image-text-to-text model from a7m1st. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as gemma.
LoRA adapter for unsloth/gemma-4-E4B-it, fine-tuned for 9-class colorectal cancer tissue classification from H&E-stained histology patches.
Downloads · 30 days
13
18% of all-time downloads
All-time downloads
73
Public
Repo size
513 MB
Likes
1
Public
Click a slice to open those files.
.pt316 MB · 62%
From the Hugging Face model README
LoRA adapter for unsloth/gemma-4-E4B-it, fine-tuned for 9-class colorectal cancer tissue classification from H&E-stained histology patches.
This adapter is the fine-tuning proof point referenced in our Medigent One Gemma 4 Good Hackathon submission. The full Medigent One stack (a six-agent medical reasoning panel built on Gemma 4 31B) ships separately at https://github.com/a7m-1st/medigent-one. The adapter itself is not deployed in the production Medigent One stack — it is published here as a reproducible demonstration that Gemma 4 E4B can be specialized for medical vision when needed.
9-class tissue classification from H&E-stained colorectal cancer patches:
ADI | BACK | DEB | LYM | MUC | MUS | NORM | STR | TUM
| Base model | unsloth/gemma-4-E4B-it |
| Method | LoRA via Unsloth (r=16, alpha=16, target_modules=all-linear) |
| Trainable params | 41,222,144 (0.51% of 8.04B) |
| Dataset | NCT-CRC-HE-100K (9,000 training samples, seed=42) |
| Steps | 300 (~0.27 epochs, effective batch 8) |
| Optimizer | adamw_torch_fused, LR 2e-4, cosine schedule, warmup 0.03 |
| Hardware | NVIDIA RTX PRO 6000 Blackwell (94 GB) |
| Precision | bfloat16 |
Evaluated on 500 samples from each dataset, seed=42:
| Dataset | Pretrained acc | Fine-tuned acc | F1 (weighted) | Δ |
|---|---|---|---|---|
| Dataset A — NCT-CRC-HE-100K (in-distribution) | 29.0% | 90.6% | 0.91 | +61.6 pp |
| Dataset B — CRC-VAL-HE-7K (held-out) | 22.4% | 76.0% | 0.72 | +53.6 pp |
Zero malformed outputs across 1000 evaluations. Random chance on this 9-class task is 11.1%.
The sweet spot is narrow: longer training (3 epochs) collapses the model into a single dominant class. The 300-step recipe at effective batch 8 with LR 2e-4 lands inside that window.
from unsloth import FastModel
model, processor = FastModel.from_pretrained(
"a7m1st/medigent-one-gemma4-crc-lora",
load_in_4bit=False,
max_seq_length=2048,
full_finetuning=False,
)
The full prompt used at both training and evaluation:
What type of tissue is shown in this histological image?
Choose from: ADI, BACK, DEB, LYM, MUC, MUS, NORM, STR, TUM.
@misc{medigent_one_2026,
title = {Medigent One},
author = {Ahmed Awelkair and zl.fang and Nerissa Ibrahim and Bimo Kuncoro},
year = {2026},
url = {https://www.kaggle.com/competitions/gemma-4-good-hackathon/writeups/medigent-one-one-model-one-panel-of-specialists}
}
1aurent/NCT-CRC-HE dataset (originally from Kather et al.)Gemma is a trademark of Google LLC.