nowfound

AI · November 15, 2023

MC

MonkeyPatch – Cheap, fast and predictable LLM functions in Python

Hi HN, Jack here! I'm one of the creators of MonkeyPatch, an easy tool that helps you build LLM-powered functions and apps that get cheaper and faster the more you use them. For example, if you need to classify PDFs, extract product feedback from tweets, or auto-generate synthetic data, you can spin up an LLM-powered Python function in <5 minutes to power your application. Unlike existing LLM clients, these functions generate well-typed outputs with guardrails to mitigate unexpected behavior. After about 200-300 calls, these functions will begin to get cheaper and faster. We've seen 8-10x…

In plain words

MonkeyPatch is a Python tool for building LLM-powered functions that become cheaper and faster with repeated use. Developers can create functions for tasks like PDF classification, data extraction, or synthetic data generation in under five minutes, with outputs that include type safety and guardrails. The tool uses progressive knowledge distillation to automatically fine-tune smaller models in the background, with users typically seeing significant cost and latency improvements after 200-300 function calls.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

Hi HN, Jack here! I'm one of the creators of MonkeyPatch, an easy tool that helps you build LLM-powered functions and apps that get cheaper and faster the more you use them. For example, if you need to classify PDFs, extract product feedback from tweets, or auto-generate synthetic data, you can spin up an LLM-powered Python function in <5 minutes to power your application. Unlike existing LLM clients, these functions generate well-typed outputs with guardrails to mitigate unexpected behavior. After about 200-300 calls, these functions will begin to get cheaper and faster. We've seen 8-10x reduction in cost and latency in some use-cases! This happens via progressive knowledge distillation - MonkeyPatch incrementally fine-tunes smaller, cheaper models in the background, tests them against the constraints defined by the developer, and retains the smallest model that meets accuracy requirements, which typically has significantly lower costs and latency. As an LLM researcher, I kept getting asked by startups and friends to build specific LLM features that they could embed into their applications. I realized that most developers have to either 1) use existing low-level LLM clients (GPT4&#x2F;Claude), which can be unreliable, untyped, and pricey, or 2) pore through LangChain documentation for days to build something. We built MonkeyPatch to make it easy for developers to inject LLM-powered functions into their code and create tests to ensure they behave as intended. Our goal is to help developers easily build apps and functions without worrying about reliability, cost, and latency, while following best software engineering practices. We're only available in Python currently but actively working on a Typescript version. The repo has all the instructions you need to get up and running in a few minutes. The world of LLMs is changing by the day and so we're not 100% sure how MonkeyPatch will evolve. For now, I'm just excited to share what we've been working on with the HN community. Would love to know what you guys think! Open-source repo: https:&#x2F;&#x2F;github.com&#x2F;monkeypatch&#x2F;monkeypatch.py Sample use-cases: https:&#x2F;&#x2F;github.com&#x2F;monkeypatch&#x2F;monkeypatch.py&#x2F;tree&#x2F;master&#x2F;ex... Benchmarks: https:&#x2F;&#x2F;github.com&#x2F;monkeypatch&#x2F;monkeypatch.py#scaling-and-fi...

More ai this month

the category →
  • I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes&#x2F;sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.

    AI · 17d ago · simedw.com

  • Astute585

    Automate your B2B brand going viral, with new media creators

    AI · 18d ago · company-app.joinastute.com

  • Grok Bot547

    AI teammates that you can give real work to

    AI · 25d ago · x.ai

  • Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens&#x2F;sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens&#x2F;sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…

    AI · 26d ago · cactuscompute.com

  • Make your software self-driving

    AI · 30d ago · coldtea.ai

  • Soloop472

    Approval-first Agent OS for solo founders

    AI · 30d ago · soloop.io

Launched alongside, November 2023

the whole month →
  • Flowla1,120

    Digital sales rooms that wow buyers

    Growth · 2023 · flowla.com

  • Discover & book top creators to promote your product

    Growth · 2023 · passionfroot.me

  • Re:catch939

    If Google Form & Calendly had a baby

    Growth · 2023 · recatch.cc

  • Pitch 2.0887

    Create, share and analyze presentations faster than ever

    Work · 2023 · pitch.com

  • CRM built for modern teams & creators powered by AI

    AI · 2023 · leaddelta.com

  • Make your website lightning fast

    Dev tools · 2023 · speedvitals.com