Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ if not torch.cuda.is_available():
|
|
22 |
|
23 |
|
24 |
if torch.cuda.is_available():
|
25 |
-
model_id = "deepseek-ai/deepseek-coder-
|
26 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
|
27 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
28 |
tokenizer.use_default_system_prompt = False
|
@@ -63,6 +63,7 @@ def generate(
|
|
63 |
temperature=temperature,
|
64 |
num_beams=1,
|
65 |
repetition_penalty=repetition_penalty,
|
|
|
66 |
)
|
67 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
68 |
t.start()
|
|
|
22 |
|
23 |
|
24 |
if torch.cuda.is_available():
|
25 |
+
model_id = "deepseek-ai/deepseek-coder-1.3b-instruct"
|
26 |
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
|
27 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
28 |
tokenizer.use_default_system_prompt = False
|
|
|
63 |
temperature=temperature,
|
64 |
num_beams=1,
|
65 |
repetition_penalty=repetition_penalty,
|
66 |
+
eos_token_id=32021
|
67 |
)
|
68 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
69 |
t.start()
|