Replies: 1 comment
-
(Well, you can nest lambdas and create inner classes. ) I agree that a canonical solution in Java may require multiple top-level functions. But, that may also be the case for Python, though the OpenAI stop sequences would prevent that. I don't think I want MultiPL-E to generate multiple top-level functions. It is an artificial restriction, but it creates consistency across languages (for what that's worth). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
example Java signature:
The current stop sequence for Java is
semantically it means to stop after having finished generating the current function. However, for the case of HumanEval at least, there are multiple instances where the canonical python solution contain nested functions. This means that for Java (where nested functions are illegal), the model may need to generate helper functions in addition to the main function.
I found the following stop tokens to work better, stops when it needs to, while allowing the model to generate multiple functions
This way, model stops either when it begins to generate the main function, or the end of the Problem class.
This however, may break the philosophy of the testing, if we were to only expect one function to be generated? In which case, the problems with nested functions may just be much more difficult for models to generate (In Java).
Beta Was this translation helpful? Give feedback.
All reactions