Skip to content

Adding Mamba2ForTokenClassification to Mamba2 #35180

@ryan-minato

Description

@ryan-minato

Feature request

I’ve noticed that many newly added models do not include a ForTokenClassification implementation. Is this due to fundamental challenges in implementation (though I don’t perceive any major obstacles—perhaps I’ve overlooked something), or is it simply a matter of development priorities and time constraints?

Motivation

I am currently testing a prototype based on the Mamba series models, which requires token classification outputs.

Your contribution

If it’s merely a time issue preventing the implementation of ForTokenClassification in transformers, I’d be more than willing to contribute by adding this feature for Mamba/Mamba2. If time allows, I’d also be happy to extend the support to other models.

From my understanding, replicating the approach used in LlamaForTokenClassification should suffice to implement token classification model for most models. Any advice or guidance would be highly appreciated!

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