Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Mit han lab Llm awq Apply awq

From Leeroopedia

Overview

Concrete tool for applying precomputed AWQ transforms to a model provided by the llm-awq library.

Source

File: awq/quantize/pre_quant.py, Lines: 252-254

Signature

def apply_awq(model, awq_results):
    apply_scale(model, awq_results["scale"])
    apply_clip(model, awq_results["clip"])

Import

from awq.quantize.pre_quant import apply_awq

I/O

Inputs:

  • model (nn.Module) - FP16 model
  • awq_results (dict) - dictionary with "scale" and "clip" keys, loaded via torch.load

Output:

  • None (model modified in-place)

Related Pages

Knowledge Sources

Domains

  • Quantization
  • NLP

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment