This is really interesting! What would be a good example of when I would want to use monkeypatch vs langchain or OpenAI functions?
Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python
11–20 of 74 posts
Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python
#12This is really interesting! What would be a good example of when I would want to use monkeypatch vs langchain or OpenAI functions?
Thanks! A big part of MonkeyPatch, which Langchain or OpenAI are lacking, is the model distillation aspect, which can reduce costs up to 10x and latency up to 6x in some of the tests we've been running. This means the more you use MonkeyPatch the cheaper the function calls get, which is beneficial for high usage applications with lots of calls
Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python
#13Earlier quoted context omitted.
Thanks! A big part of MonkeyPatch, which Langchain or OpenAI are lacking, is the model distillation aspect, which can reduce costs up to 10x and latency up to 6x in some of the tests we've been running. This means the more you use MonkeyPatch the cheaper the function calls get, which is beneficial for high usage applications with lots of calls
How does that work?
Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python
#14Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python
#15Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python
#16Would love to try a typescript implementation. Any plans to do that?
We will keep you posted on when it'll be ready for trying out!
Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python
#17Earlier quoted context omitted.
How does that work?
Currently we distill the general GPT-4 down to function specific GPT3.5 turbo model using pseudo-labelling. The input-output pairs from the aligned few-shot GPT-4 are saved and this dataset is used to finetune a function-specific GPT3.5 model. Then that finetuned GPT3.5 is switched as the primary model used to carry out the function, which results in multiple times lower costs as the need for few-shot examples is rem…
Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python
#18Earlier quoted context omitted.
Currently we distill the general GPT-4 down to function specific GPT3.5 turbo model using pseudo-labelling. The input-output pairs from the aligned few-shot GPT-4 are saved and this dataset is used to finetune a function-specific GPT3.5 model. Then that finetuned GPT3.5 is switched as the primary model used to carry out the function, which results in multiple times lower costs as the need for few-shot examples is rem…
How much control do I have over this process? I might not want this to be abstracted.
Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python
#19Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python
#20Would love to try a typescript implementation. Any plans to do that?
Please note: it requires the use of ttypescript or ts-patch, as Typescript transformers aren’t supported by default!