Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ if not torch.cuda.is_available():
|
|
26 |
|
27 |
if torch.cuda.is_available():
|
28 |
model_id = "deepseek-ai/DeepSeek-Coder-V2-Instruct"
|
29 |
-
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", load_in_4bit=True)
|
30 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
31 |
tokenizer.padding_side = 'right'
|
32 |
# pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
|
|
26 |
|
27 |
if torch.cuda.is_available():
|
28 |
model_id = "deepseek-ai/DeepSeek-Coder-V2-Instruct"
|
29 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", load_in_4bit=True,trust_remote_code=True)
|
30 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
31 |
tokenizer.padding_side = 'right'
|
32 |
# pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|