Run this model with HF Jobs

Run paulvision/medscript-dora-summariser on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/paulvision/medscript-dora-summariser. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/paulvision/medscript-dora-summariser on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/paulvision/medscript-dora-summariser. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/paulvision/medscript-dora-summariser. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
File size: 6,186 Bytes
5cbc813
48a500a
 
 
5cbc813
48a500a
 
 
 
 
 
 
 
 
 
5cbc813
 
48a500a
 
5cbc813
48a500a
 
5cbc813
48a500a
 
27da7c5
 
 
 
48a500a
 
 
27da7c5
48a500a
 
27da7c5
48a500a
27da7c5
48a500a
27da7c5
48a500a
 
 
 
27da7c5
48a500a
27da7c5
48a500a
 
 
 
395fbc7
48a500a
27da7c5
48a500a
27da7c5
 
 
 
 
 
 
 
48a500a
 
 
27da7c5
 
46a634c
27da7c5
48a500a
27da7c5
 
 
 
 
 
 
48a500a
27da7c5
 
 
 
 
 
 
 
 
 
48a500a
 
 
 
27da7c5
395fbc7
 
 
 
 
27da7c5
 
 
 
 
 
 
 
48a500a
 
 
 
 
 
27da7c5
 
 
 
 
 
 
48a500a
 
 
27da7c5
48a500a
 
 
27da7c5
48a500a
 
27da7c5
 
48a500a
27da7c5
 
 
 
 
 
48a500a
5cbc813
 
 
48a500a
5cbc813
48a500a
5cbc813
48a500a
 
395fbc7
 
 
 
 
5cbc813
48a500a
5cbc813
48a500a
 
 
 
 
 
 
5cbc813
48a500a
5cbc813
48a500a
 
 
 
 
 
27da7c5
 
48a500a
27da7c5
48a500a
 
 
27da7c5
 
5cbc813
48a500a
5cbc813
46a634c
 
395fbc7
 
 
 
 
48a500a
 
 
5cbc813
48a500a
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
---
library_name: peft
license: apache-2.0
base_model: Qwen/Qwen3-8B
tags:
- axolotl
- base_model:adapter:Qwen/Qwen3-8B
- lora
- transformers
datasets:
- paulvision/medscript-sft-summariser
pipeline_tag: text-generation
model-index:
- name: medscript-dora-summariser
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

[<img src="https://raw.githubusercontent.com/axolotl-ai-cloud/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/axolotl-ai-cloud/axolotl)
<details><summary>See axolotl config</summary>

axolotl version: `0.18.0`
```yaml
# MedScript AI — SFT Stage: summariser adapter
# DoRA + LoRA+ | Axolotl | A100 SXM 80GB
# torch_compile REMOVED — incompatible with DoRA (PEFT upstream bug)

base_model: Qwen/Qwen3-8B
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer

bf16: true
fp16: false

flash_attention: true

plugins:
  - axolotl.integrations.liger.LigerPlugin
liger_rms_norm: true
liger_rope: true
liger_glu_activation: true
liger_fused_linear_cross_entropy: true

chat_template: qwen3

adapter: lora
lora_r: 16
lora_alpha: 32
lora_dropout: 0.0
peft_use_dora: true
loraplus_lr_ratio: 16.0
loraplus_lr_embedding: 1.0e-6
lora_target_modules:
  - q_proj
  - k_proj
  - v_proj
  - o_proj
  - gate_proj
  - up_proj
  - down_proj

gradient_checkpointing: true
gradient_checkpointing_kwargs:
  use_reentrant: false

# top-level key: nested under a dataset entry it is silently ignored
train_on_inputs: false

datasets:
  - path: paulvision/medscript-sft-summariser
    split: train
    type: chat_template
    chat_template: qwen3
    field_messages: messages
    roles_to_train: [assistant]

test_datasets:
  - path: paulvision/medscript-sft-summariser
    split: validation
    type: chat_template
    chat_template: qwen3
    field_messages: messages
    # must match the train split's masking, otherwise eval_loss is computed over
    # prompt+response while train loss is response-only — and load_best_model_at_end
    # then selects checkpoints on a metric that is not the training objective.
    roles_to_train: [assistant]

sequence_len: 1024
sample_packing: true
pad_to_sequence_len: true
eval_sample_packing: false

# 1, not 3. Measured 2026-08-20 on the full dataset: eval_loss went 1.474 -> 0.3797
# (0.30 ep) -> 0.3698 (0.61) -> 0.3607 (0.91) -> 0.3606 (1.0). Flat to 4 decimal places
# by the end of epoch 1, so epochs 2-3 buy nothing but overfitting risk and GPU time.
# The pushed medscript-dora-summariser adapter is this 1-epoch run.
num_epochs: 1
# Measured on H100 80GB, 10 steps of sft_summariser, effective batch 32 throughout:
#   micro_batch 8  / accum 4 -> 27.7 GiB, ~4.3 s/step, eval_loss 0.4104
#   micro_batch 16 / accum 2 -> 39.4 GiB, ~3.9 s/step, eval_loss 0.4101
# ~10% faster for 42% more VRAM and identical loss. Not 2x: at 90%+ SM utilisation
# this is compute-bound, so a bigger batch mostly amortises per-step overhead.
micro_batch_size: 16
gradient_accumulation_steps: 2
learning_rate: 2.0e-4
lr_scheduler: cosine
warmup_ratio: 0.05
weight_decay: 0.01
max_grad_norm: 1.0
optimizer: adamw_torch_fused
seed: 42

# ~897 steps (3 ep) -> 9 eval points. At eval_steps 200 this track got no intermediate eval or checkpoint
# at all, so load_best_model_at_end had nothing to choose from and the run
# produced no eval curve — which is the one artifact the whole exercise is for.
# save_steps must stay equal to eval_steps for load_best_model_at_end.
eval_steps: 100
save_steps: 100
save_total_limit: 3
load_best_model_at_end: true
metric_for_best_model: eval_loss

logging_steps: 10
wandb_project: medscript-ai
wandb_name: sft-summariser

hub_model_id: paulvision/medscript-dora-summariser
hub_strategy: every_save
push_to_hub: true

output_dir: ./checkpoints/sft/summariser

# Tokenisation/packing is single-process by default: measured at 100% of ONE core on a
# 256-core box, 14 min for 17.5k rows and on track for ~an hour on discharge's 78k —
# all of it with the GPU sitting at 0%.
dataset_processes: 32

dataset_prepared_path: ./prepared/sft_summariser

```

</details><br>

# medscript-dora-summariser

This model is a fine-tuned version of [Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B) on the paulvision/medscript-sft-summariser dataset.
It achieves the following results on the evaluation set:
- Loss: 0.3609
- Ppl: 1.4346
- Memory/max Active (gib): 39.14
- Memory/max Allocated (gib): 39.14
- Memory/device Reserved (gib): 44.08

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 16
- training_steps: 328

### Training results

| Training Loss | Epoch  | Step | Validation Loss | Ppl    | Active (gib) | Allocated (gib) | Reserved (gib) |
|:-------------:|:------:|:----:|:---------------:|:------:|:------------:|:---------------:|:--------------:|
| No log        | 0      | 0    | 1.4780          | 4.3842 | 38.77        | 38.77           | 38.91          |
| 0.3958        | 0.3049 | 100  | 0.3807          | 1.4633 | 39.14        | 39.14           | 44.08          |
| 0.3673        | 0.6098 | 200  | 0.3702          | 1.4481 | 39.14        | 39.14           | 44.08          |
| 0.3550        | 0.9146 | 300  | 0.3611          | 1.4349 | 39.14        | 39.14           | 44.08          |
| 0.3560        | 1.0    | 328  | 0.3609          | 1.4346 | 39.14        | 39.14           | 44.08          |


### Framework versions

- PEFT 0.19.1
- Transformers 5.14.1
- Pytorch 2.12.1+cu126
- Datasets 4.8.4
- Tokenizers 0.22.2