Skip to content

Commit

Permalink
Fix omniq clip bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
gushiqiao committed Jan 2, 2025
1 parent e320149 commit d34fa43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def set_quant_config(self):

# set weight clip config
self.weight_clip = special_config.get('weight_clip', False)
if self.weight_clip:
if self.weight_clip or special_config.get('search_clip_init', False):
self.save_clip = special_config.get('save_clip', False)
if self.save_clip:
self.clip_path = special_config['clip_path']
Expand Down
2 changes: 1 addition & 1 deletion llmc/compression/quantization/omniq.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def get_clip_parameters(self, input_feat, n, m):
n_sample_token=self.config.calib.get('seq_len', None),
)

up_factor, low_factor = self.get_clip_factor(m, min_val, max_val, n)
up_factor, low_factor = self.auto_clipper.get_clip_factor(self.block_idx, m, min_val, max_val, n)

up_param = nn.Parameter(up_factor)
low_param = nn.Parameter(low_factor)
Expand Down

0 comments on commit d34fa43

Please sign in to comment.