Error with word level timestamps

#12
by souvik0306 - opened

result = pipe(sample, return_timestamps="word")
print(result["chunks"])

image.png

This helped in my case by changing stride[0] to stride[0][0] : https://github.com/huggingface/transformers/issues/26253#issuecomment-1804255466
However, i could not run this on device = 'mps' , but works fine on device = 'cpu'

Where did you make the change for stride? Did it work on GPU?

This helped in my case by changing stride[0] to stride[0][0] : https://github.com/huggingface/transformers/issues/26253#issuecomment-1804255466
However, i could not run this on device = 'mps' , but works fine on device = 'cpu'

I just checked it for GPU with device = 'cuda:0', this works, but you will need to disable 'Flash Attention' if you are using that. Otherwise works as intended.

This helped in my case by changing stride[0] to stride[0][0] : https://github.com/huggingface/transformers/issues/26253#issuecomment-1804255466
However, i could not run this on device = 'mps' , but works fine on device = 'cpu'

I just checked it for GPU with device = 'cuda:0', this works, but you will need to disable 'Flash Attention' if you are using that. Otherwise works as intended.

Actually I got the error with GPU, the pipeline code remains the same as model card

@sanchit-gandhi Can you check this out once?

Setting the batch size to 1 works for me.
pipe = pipeline(
batch_size=1,
)
result = pipe(sample, return_timestamps="word")

Setting the batch size to 1 works for me.
pipe = pipeline(
batch_size=1,
)
result = pipe(sample, return_timestamps="word")

So it only works when batch_size set to 1?

Sign up or log in to comment