un-index commited on
Commit
be94533
·
1 Parent(s): 1bb82d6
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -146,6 +146,8 @@ def f(context, temperature, top_p, max_length, model_idx, SPACE_VERIFICATION_KEY
146
  # try max_length=len(context)+max_length or =len(context)+max_length or make max_length inf or unspecified
147
  # note: added max_new_tokens parameter to see whether it actually works, if not remove,
148
  # TODO if yes, then make max_length infinite because it seems to be counted as max input length, not output
 
 
149
  generated_text = generator(context, max_length=896, max_new_tokens=max_length, top_p=top_p, temperature=temperature, num_return_sequences=1)
150
  except Exception as e:
151
  return "Exception while generating text: " + str(e)
 
146
  # try max_length=len(context)+max_length or =len(context)+max_length or make max_length inf or unspecified
147
  # note: added max_new_tokens parameter to see whether it actually works, if not remove,
148
  # TODO if yes, then make max_length infinite because it seems to be counted as max input length, not output
149
+ # NOTE max_new_tokens does not seem to generate that many tokens
150
+ # however in the source that's what's used
151
  generated_text = generator(context, max_length=896, max_new_tokens=max_length, top_p=top_p, temperature=temperature, num_return_sequences=1)
152
  except Exception as e:
153
  return "Exception while generating text: " + str(e)