Instructions to use suitch/scan2report-decoder-dpo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use suitch/scan2report-decoder-dpo with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-4B") model = PeftModel.from_pretrained(base_model, "suitch/scan2report-decoder-dpo") - Notebooks
- Google Colab
- Kaggle
Point to thesis repository
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ tags:
|
|
| 14 |
|
| 15 |
# DPO-tuned report decoder
|
| 16 |
|
| 17 |
-
Part of the master's thesis *From Scan to Report: Detecting, Segmenting and Reporting Findings in Chest CT* (code: https://github.com/Switchharsh/
|
| 18 |
|
| 19 |
The baseline decoder (`scan2report-decoder-baseline`) further tuned with DPO on 1,899 preference pairs (beta 0.1, lr 2e-5, 2 epochs).
|
| 20 |
|
|
@@ -29,7 +29,7 @@ Three-seed mean (each DPO trained from its own baseline): CRG 0.3965 +- 0.0139,
|
|
| 29 |
- Input: the 8x8x8 FlexiCT token grid of a chest CT (`flexict/tokens8`, 864-dim per token) from CT-RATE.
|
| 30 |
- `projector.pt`: MLP (864 -> 2560 -> 2560, LayerNorm) that maps the visual tokens into the LLM embedding space.
|
| 31 |
- `adapter_model.safetensors` + `adapter_config.json`: LoRA (r=16, alpha=32) on [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B).
|
| 32 |
-
- Loading and generation code (model wrapper, data, evaluation): https://github.com/Switchharsh/
|
| 33 |
- Task instruction used in every run: `Write the findings and impression for this chest CT.` Greedy decoding, at most 512 new tokens.
|
| 34 |
|
| 35 |
## Evaluation protocol
|
|
|
|
| 14 |
|
| 15 |
# DPO-tuned report decoder
|
| 16 |
|
| 17 |
+
Part of the master's thesis *From Scan to Report: Detecting, Segmenting and Reporting Findings in Chest CT* (code: https://github.com/Switchharsh/Switchharsh-From_Scan_to_Report_Master_Thesis; thesis: https://github.com/Switchharsh/Switchharsh-From_Scan_to_Report_Master_Thesis/tree/main/thesis).
|
| 18 |
|
| 19 |
The baseline decoder (`scan2report-decoder-baseline`) further tuned with DPO on 1,899 preference pairs (beta 0.1, lr 2e-5, 2 epochs).
|
| 20 |
|
|
|
|
| 29 |
- Input: the 8x8x8 FlexiCT token grid of a chest CT (`flexict/tokens8`, 864-dim per token) from CT-RATE.
|
| 30 |
- `projector.pt`: MLP (864 -> 2560 -> 2560, LayerNorm) that maps the visual tokens into the LLM embedding space.
|
| 31 |
- `adapter_model.safetensors` + `adapter_config.json`: LoRA (r=16, alpha=32) on [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B).
|
| 32 |
+
- Loading and generation code (model wrapper, data, evaluation): https://github.com/Switchharsh/Switchharsh-From_Scan_to_Report_Master_Thesis (`ctbench/rgen/model.py`, `evaluate.py`). The adapter is not a stand-alone chat model: the projector and the FlexiCT tokens are required.
|
| 33 |
- Task instruction used in every run: `Write the findings and impression for this chest CT.` Greedy decoding, at most 512 new tokens.
|
| 34 |
|
| 35 |
## Evaluation protocol
|