salesforce / CodeGen

CodeGen is a family of open-source model for program synthesis. Trained on TPU-v4. Competitive with OpenAI Codex.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limit of code generation

AndreasMeyerSFDC opened this issue · comments

The settings for "model.generate" in the demo script are limiting the amount of code which is generated. The current settings:

model.generate(**inputs, max_length=128)

isn't able to create a function with more than 10 lines of code. Setting a max_length of 32k or higher will increase the calc time in an exponential manner. Is there a way to just return the whole code without setting max_length? The default value for max_length is 20 ... that will only return 1 or 2 lines of code. If the model even usable for functions which are bigger than 20 - 30 lines of code?

commented

I also encountered this problem, how did you solve it?