Skip to content

Commit

Permalink
move more args
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Gschwind committed Apr 17, 2024
1 parent a4e0966 commit 7af1832
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,6 @@ def _main(
speculative_builder_args: BuilderArgs,
tokenizer_args: TokenizerArgs,
generator_args: GeneratorArgs,
max_new_tokens: int = 100,
top_k: int = 200,
temperature: float = 0.8,
compile: bool = True,
compile_prefill: bool = False,
profile: Optional[Path] = None,
Expand Down Expand Up @@ -445,13 +442,13 @@ def callback(x):
y, metrics = generate(
model,
encoded,
max_new_tokens,
generator_args.max_new_tokens,
draft_model=draft_model,
speculate_k=speculate_k,
chat_mode=generator_args.chat_mode,
callback=callback,
temperature=temperature,
top_k=top_k,
temperature=generator_args.temperature,
top_k=generator_args.top_k,
)
aggregate_metrics["accept_counts"].append(metrics["accept_counts"])
if i == -1:
Expand Down Expand Up @@ -502,9 +499,6 @@ def main(args):
speculative_builder_args,
tokenizer_args,
generator_args,
args.max_new_tokens,
args.top_k,
args.temperature,
args.compile,
args.compile_prefill,
args.profile,
Expand Down

0 comments on commit 7af1832

Please sign in to comment.