Spaces:
Sleeping
Sleeping
Commit
·
c03d4e3
1
Parent(s):
574567c
Switched from GPU Float16 to CPU Float32
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import torch
|
|
4 |
|
5 |
# deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct
|
6 |
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-1.3b-instruct") # Or your own!
|
7 |
-
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-1.3b-instruct",
|
8 |
|
9 |
def generate_code(prompt, style="Clean & Pythonic"):
|
10 |
if style == "Verbose like a 15th-century manuscript":
|
|
|
4 |
|
5 |
# deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct
|
6 |
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-1.3b-instruct") # Or your own!
|
7 |
+
model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-1.3b-instruct", torch_dtype=torch.float32, trust_remote_code=True)
|
8 |
|
9 |
def generate_code(prompt, style="Clean & Pythonic"):
|
10 |
if style == "Verbose like a 15th-century manuscript":
|