Skip to content

AMD quark class not updated #47321

Description

@debasisdwivedy

System Info

  • transformers version: 5.13.1
  • Platform: Linux-6.8.0-1058-gcp-x86_64-with-glibc2.39
  • Python version: 3.13.13
  • Huggingface_hub version: 1.23.0
  • Safetensors version: 0.8.0
  • Accelerate version: 1.14.0
  • Accelerate config: not found
  • DeepSpeed version: not installed
  • PyTorch version (accelerator?): 2.12.1+cu130 (CUDA)
  • Using distributed or parallel set-up in script?:
  • Using GPU in script?:
  • GPU type: Tesla T4

Who can help?

Hi ,

The quantization config for AMD class points to an older release and needs to be updated.
File : src/transformers/utils/quantization_config.py

Previous versions of Quark had the config as from quark.torch.quantization.config.config import Config, which has been changed to from quark.torch.quantization.config.config import QConfig

Regards

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

def main():
evaluation_tracker = EvaluationTracker(
output_dir="./results",
save_details=True
)

pipeline_params = PipelineParameters(
    launcher_type=ParallelismManager.ACCELERATE,
    custom_tasks_directory=None,  # Set to path if using custom tasks
    # Remove the parameter below once your configuration is tested
    # max_samples=10
)

model_config = TransformersModelConfig(
    model_name="", #Quark quantized folder path
    device="cuda"
)

task = ""

pipeline = Pipeline(
    tasks=task,
    pipeline_parameters=pipeline_params,
    evaluation_tracker=evaluation_tracker,
    model_config=model_config,
)

pipeline.evaluate()
pipeline.save_and_push_results()
pipeline.show_results()

Expected behavior

Should load the quantized model, but we get error: "Unable to Import from quark.torch.quantization.config.config import Config"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions