Skip to content

[BUG] Gemma-4 Gemma4AudioRelPositionalEncoding #45468

@foldl

Description

@foldl

System Info

N/A.

Who can help?

The hard coded numbers 12 and -1 seem to be related to attention_context_left and attention_context_right.

position_ids = torch.arange(12, -1, -1, device=hidden_states.device)

@eustlb @ebezzam @vasqu

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

Code review.

Expected behavior

Use params from config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions