huggingface / distil-whisper

Distilled variant of Whisper for speech recognition. 6x faster, 50% smaller, within 1% word error rate.
MIT License
3.33k stars 238 forks source link

Missing config.json file #10

Closed DiogoBerna closed 8 months ago

DiogoBerna commented 8 months ago

I am trying to run the following code:

import torch
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
from datasets import load_dataset

device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32

model_id = "distil-whisper/distil-large-v2"

model = AutoModelForSpeechSeq2Seq.from_pretrained(
    model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
)

But I am getting the following error:

OSError: distil-whisper/distil-large-v2 does not appear to have a file named config.json. Checkout 'https://huggingface.co/distil-whisper/distil-large-v2/main' for available files.

Am I doing something wrong?

Btw, the distil-whisper instructions says Distil-Whisper is supported in Hugging Face Transformers from version 4.35 onwards, but I wasn't able to find that version: https://pypi.org/project/transformers/#history

AnkushMalaker commented 8 months ago

Model not uploaded yet I believe. The repo that the model links to, at this moment infact doesn't have config.json as the error suggests.

kristiankielhofner commented 8 months ago

It's fairly common for "bleeding edge" stuff to need to install transformers from git main:

pip install git+https://github.com/huggingface/transformers

This shows version transformers-4.35.0.dev0 currently.

DiogoBerna commented 8 months ago

Model not uploaded yet I believe. The repo that the model links to, at this moment infact doesn't have config.json as the error suggests.

That makes sense. It seems like they have updated this repo here before updating the model

sanchit-gandhi commented 8 months ago

Hey @DiogoVidevince - the models will be available in 2-3 hours time! Thanks for your patience!

sanchit-gandhi commented 8 months ago

Models are up! Please see the usage section of the README for detailed code examples. Feel free to open a new issue if you experience any problems!