Commit a3770921 authored by rprenger's avatar rprenger
Browse files

Fixing logic in server accepting tokens_to_generate=0

parent 87d08f4b
......@@ -69,8 +69,9 @@ class MegatronGenerate(Resource):
logprobs = request.get_json()["logprobs"]
if not isinstance(logprobs, bool):
return "logprobs must be a boolean value"
if just_score and not logprobs:
return "tokens_to_generate=0 implies logprobs=True"
if just_score and not logprobs:
return "tokens_to_generate=0 implies logprobs=True"
temperature = 1.0
if "temperature" in request.get_json():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment