Skip to content

Commit 5197a64

Browse files
authored
Merge pull request #217 from ModelTC/dev_fixbug
Fix bugs
2 parents 6bc48c5 + e6f5f0e commit 5197a64

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llmc/compression/quantization/module_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,10 @@ def state_dict(self, destination=None, prefix='', keep_vars=False):
448448
keep_vars=keep_vars)
449449
if f'{prefix}fc.weight' in state_dict:
450450
state_dict[f'{prefix}weight'] = state_dict.pop(f'{prefix}fc.weight')
451+
if f'{prefix}fc.weight_scale' in state_dict:
452+
state_dict[f'{prefix}weight_scale'] = state_dict.pop(f'{prefix}fc.weight_scale')
453+
if f'{prefix}fc.input_scale' in state_dict:
454+
state_dict[f'{prefix}input_scale'] = state_dict.pop(f'{prefix}fc.input_scale')
451455
return state_dict
452456

453457
def _fp32_forward(self, hidden_states):

0 commit comments

Comments
 (0)