gitmyhub

pi-tinker

TypeScript ★ 21 updated 11h ago

Fine-tune open-source models with Tinker from inside Pi — managed improve loops, data prep, evals, smoke tests, deploy snippets, and checkpoint chat.

A TypeScript package for the Pi coding environment that walks you step by step through fine-tuning an AI model on your own examples using the Tinker platform, from data upload to deployment, without needing to know the underlying tooling.

TypeScriptPythonFastAPINode.jssetup: moderatecomplexity 3/5

Fine-tuning an AI model means taking an existing open-source model and training it further on your own examples, so it gets better at a specific task. This process normally requires learning a fair amount of tooling and terminology. Pi-tinker is a package for the Pi coding environment that tries to hide most of that complexity and guide you through fine-tuning a model on Tinker, a training platform, step by step.

The target user is someone who already has examples of good inputs and outputs, such as support ticket responses, extraction results, or writing samples, but has not yet worked through a full model training pipeline. You bring a CSV, JSON, or JSONL file with your examples, and pi-tinker handles data conversion and validation, runs baseline tests before training starts, runs small smoke tests to catch problems early, monitors the training job, and then helps you compare the trained model against the original to see whether things improved.

The main entry point is a command called /tinker improve, which takes your data file and a plain-English goal and works through the whole process in stages. There are budget levels: demo does everything without any API calls so you can see what would happen, smoke runs a short test train, small does a proper short run, and real does a longer run with confirmation before each expensive step. Individual sub-commands also exist for each stage if you want to drive the process manually.

Once training finishes, a deploy command generates ready-to-use code snippets in Python and Node.js, plus a FastAPI wrapper and a README, so you can connect the trained checkpoint to an application through Tinker's API. You can also load the checkpoint directly into Pi to chat with it and test its responses.

Pi and a Tinker API key are required to use this package. Python 3.11 or newer is recommended for the training scripts it generates.

Where it fits