Subha95 commited on
Commit
5e616ba
·
verified ·
1 Parent(s): df9bced

Update ai_assistant.py

Browse files
Files changed (1) hide show
  1. ai_assistant.py +2 -2
ai_assistant.py CHANGED
@@ -44,8 +44,8 @@ def build_qa():
44
  tokenizer = AutoTokenizer.from_pretrained(model_name)
45
  model = AutoModelForCausalLM.from_pretrained(
46
  model_name,
47
- device_map="auto",
48
- torch_dtype=torch.float16,
49
  )
50
  llm = TextGenerationPipeline(
51
  model=model,
 
44
  tokenizer = AutoTokenizer.from_pretrained(model_name)
45
  model = AutoModelForCausalLM.from_pretrained(
46
  model_name,
47
+ device_map="auto", # works after installing accelerate
48
+ dtype=torch.float16, # instead of torch_dtype
49
  )
50
  llm = TextGenerationPipeline(
51
  model=model,