Skip to content

Add dynamic shapes to ExecuTorch static cache export tests #40260

Open

Description

@jackzhxng

Feature request

Add dynamic shapes to the ExecuTorch text_export_static_cache tests on causalLM models such as Qwen.

Then modify the test generation function to prefill all at once instead of sequentially.

Motivation

Tests the export more accurately since production use cases will almost always export with dynamic cache to prefill all at once during inference.

Your contribution

I submit the PR @jackzhxng

Activity

  1. ThankaBharathi commented on Aug 28, 2025

    @ThankaBharathi

    Hi maintainers 👋, I’d like to work on this feature request.
    Could you please assign it to me?

    My approach
    Add dynamic shapes to ExecuTorch text_export_static_cache tests for causal LM models (e.g., Qwen).
    Update the test generation to prefill all at once instead of sequentially.
    Add/extend tests to validate correctness on dynamic cache + batch prefill.
    Verify on Qwen configs and ensure CI passes.

    Thanks!
    cc @jackzhxng

  2. jackzhxng commented on Aug 28, 2025

    @jackzhxng
    ContributorAuthor

    Feel free to take it!

  3. ArthurZucker commented on Oct 20, 2026

    @ArthurZucker
    Collaborator

    On main, export goes through transformers.exporters (https://huggingface.co/docs/transformers/main/en/exporters) (#41992), which supports dynamic shapes; extending it is documented at https://huggingface.co/docs/transformers/main/en/exporters_extend. The legacy helpers in integrations/executorch.py are not where new export work should go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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