Skip to content
Merged
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
4 changes: 4 additions & 0 deletions llmc/compression/quantization/module_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,10 @@ def state_dict(self, destination=None, prefix='', keep_vars=False):
keep_vars=keep_vars)
if f'{prefix}fc.weight' in state_dict:
state_dict[f'{prefix}weight'] = state_dict.pop(f'{prefix}fc.weight')
if f'{prefix}fc.weight_scale' in state_dict:
state_dict[f'{prefix}weight_scale'] = state_dict.pop(f'{prefix}fc.weight_scale')
if f'{prefix}fc.input_scale' in state_dict:
state_dict[f'{prefix}input_scale'] = state_dict.pop(f'{prefix}fc.input_scale')
return state_dict

def _fp32_forward(self, hidden_states):
Expand Down
Loading