Skip to content

Add measurements postprocessing script#2260

Merged
regisss merged 3 commits into
huggingface:mainfrom
AKloniecki:postprocess_measurements
Sep 16, 2025
Merged

Add measurements postprocessing script#2260
regisss merged 3 commits into
huggingface:mainfrom
AKloniecki:postprocess_measurements

Conversation

@AKloniecki
Copy link
Copy Markdown
Collaborator

What does this PR do?

This PR adds a convenience proxy script that calls a measurements' postprocessing method from Intel Neural-Compressor library.
This script aligns the scales for matmul_av, matmul_qk with those for k_cache and v_cache, to avoid dequant-quant-scale op before matmul_qk and matmul_av.
This leads to better performance on larger batch sizes and context lengths.
README.md has been updated to add execution of the script after measurements are done.

This change should be cherry-picked to v1.20-release branch.

Signed-off-by: Artur Kloniecki <arturx.kloniecki@intel.com>
Signed-off-by: Artur Kloniecki <arturx.kloniecki@intel.com>
@github-actions
Copy link
Copy Markdown

The code quality check failed, please run make style.

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@pbielak
Copy link
Copy Markdown
Collaborator

pbielak commented Sep 16, 2025

@AKloniecki @astachowiczhabana So this PR replaces Adam's previous one (#2238), right?

Signed-off-by: Artur Kloniecki <arturx.kloniecki@intel.com>
@AKloniecki
Copy link
Copy Markdown
Collaborator Author

@AKloniecki @astachowiczhabana So this PR replaces Adam's previous one (#2238), right?

yes in deed.

Copy link
Copy Markdown
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Let me know when I should merge

@AKloniecki
Copy link
Copy Markdown
Collaborator Author

We are ready for merge, please cherry-pick the change to v1.20-release as mentioned in the PR description as well.

@regisss regisss merged commit f88e487 into huggingface:main Sep 16, 2025
2 of 5 checks passed
regisss pushed a commit that referenced this pull request Sep 16, 2025
Signed-off-by: Artur Kloniecki <arturx.kloniecki@intel.com>
@regisss
Copy link
Copy Markdown
Collaborator

regisss commented Sep 16, 2025

please cherry-pick the change to v1.20-release as mentioned in the PR description as well.

Done

astachowiczhabana pushed a commit that referenced this pull request Sep 17, 2025
Signed-off-by: Artur Kloniecki <arturx.kloniecki@intel.com>
gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Oct 15, 2025
…e#685)

Signed-off-by: Artur Kloniecki <arturx.kloniecki@intel.com>
Co-authored-by: Artur KlonieckiX <arturx.kloniecki@intel.com>
gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Nov 6, 2025
…e#685)

Signed-off-by: Artur Kloniecki <arturx.kloniecki@intel.com>
Co-authored-by: Artur KlonieckiX <arturx.kloniecki@intel.com>
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.

4 participants