Skip to content

Commit

Permalink
Update inference.py
Browse files Browse the repository at this point in the history
  • Loading branch information
piupiupiuu authored Jun 4, 2023
1 parent c7139f0 commit d6961e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inference.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import time, torch
from transformers import LlamaTokenizer, LlamaForCausalLM, GenerationConfig
import torch
from transformers import LlamaTokenizer, LlamaForCausalLM
import sys


Expand Down Expand Up @@ -40,6 +40,7 @@ def evaluate(instruction,
temperature=temperature,
top_p=top_p,
top_k=top_k,
**kwargs
)
response = tokenizer.decode(generated_ids[0])
response = process_response(response)
Expand Down

0 comments on commit d6961e3

Please sign in to comment.