Skip to content

Prompt_ids vs. decoder_input_ids in Whisper #28228

Description

@vymao

Feature request

I am trying to understand the different between adding prior text to prompt_ids vs. decoder_input_ids when generating text via Whisper. The documentation is not very clear on how these differ implementation-wise; AFAIK, it seems like using prompt_ids will lead to forced_input_ids being modified here. But I'm not sure how exactly using decoder_input_ids differs from this.

Motivation

To add context to the whisper transcription. For example, if the model previously transcribed I have a in a streaming fashion, I would like to add this as "context" into the model to help it predict the next word. I believe the actual OpenAI Whisper implementation has a feature called "prefix" that does this.

Your contribution

Will try.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions