Skip to content

Commit b2a3c85

Browse files
Merge pull request #130 from chichun-charlie-liu/fix4PR102
fix: disable granite in custom gptq as gptqmodel already supports it, fix …
2 parents 9fef5b2 + 5bc4691 commit b2a3c85

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

fms_mo/run_quant.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ def run_gptq(model_args, data_args, opt_args, gptq_args):
144144

145145
# Add custom model_type mapping to gptqmodel LUT so GPTQModel can recognize them.
146146
for mtype, cls in custom_gptq_classes.items():
147+
if mtype in MODEL_MAP:
148+
logger.info(
149+
f"Custom GPTQ model type {mtype} already exists in default MODEL_MAP.\n"
150+
"The mapping for this type is overwritten by user defined type now."
151+
"Please make sure this is the behavior you'd like to have."
152+
)
147153
SUPPORTED_MODELS.append(mtype)
148154
MODEL_MAP[mtype] = cls
149155

fms_mo/utils/custom_gptq_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ class GraniteMoeGPTQForCausalLM(BaseGPTQModel):
4949
# config.json). Make sure you cover the ones in the model family you want to use, as they may
5050
# not be under the same model_type. See Granite as an example.
5151
custom_gptq_classes = {
52-
"granite": GraniteGPTQForCausalLM,
52+
# "granite": GraniteGPTQForCausalLM,
5353
"granitemoe": GraniteMoeGPTQForCausalLM,
5454
}

0 commit comments

Comments
 (0)