Live data from Hacker News

Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python

github.com

71–74 of 74 posts

Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python

#71
post #68

Earlier quoted context omitted.

I don't think you grasp the point.

I understand the point. I would ideally like an association with monkey-patching something as that is relevant to the behaviour of the package. However, not so similar that it shadows the technique of monkey-patching!

LlamaPatch? Once open source model support is added of course :)

Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python

#73

The guardrails are cool! I think more details of where the data goes and when it goes from few-shot to fine-tune will be helpful.

Good to know, we'll make it more clear in the docs! To answer regarding these 2 areas, 1) The data for finetuning currently is saved on disk for low latency reading and writing. Both test statements and datapoints from the function execution are saved to the dataset. We also are aware that saving to disk is not the best option and limits many use-cases so we're currently working on creating persistence layers to allo…

dope yea that's awesome!

Re: Show HN: MonkeyPatch – Cheap, fast and predictable LLM functions in Python

#74

Earlier quoted context omitted.

I built a similar library for Typescript: https://github.com/jumploops/magic Please note: it requires the use of ttypescript or ts-patch, as Typescript transformers aren’t supported by default!

Cool! Thanks for sharing. What do you mean that Ts transformers aren’t supported by default? Is this like a runtime modification of types?

tl;dr - TypeScript transformers are used to modify the AST before Javascript is emitted.

The magic functions library uses a transformer to take the TypeScript types and port them to JSON schema, such that they're available during runtime. This JSON schema is then used to validate that the response from the LLM matches the expected type signature of the function (and err if it doesn't).

Because TypeScript doesn't support 3rd party "transformers" by default, you're forced to hack around it (via ttypescript or ts-patch). This is especially problematic when TypeScript has a major version change, as the workarounds need to be modified accordingly; this often takes significant time.

Here's the long-lived Github issue: https://github.com/microsoft/TypeScript/issues/14419

And here's the newest proposal to add official support: https://github.com/microsoft/TypeScript/issues/54276

Post reply on HN