fix the crash issue caused by temperature being 0
This commit is contained in:
parent
539c538d65
commit
4e75531651
@ -204,7 +204,10 @@ def set_rwkv_config(model: RWKV, body: ModelConfigBody):
|
|||||||
if body.max_tokens is not None:
|
if body.max_tokens is not None:
|
||||||
model.max_tokens_per_generation = body.max_tokens
|
model.max_tokens_per_generation = body.max_tokens
|
||||||
if body.temperature is not None:
|
if body.temperature is not None:
|
||||||
model.temperature = body.temperature
|
if body.temperature < 0.1:
|
||||||
|
model.temperature = 0.1
|
||||||
|
else:
|
||||||
|
model.temperature = body.temperature
|
||||||
if body.top_p is not None:
|
if body.top_p is not None:
|
||||||
model.top_p = body.top_p
|
model.top_p = body.top_p
|
||||||
if body.presence_penalty is not None:
|
if body.presence_penalty is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user