Spencer525 commited on
Commit
d6ad3e8
·
verified ·
1 Parent(s): 99345bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -37,7 +37,7 @@ def initialize_mistral():
37
  tokenizer = AutoTokenizer.from_pretrained(model_path)
38
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
39
  dtype = torch.bfloat16
40
- model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=dtype, device_map=device)
41
  return tokenizer, model
42
 
43
  # Mistral text generation function
 
37
  tokenizer = AutoTokenizer.from_pretrained(model_path)
38
  device = 'cuda' if torch.cuda.is_available() else 'cpu'
39
  dtype = torch.bfloat16
40
+ model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=dtype) # Removed device_map parameter
41
  return tokenizer, model
42
 
43
  # Mistral text generation function