fix: inference did not move the model to the correct device (#483)

This commit is contained in:
Maxime
2023-08-26 22:40:56 +02:00
committed by GitHub
parent c500d02517
commit 17605b85d8

View File

@@ -82,6 +82,8 @@ def do_inference(cfg, model, tokenizer, prompter: Optional[str]):
max_seq_len=255, mem_freq=50, top_k=5, max_cache_size=None
)
model = model.to(cfg.device)
while True:
print("=" * 80)
# support for multiline inputs