Views
No views yet
1from peft import PeftModel
2from transformers import WhisperForConditionalGeneration, WhisperProcessor
3
4base = WhisperForConditionalGeneration.from_pretrained(YOUR_BASE_MODEL)
5model = PeftModel.from_pretrained(base, "djelia/bm-whisper-large-v4-training-bm-lora-3")
6model.eval()
7
8# tokenizer and feature extractor ship with the adapter
9processor = WhisperProcessor.from_pretrained("djelia/bm-whisper-large-v4-training-bm-lora-3")
10
11# Optional: fold the LoRA deltas into the base weights for inference.
12# merged = model.merge_and_unload()| Key | Value |
|---|---|
peft_type | LORA |
r / lora_alpha | 8 / 8 (scaling 1.0) |
lora_dropout | 0.05 |
bias / lora_bias | none / false |
target_modules | ["q_proj", "k_proj", "v_proj", "out_proj"] |
base_model_class | WhisperForConditionalGeneration |
| Adapter dtype | F32 |
target_modules is a plain name list, so every matching projection in both towers is adapted: encoder self-attention, decoder self-attention and decoder cross-attention, layers 0-31 (768 tensors in total). MLP blocks, the convolutional front-end, embeddings, layer norms and proj_out are untouched.