Skip to content

Commit

Permalink
Merge pull request mistralai#1 from bofenghuang/fix-gen
Browse files Browse the repository at this point in the history
Fix temperature arg in interactive
  • Loading branch information
timlacroix committed Sep 28, 2023
2 parents ebd3abc + 28b02bc commit 77c1fe6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ def interactive(model_path: str, max_tokens: int = 35, temperature: float = 0.7)

while True:
prompt = input("Prompt: ")
res, _logprobs = generate([prompt], transformer, tokenizer, max_tokens=max_tokens)
res, _logprobs = generate(
[prompt],
transformer,
tokenizer,
max_tokens=max_tokens,
temperature=temperature,
)
print(res[0])
print("=====================")

Expand Down

0 comments on commit 77c1fe6

Please sign in to comment.