Instructions to use BUT-FIT/DiCoW_v3_2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BUT-FIT/DiCoW_v3_2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="BUT-FIT/DiCoW_v3_2", trust_remote_code=True)# Load model directly from transformers import AutoModelForSpeechSeq2Seq model = AutoModelForSpeechSeq2Seq.from_pretrained("BUT-FIT/DiCoW_v3_2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
fix: add compatibility with Transformers 4.55.0
Context:
On the github repo, "https://github.com/BUTSpeechFIT/DiCoW/blob/main/requirements.txt" shows a transformers=4.55.0 dependency, introduced by this commit :
https://github.com/yro7/DiCoW-dockerized/commit/897f76935277c51b5fda0d23189c2997933d8a8d
However, the HF code still uses a code that seems to be from transformers=4.42.0 , such as "WHISPER_ATTENTION_CLASSES"
(see https://huggingface.co/openbmb/MiniCPM-o-2_6/discussions/49)
Those changes in the transformers API break the model. Hence following the installation directives achieve to a broken setup.
This PR fixes this by patching the imports to be transformers=4.5.5 compliant, almost without touching the rest of the code.
Hey,
I tried my best to avoid touching at as much code as possible. However I had to backport some helpers functions from transformers 4.40.
This version compiles with transformers=4.55.0 and can run a full pipeline without issues.
See "https://github.com/yro7/DiCoW-dockerized" and simply "docker compose up" to test it :)
Best regards,
Marin