Maxime commited on
Commit
17605b8
1 Parent(s): c500d02

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

Browse files
Files changed (1) hide show
  1. scripts/finetune.py +2 -0
scripts/finetune.py CHANGED
@@ -82,6 +82,8 @@ def do_inference(cfg, model, tokenizer, prompter: Optional[str]):
82
  max_seq_len=255, mem_freq=50, top_k=5, max_cache_size=None
83
  )
84
 
 
 
85
  while True:
86
  print("=" * 80)
87
  # support for multiline inputs
 
82
  max_seq_len=255, mem_freq=50, top_k=5, max_cache_size=None
83
  )
84
 
85
+ model = model.to(cfg.device)
86
+
87
  while True:
88
  print("=" * 80)
89
  # support for multiline inputs