Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
| 4 |
import torch
|
| 5 |
|
| 6 |
tokenizer = AutoTokenizer.from_pretrained("BirdL/DeepSeek-Coder-V2-Lite-Instruct-FlashAttnPatch", trust_remote_code=True)
|
| 7 |
-
model = AutoModelForCausalLM.from_pretrained("BirdL/DeepSeek-Coder-V2-Lite-Instruct-FlashAttnPatch", trust_remote_code=True,
|
| 8 |
|
| 9 |
@spaces.GPU
|
| 10 |
def respond(message, history):
|
|
|
|
| 4 |
import torch
|
| 5 |
|
| 6 |
tokenizer = AutoTokenizer.from_pretrained("BirdL/DeepSeek-Coder-V2-Lite-Instruct-FlashAttnPatch", trust_remote_code=True)
|
| 7 |
+
model = AutoModelForCausalLM.from_pretrained("BirdL/DeepSeek-Coder-V2-Lite-Instruct-FlashAttnPatch", trust_remote_code=True, device_map="auto", load_in_8bit=True).cuda()
|
| 8 |
|
| 9 |
@spaces.GPU
|
| 10 |
def respond(message, history):
|