Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions fms_mo/run_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ def run_gptq(model_args, data_args, opt_args, gptq_args):

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

Expand Down
2 changes: 1 addition & 1 deletion fms_mo/utils/custom_gptq_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ class GraniteMoeGPTQForCausalLM(BaseGPTQModel):
# config.json). Make sure you cover the ones in the model family you want to use, as they may
# not be under the same model_type. See Granite as an example.
custom_gptq_classes = {
"granite": GraniteGPTQForCausalLM,
# "granite": GraniteGPTQForCausalLM,
"granitemoe": GraniteMoeGPTQForCausalLM,
}
Loading