Skip to content

[error message improvement] include num_calibration_samples/max_seq_length in oom resolution message - #3020

Open
brian-dellabetta wants to merge 2 commits into
mainfrom
bdellabe/oom-error-message
Open

[error message improvement] include num_calibration_samples/max_seq_length in oom resolution message#3020
brian-dellabetta wants to merge 2 commits into
mainfrom
bdellabe/oom-error-message

Conversation

@brian-dellabetta

Copy link
Copy Markdown
Collaborator

Fixes #3011

SUMMARY:
Update the OOM error message to include calibration dataset considerations.

TEST PLAN:
n/a

Signed-off-by: Brian Dellabetta <bdellabe@redhat.com>
@github-actions

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6bba526e-fe1c-447a-bafe-48a069476e42

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the OutOfMemoryError message in the sequential pipeline helper to suggest reducing the calibration dataset size (via num_calibration_samples or max_seq_length) as an alternative solution. The reviewer suggested changing 'data set' to 'dataset' in the error message for consistency with the rest of the codebase.

Comment thread src/llmcompressor/pipelines/sequential/helpers.py Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Brian Dellabetta <brian-dellabetta@users.noreply.github.com>

@Rodder5 Rodder5 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reporter of #3011 here: this addresses the diagnosability gap we hit. One optional tweak suggested on the issue (max_seq_length is usually the lever; sample count was invariant in our repro).

@mergify

mergify Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @brian-dellabetta.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Aug 11, 2026
@mergify

mergify Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 1 of 1 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 Require one maintainer review 👀 reviews

🔴 Require one maintainer review

Waiting for any of

  • approved-reviews-by=HDCharles
  • approved-reviews-by=brian-dellabetta
  • approved-reviews-by=dsikka
  • approved-reviews-by=kylesayrs
  • approved-reviews-by=yiliu30
This rule is failing.

All PRs must have at least one approving review from a maintainer before merging.

  • any of:
    • approved-reviews-by=HDCharles
    • approved-reviews-by=brian-dellabetta
    • approved-reviews-by=dsikka
    • approved-reviews-by=kylesayrs
    • approved-reviews-by=yiliu30
  • #changes-requested-reviews-by = 0

rishabhsinha17 added a commit to rishabhsinha17/llm-compressor that referenced this pull request Aug 14, 2026
When `max_seq_length` is unset and the tokenized calibration dataset
contains samples longer than SEQ_LEN_ERROR_THRESHOLD (2048) tokens,
format_calibration_data() now raises a ValueError instead of warning.
Calibrating with long untruncated samples runs out of GPU memory with
the OOM raised from attention or attention mask expansion, which is
easily mistaken for the model not fitting on the device, and a warning
for it is buried in noisy logs while an error surfaces at the failure
point (per review). The message reports how many samples exceed the
threshold and the longest length, and gives both remedies: set
`max_seq_length` to truncate, or set it to at least the longest length
to calibrate on full-length samples intentionally. Sample lengths are
measured on the arrow column to avoid materializing the tokenized
dataset in Python memory.

Also fold in vllm-project#3020's guidance so it can close in favor of this PR: the
sequential pipeline's OOM message now also suggests reducing
`num_calibration_samples` or `max_seq_length`.

Fixes vllm-project#3011

Co-authored-by: Brian Dellabetta <bdellabe@redhat.com>
Signed-off-by: Rishabh Sinha <rsinha17@terpmail.umd.edu>
rishabhsinha17 added a commit to rishabhsinha17/llm-compressor that referenced this pull request Aug 14, 2026
When `max_seq_length` is unset and the tokenized calibration dataset
contains samples longer than SEQ_LEN_ERROR_THRESHOLD (2048) tokens,
format_calibration_data() now raises a ValueError instead of warning.
Calibrating with long untruncated samples runs out of GPU memory with
the OOM raised from attention or attention mask expansion, which is
easily mistaken for the model not fitting on the device, and a warning
for it is buried in noisy logs while an error surfaces at the failure
point (per review). The message reports how many samples exceed the
threshold and the longest length, and gives both remedies: set
`max_seq_length` to truncate, or set it to at least the longest length
to calibrate on full-length samples intentionally. Sample lengths are
measured on the arrow column to avoid materializing the tokenized
dataset in Python memory.

Also fold in vllm-project#3020's guidance so it can close in favor of this PR: the
sequential pipeline's OOM message now also suggests reducing
`num_calibration_samples` or `max_seq_length`.

Fixes vllm-project#3011

Co-authored-by: Brian Dellabetta <bdellabe@redhat.com>
Signed-off-by: Rishabh Sinha <rsinha17@terpmail.umd.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Untruncated text calibration produces a misleading 16 GiB CUDA OOM in mask expansion; warn or guard when max_seq_length is unset

2 participants