Skip to content

Support hidden_states Input Besides input_ids for Multi-Modality Models #847

@leng-yue

Description

@leng-yue

Feature request

Extend the current API to accept hidden_states as an optional input parameter in addition to input_ids. This would support integration with multi-modality models such as LLAVA, Video Lamma, BLIP2, etc.

Motivation

Many modern models are designed to process more than one type of data (e.g., text and images) and require inputting hidden_states directly. Allowing hidden_states as input would enable a seamless integration of these models, enhancing the overall utility of the TGI. This change aligns with the growing need for versatile, multi-modal solutions in the AI community.

Your contribution

I believe that this is a valuable addition to the TGI. The proposed change is relatively minor but has the potential to greatly improve functionality. I'm eager to contribute and would like to make a PR to implement this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions