# Pass input\_embed to WhisperDecoder

**URL:** <https://discuss.huggingface.co/t/pass-input-embed-to-whisperdecoder/87895>\
**Category:** 🤗Transformers\
**Created:** [May 22, 2024, 5:40pm UTC](https://discuss.huggingface.co/t/pass-input-embed-to-whisperdecoder/87895 "2024-05-22T17:40:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aben118](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@aben118](https://discuss.huggingface.co/u/aben118)\
**Post date:** [May 22, 2024, 5:40pm UTC](https://discuss.huggingface.co/t/pass-input-embed-to-whisperdecoder/87895/1 "2024-05-22T17:40:16Z")

</div>

In modeling\_whisper.py, the WhisperDecoder can take `input_ids` or `input_embeds` as its input. When I try passing `input_embeds` of dimension `(1, 1500, 384)` it faces an error inside `WhisperPositionalEmbedding` as the max\_context\_length is `448` and I get an error of `RuntimeError}. The size of tensor a (1500) must match the size of tensor b (448) at non-singleton dimension 1`. How to resolve this issue?
