Skip to content

Commit e7ec059

Browse files
author
gushiqiao
committed
Fix ci bug
1 parent 6df6e83 commit e7ec059

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

llmc/__main__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,12 @@ def main(config):
100100
org_model = MODEL_REGISTRY[config.model.type](
101101
config.model.path, config.model.torch_dtype
102102
)
103-
token_consist_eval = TokenConsistencyEval(tokenizer.get_tokenizer(), eval_config)
103+
token_consist_eval = TokenConsistencyEval(tokenizer.get_tokenizer(),
104+
eval_config)
104105
consistency_ratio = token_consist_eval.eval(model, org_model)
105106
logger.info(f'Token consistency ratio: {consistency_ratio}')
106107
del org_model
107-
108+
108109
if 'save' in config and config.save.get('save_fake', False):
109110
blockwise_opt.deploy('fake_quant')
110111
blockwise_opt.save_model(save_fake_path)

llmc/compression/quantization/gptq.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ def weight_transform(self, W, Hinv, Losses, tmp):
239239
w, d = W1[:, i], Hinv1[i, i]
240240
idx = i1 + i
241241

242-
if self.wquantizer.granularity == "per_group":
242+
if self.wquantizer.granularity == 'per_group':
243243
idx = i1 + i
244244
if not self.static_groups:
245245
if (i1 + i) % self.wquantizer.group_size == 0:
246246
column_tensors = W[
247247
:,
248-
(i1 + i) : min(
248+
(i1 + i):min(
249249
(i1 + i + self.wquantizer.group_size),
250250
(self.columns - self.n_out),
251251
),

llmc/eval/eval_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ def eval(self, model_llmc, model_org=None):
114114

115115
gc.collect()
116116
torch.cuda.empty_cache()
117-
return eval_res
117+
return eval_res

0 commit comments

Comments
 (0)