Skip to content

Commit

Permalink
Aggregate paths in cot decoding by default
Browse files Browse the repository at this point in the history
  • Loading branch information
codelion committed Nov 13, 2024
1 parent e6d61b1 commit 6a3ffa7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions optillm/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ def create(
length_penalty: float = 1.0,
no_repeat_ngram_size: int = 0,
early_stopping: bool = False,
aggregate_paths: bool = False,
aggregate_paths: bool = True,
# Entropy specific params
top_k: int = 27,
min_p: float = 0.03,
Expand Down Expand Up @@ -1263,10 +1263,10 @@ def create(
cot_params = {
"k": k,
"num_beams": num_beams,
"max_new_tokens": max_tokens if max_tokens is not None else 4096,
"max_new_tokens": max_tokens if max_tokens is not None else 512,
"temperature": temperature,
"top_p": top_p,
"repetition_penalty": 1.0 + frequency_penalty,
"repetition_penalty": 1.0,
"length_penalty": length_penalty,
"no_repeat_ngram_size": no_repeat_ngram_size,
"early_stopping": early_stopping,
Expand All @@ -1293,7 +1293,7 @@ def create(
# Use directly available parameters for entropy decoding

entropy_params = {
"max_new_tokens": max_tokens if max_tokens is not None else 4096,
"max_new_tokens": max_tokens if max_tokens is not None else 512,
"temperature": 0.666,
"top_p": 0.90,
"top_k": top_k,
Expand Down

0 comments on commit 6a3ffa7

Please sign in to comment.