Skip to content

Commit

Permalink
custom gen configs
Browse files Browse the repository at this point in the history
  • Loading branch information
chentigerye committed Jun 5, 2024
1 parent f5afd08 commit d4fbf36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ def main(
rope_factor=rope_factor)
generation_config.max_new_tokens = max_generate_length
generation_config.max_length = max_input_length + max_generate_length

# sampling gen configs
generation_config.do_sample = True
generation_config.temperature = 0.6
generation_config.top_k = 5
generation_config.top_p = 0.9
generation_config.repetition_penalty = 1.02
generation_config.use_cache = True

device = torch.cuda.current_device()
sess_text = ""
Expand Down

0 comments on commit d4fbf36

Please sign in to comment.