Skip to content

[LLM:Bugfix] Honor --chunk_size when generating QNN prefill IO#4610

Closed
LudovicoYIN wants to merge 2 commits into
alibaba:masterfrom
LudovicoYIN:fix/qnn-chunk-size-pr
Closed

[LLM:Bugfix] Honor --chunk_size when generating QNN prefill IO#4610
LudovicoYIN wants to merge 2 commits into
alibaba:masterfrom
LudovicoYIN:fix/qnn-chunk-size-pr

Conversation

@LudovicoYIN

Copy link
Copy Markdown
Contributor

Description

This PR fixes a bug in transformers/llm/export/npu/generate_llm_qnn.py where the user-provided --chunk_size was not honored when generating prefill IO.

Before this change, convert_llm() always called:

makeIOJson(args, 128, hidden_size, mask_type)

which meant the prefill QNN graph could still be generated against 128-token IO even when --chunk_size 256/512 was requested.

This can make the generated QNN artifact inconsistent with runtime configuration and lead to misleading evaluation results, especially for ppl_eval.

Module

LLM

Type

  • Feature
  • Bugfix
  • Perf
  • Refact
  • Style
  • Doc
  • Test
  • Chore

Checklist

  • Commit message follows [Module:Type] Description format
  • Code compiles without errors
  • Tested on relevant platform(s)
  • No unrelated format or style changes included

@LudovicoYIN

Copy link
Copy Markdown
Contributor Author

Closing this PR because it unintentionally included unrelated SeqMSE changes. I will reopen a clean PR that only contains the chunk-size fix.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant