Conversation
Signed-off-by: lkk12014402 <kaokao.lv@intel.com>
|
TODO: add document |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Pull request overview
Refines the transform config API so callers can pass a str | dict | TransformConfig | None, and normalizes inputs before applying transforms.
Changes:
- Added a shared normalization helper to validate/standardize transform config inputs.
- Updated
apply_transformto accept multiple config input types plus an optional quantization scheme. - Updated compressor initialization to accept and normalize
transform_configdirectly.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| auto_round/experimental/transform/helper.py | Adds _normalize_transform_config for validating and converting transform_config inputs into a normalized dict. |
| auto_round/experimental/transform/apply.py | Expands apply_transform signature and normalizes user inputs before building TransformConfig. |
| auto_round/compressors/base.py | Adds transform_config parameter and normalizes it during compressor initialization. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
for more information, see https://pre-commit.ci
Signed-off-by: lkk12014402 <kaokao.lv@intel.com>
for more information, see https://pre-commit.ci
|
As also mentioned before, these two args in transform_config should not be exposed to users. location: str = Field(default="weight", exclude=True)
# apply transform inside modules for nvfp4, autoround tuning etc.
need_calibration: bool = Field(default=False, exclude=True) |
|
and this one # required, currently only supports mxfp4
quant_scheme: str = Field(..., description="Quantization scheme. Currently supports 'MXFP4/MXFP8'.")why users need to pass the scheme once again? |
need check the supported quantization scheme with transform |
the arg the arg |
|
For API design, please take a position of uers, not developer
I know, this is not the right logic. you should check it in another place |
Signed-off-by: lkk12014402 <kaokao.lv@intel.com>
for more information, see https://pre-commit.ci
Signed-off-by: lkk12014402 <kaokao.lv@intel.com>
|
@chensuyue @XuehaoSun To support Hadamard, a safetensor file has been added to the main branch. I assume we will not include this file in the release package by default. Please help include it if Kaokao thinks it is a better option than generating it at runtime. |
Signed-off-by: lkk12014402 <kaokao.lv@intel.com>
for more information, see https://pre-commit.ci
Signed-off-by: lkk12014402 <kaokao.lv@intel.com>
for more information, see https://pre-commit.ci
Signed-off-by: lkk12014402 <kaokao.lv@intel.com>
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run Unit-Test-CUDA-AutoRound |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Added into release package. |
#1577
Description
refine transform config api, which supports
str|dict|TransformConfig|None