Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -24,14 +24,14 @@ if not torch.cuda.is_available():
|
|
24 |
device = torch.device("cpu")
|
25 |
else:
|
26 |
device = torch.device("cuda")
|
27 |
-
model_id = "deepseek-ai/
|
28 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
|
29 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
30 |
tokenizer.use_default_system_prompt = False
|
31 |
|
32 |
# Fallback to CPU for model loading if CUDA is unavailable
|
33 |
if not torch.cuda.is_available():
|
34 |
-
model_id = "deepseek-ai/
|
35 |
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cpu")
|
36 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
37 |
|
|
|
24 |
device = torch.device("cpu")
|
25 |
else:
|
26 |
device = torch.device("cuda")
|
27 |
+
model_id = "deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct"
|
28 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
|
29 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
30 |
tokenizer.use_default_system_prompt = False
|
31 |
|
32 |
# Fallback to CPU for model loading if CUDA is unavailable
|
33 |
if not torch.cuda.is_available():
|
34 |
+
model_id = "deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct"
|
35 |
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="cpu")
|
36 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
37 |
|