Spaces:
Sleeping
Sleeping
Spencer525
commited on
Update app.py
Browse files
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
|
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
|