Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ if not torch.cuda.is_available():
|
|
25 |
|
26 |
|
27 |
if torch.cuda.is_available():
|
28 |
-
model_id = "deepseek-ai/deepseek-coder-
|
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'
|
@@ -73,8 +73,8 @@ def generate(
|
|
73 |
temperature=temperature,
|
74 |
eos_token_id=tokenizer.eos_token_id,
|
75 |
pad_token_id=tokenizer.pad_token_id,
|
76 |
-
num_beams=1,
|
77 |
-
repetition_penalty=1.2,
|
78 |
)
|
79 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
80 |
t.start()
|
|
|
25 |
|
26 |
|
27 |
if torch.cuda.is_available():
|
28 |
+
model_id = "deepseek-ai/deepseek-coder-33b-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'
|
|
|
73 |
temperature=temperature,
|
74 |
eos_token_id=tokenizer.eos_token_id,
|
75 |
pad_token_id=tokenizer.pad_token_id,
|
76 |
+
#num_beams=1,
|
77 |
+
#repetition_penalty=1.2,
|
78 |
)
|
79 |
t = Thread(target=model.generate, kwargs=generate_kwargs)
|
80 |
t.start()
|