Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ model = AutoModelForCausalLM.from_pretrained("BirdL/DeepSeek-Coder-V2-Lite-Instr
|
|
9 |
@spaces.GPU
|
10 |
def respond(message, history):
|
11 |
inputs = tokenizer(message, return_tensors="pt").input_ids.to("cuda")
|
12 |
-
outputs = model.generate(inputs, max_new_tokens=
|
13 |
ouputs = (tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True))
|
14 |
return outputs
|
15 |
|
|
|
9 |
@spaces.GPU
|
10 |
def respond(message, history):
|
11 |
inputs = tokenizer(message, return_tensors="pt").input_ids.to("cuda")
|
12 |
+
outputs = model.generate(inputs, max_new_tokens=224, do_sample=False, top_k=50, top_p=0.95, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id)
|
13 |
ouputs = (tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True))
|
14 |
return outputs
|
15 |
|