anarchy-ai / LLM-VM

irresponsible innovation. Try now at https://chat.dev/
https://anarchy.ai/
MIT License
465 stars 150 forks source link

Update data_synthesis.py #355

Closed Abdevna closed 7 months ago

Abdevna commented 8 months ago

Closes #353 Please check it @VictorOdede @abhigya-sodani

abhigya-sodani commented 8 months ago

I am a little confused how this will fix the issue?

the error: TypeError: BaseOnsiteLLM.generate() got an unexpected keyword argument 'temperature', seems like a parameter issue in our BaseOnsiteLLM class in onesite_llm.py.

What was your diagnosis of the root of this problem, maybe that will help me understand better

Abdevna commented 8 months ago

@abhigya-sodani I provided code modifications that assumed the temperature argument should be accepted by the generate method. I overlooked the fact that the generate method of the BaseOnsiteLLM class in onesite_llm.py doesn't accept a temperature argument. To resolve that we can modify the generate method in the BaseOnsiteLLM class to accept the temperature argument, something like this:

def generate(self, prompt, max_len, temperature=1.0, **kwargs):

This can, I believe ensure that the generate method can accept the temperature argument when called.

VictorOdede commented 7 months ago

This issue was closed by #366