lion-ai/eskulap-asr-medium-beta
Whisper-medium Polish Medical ASR (anti-forgetting)
A LoRA adapter for openai/whisper-medium fine-tuned on Polish medical speech using an anti-forgetting training recipe (knowledge distillation + medical data oversampling + general-domain replay) that specialises the model for medical Polish while preserving performance on general Polish speech.
This model reduces combined WER on held-out Polish medical test sets from 21.16 % → 13.06 % (−38 % relative) while improving performance on general Polish speech (bigos: 20.62 % → 10.75 %, −48 %). Naive medical fine-tuning typically destroys general-domain performance; this recipe avoids that trade-off.
Benchmark vs base whisper-medium (per dataset)
Held-out test sets (3,205 samples, fair-eval methodology — no train/test text overlap):
The bigos column is the catastrophic-forgetting indicator — it improves substantially, confirming the anti-forgetting recipe transfers from whisper-large-v3-turbo to whisper-medium.
Training recipe (best of ~20 experiments)
Training: ~3h47m on 4×A100 (SXM4-40GB).
Datasets
Fine-tuning used a Polish medical + general-domain mix:
Evaluation uses held-out test splits from all five datasets (3,205 samples total).
Why anti-forgetting?
Naively fine-tuning Whisper on medical-only data dramatically improves medical WER but destroys performance on general Polish (e.g. 4.37 % medical / 19.46 % bigos — worse than base model's 15.72 %). This recipe combines three techniques:
- Data replay — mixing general-domain (bigos) samples in training
- Knowledge distillation — KL divergence loss to frozen base whisper-medium preserves its output distribution
- Medical oversampling — repeats the medical training data 2× to shift the balance without removing bigos
Result: strong medical WER AND no bigos forgetting.
Usage
from transformers import WhisperForConditionalGeneration, WhisperProcessor
import torch
model_id = "lion-ai/eskulap-asr-medium-beta"
model = WhisperForConditionalGeneration.from_pretrained(model_id, torch_dtype=torch.float16).to("cuda")
processor = WhisperProcessor.from_pretrained(model_id, language="Polish", task="transcribe")
# Inference
import librosa
audio, sr = librosa.load("sample.wav", sr=16000)
inputs = processor(audio, sampling_rate=16000, return_tensors="pt").to("cuda")
inputs["input_features"] = inputs["input_features"].half()
with torch.no_grad():
predicted_ids = model.generate(**inputs, language="pl", task="transcribe")
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
print(transcription)Related work
This model is part of a broader research effort on fine-tuning Whisper for Polish medical ASR. See also the larger variant (openai/whisper-large-v3-turbo base) trained with the same recipe.
License
Apache 2.0 (inherits from base model).
