MCPcopy Create free account
hub / github.com/NVlabs/LongLive / LongLiveQuantizationConfig

Class LongLiveQuantizationConfig

utils/quant.py:75–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74@dataclass
75class LongLiveQuantizationConfig(QuantizationConfig):
76 type: str = "weight"
77
78 def __post_init__(self) -> None:
79 super().__post_init__()
80
81 if not isinstance(self.type, str):
82 raise TypeError("Quantization type must be a string.")
83 if self.type not in QUANTIZATION_TYPE:
84 allowed = ", ".join(QUANTIZATION_TYPE.keys())
85 raise ValueError(f"Unknown quantization type '{self.type}'. Expected one of: {allowed}.")
86
87 self.type = QUANTIZATION_TYPE[self.type]
88
89
90def _resolve_modules_to_not_convert(

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected