microsoft / microsoft/onnxruntime

[Feature Request] expose `unidirectional` (causal) attribute of GQA

Open
#23,409 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

Describe the feature request

We have a unidirectional attribute in MHA, but it is missing in GQA because most LLMs are causal. Transformer-based Text-to-Image models, on the other hand, are not causal. We should expose this attribute in GQA to help facilitate the deployment of Text-to-Image models.

Describe scenario use case

Text-to-Image generation models (like Stable Diffusion 3) require attention implemented with causal=False.

PR

https://github.com/microsoft/onnxruntime/pull/23412

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing how the existing MHA unidirectional attribute is represented and how GQA attention is implemented, then inspect PR #23412. Done means GQA exposes the attribute and supports causal=False for Transformer-based text-to-image models such as Stable Diffusion 3.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.