-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Closed
Description
System Info
transformersversion: 4.27.0.dev0- Platform: Linux-5.10.147+-x86_64-with-glibc2.29
- Python version: 3.8.10
- Huggingface_hub version: 0.12.1
- PyTorch version (GPU?): 1.13.1+cu116 (False)
- Tensorflow version (GPU?): 2.11.0 (False)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: NO
- Using distributed or parallel set-up in script?: NO
Who can help?
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - My own task or dataset (give details below)
Reproduction
Inferring a Whisper checkpoint fine-tuned before the TimestampstampProcessor was introduced into transformers returns a rather un-informed error message AttributeError: 'GenerationConfig' object has no attribute 'no_timestamps_token_id'
Minimum steps to reproduce this:
from transformers.pipelines import AutomaticSpeechRecognitionPipeline, pipeline
from datasets import load_dataset
cv11 = load_dataset("mozilla-foundation/common_voice_11_0", "hi", split="test", streaming=True)
pipe = pipeline(model="sanchit-gandhi/whisper-small-hi", return_timestamps=True)
test_sample = {"raw": next(iter(cv11))["audio"]["array"],
"sampling_rate": next(iter(cv11))["audio"]["sampling_rate"]}
pipe(test_sample)Colab/ notebook: here
The above snippet throws an error as mentioned above. This problem effects the majority (727) of the checkpoints fine-tuned during the Whisper Event.
P.S. This has been reported by multiple community members, so not just me.
Expected behavior
We should ideally make the return_timestamp functionality backwards compatible or throw a more informative error message.
Sorry if there already is a way to do this and I am just misinformed.
sanchit-gandhibayartsogt-yaAigizK
Metadata
Metadata
Assignees
Labels
No labels