Skip to content

Naive Scaling#2211

Merged
yiliu30 merged 4 commits intor1-woqfrom
naive-scaling
May 16, 2025
Merged

Naive Scaling#2211
yiliu30 merged 4 commits intor1-woqfrom
naive-scaling

Conversation

@yiliu30
Copy link
Contributor

@yiliu30 yiliu30 commented May 15, 2025

Type of Change

feature or bug fix or documentation or validation or others
API changed or not

Description

detail description

Expected Behavior & Potential Risk

the expected behavior that triggered by this PR

How has this PR been tested?

how to reproduce the test (including hardware information)

Dependency Change?

any library dependency introduced or removed

yiliu30 and others added 2 commits May 13, 2025 11:50
Signed-off-by: yiliu30 <yi4.liu@intel.com>
Signed-off-by: yi <yi>
@yiliu30 yiliu30 changed the title Naive scaling Naive Scaling May 15, 2025
@yiliu30 yiliu30 requested a review from Copilot May 16, 2025 00:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a naive scaling mechanism controlled by an environment variable.

  • Adds the INC_FORCE_NAIVE_SCALING flag in the environment utilities.
  • Bypasses additional scaling logic in the scale method factory and FP8 utility functions when the flag is enabled.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
neural_compressor/torch/utils/environ.py Introduces a new environment variable flag to enforce naive scaling.
neural_compressor/torch/algorithms/fp8_quant/_core/scale_methods/scale_method_factory.py Adds a conditional branch to bypass additional scaling configuration when naive scaling is enabled, including a warning log.
neural_compressor/torch/algorithms/fp8_quant/_core/fp_utils.py Forces the backoff value to 1.0 and logs a warning when naive scaling is enabled during FP8 scale calculation.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@yiliu30 yiliu30 merged commit 0bd4390 into r1-woq May 16, 2025
0 of 2 checks passed
@yiliu30 yiliu30 deleted the naive-scaling branch May 16, 2025 08:26
czhu15 pushed a commit to HabanaAI/vllm-fork that referenced this pull request May 16, 2025
Depends on intel/neural-compressor#2211.
Naive scaling: `backoff=1`, no `scaling_round_method`
Full pile: use all samples(> 1024) in pile for calibration,
https://huggingface.co/Yi30/inc-woq-2282samples-514-g2

Signed-off-by: yiliu30 <yi4.liu@intel.com>
Yanli2190 added a commit to Yanli2190/neural-compressor that referenced this pull request Jan 13, 2026
* add naive scaling

Signed-off-by: yiliu30 <yi4.liu@intel.com>

Signed-off-by: Zhang, Yanli L <yanli.l.zhang@intel.com>
@yiliu30 yiliu30 mentioned this pull request Jan 16, 2026
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