chrisjay commited on
Commit
f45345f
β€’
1 Parent(s): 8ffc092

work on dialogue models

Browse files
Files changed (1) hide show
  1. model.py +2 -2
model.py CHANGED
@@ -13,7 +13,7 @@ model = AutoModelForCausalLM.from_pretrained(
13
  config=config,
14
  #torch_dtype=torch.float16,
15
  #load_in_4bit=True,
16
- device_map='cpu'
17
  )
18
  #else:
19
  # model = None
@@ -55,7 +55,7 @@ def run(message: str,
55
  inputs = tokenizer([prompt], return_tensors='pt', add_special_tokens=False)
56
 
57
  streamer = TextIteratorStreamer(tokenizer,
58
- timeout=40.,
59
  skip_prompt=True,
60
  skip_special_tokens=True)
61
  generate_kwargs = dict(
 
13
  config=config,
14
  #torch_dtype=torch.float16,
15
  #load_in_4bit=True,
16
+ device_map='auto'
17
  )
18
  #else:
19
  # model = None
 
55
  inputs = tokenizer([prompt], return_tensors='pt', add_special_tokens=False)
56
 
57
  streamer = TextIteratorStreamer(tokenizer,
58
+ timeout=60.,
59
  skip_prompt=True,
60
  skip_special_tokens=True)
61
  generate_kwargs = dict(