SheetsTuner is a Google Sheets container-bound script that allows you to fine-tune LLMs (Large Language Models) on Vertex AI directly from your spreadsheet.
SheetsTuner simplifies the process of creating, managing, and uploading training datasets for fine-tuning language models. It leverages Google Sheets as an intuitive interface for preparing your data and Google Cloud Storage for storing the datasets.
- Create training and validation datasets directly in Google Sheets
- Automatically split your data into training, validation, and test sets
- Export datasets in JSONL format required for fine-tuning
- Upload datasets to Google Cloud Storage buckets
- Call fine-tuned models directly from your spreadsheet
This project is built with Apps Script Engine, a modern development environment for Google Apps Script that enables the use of modern JavaScript features, modules, and build tools.
For a detailed explanation of the technique used in this project, check out this blog post: How Apps Script Became the Ultimate LLM Fine-Tuning Tool
- Google account
- Google Cloud Platform project with enabled APIs:
- Google Sheets API
- Google Cloud Storage API
- Service account with appropriate permissions
- Clone this repository
- Install dependencies:
npm i && npm run install:husky
Run the Vite server and the Tailwind server in parallel in different terminal windows:
# Vite server
npm run dev
# Tailwind server
npm run build:css:watch
The npm run format
will run linting and pretty-printing with the --fix
and --write
options.
This project is set up to be deployable to separate Google Apps Script projects acting as different environments. It works by copying relevant environmental files like .clasp.json
from env-mgt/<environment_name>
to the specified path (the root by default). Any number of files can be added to each environment. Configure the environment in the env-mgt/ENV.js
file.
To build the app for production, run:
npm run build:ui # to build the client-side
npm run build:gas # to build Google Apps Script library code
Or, if you want to build then push, run:
npm run build:push
The Apps Script code will be stored in a variable that executes an IIFE lib
by default. Hence, to call an exported function from the bundled Apps Script code use lib.<functionName>(args)
syntax.
npm t
If you ran npm run install:husky
, you will have configured a pre-commit
git hook. Every time you commit your code, it will run formatting and testing by executing npm run format && npm t
.
👤 Dmitry Kostyuk
- Website: https://www.wurkspaces.dev
- Github: @WildH0g
- LinkedIn: @dmitrykostyuk
- StackOverflow: Dmitry Kostyuk
Give a ⭐️ if this project helped you!