Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit 638a871

Browse files
committed
remove beamsize in causal lm
1 parent 6f0e5dd commit 638a871

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

codetf/models/causal_lm_models/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ def forward(self, sources):
7272
input_ids = encoding.input_ids.to(self.device)
7373
attention_mask = encoding.attention_mask.to(self.device)
7474
generated_ids = self.model.generate(input_ids, attention_mask=attention_mask,
75-
max_length=self.max_prediction_length,
76-
num_beams=self.beam_size)
75+
max_length=self.max_prediction_length)
7776

7877
predictions = self.tokenizer.batch_decode(generated_ids, truncate_before_pattern=[r"\n\n^#", "^'''", "\n\n\n"])
7978
return predictions

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
setup(
3333
name = 'salesforce-codetf',
34-
version = "1.0.0",
34+
version = "1.0.1",
3535
py_modules = ['codetf'],
3636
description = 'CodeTF: A Transformer-based Library for Code Intelligence',
3737
author = 'Nghi D. Q. Bui',

0 commit comments

Comments
 (0)