Skip the API: generate synthetic instruction datasets locally
Bonito generates synthetic instruction-tuning datasets from raw text using a local model, removing the need for GPT API access to create task-specific training material.

What it does
Bonito is a model and lightweight library that reads unannotated text and fabricates task-specific instruction tuning datasets—like NLI pairs, QA examples, or summarization tasks—using its own open weights. It sits on top of Hugging Face transformers and vllm, letting you synthesize training material locally without calling out to proprietary APIs. You point it at a column of raw text, pick a task type from a fixed menu, and it emits structured examples ready for fine-tuning.
The interesting bit
The twist is that it treats dataset creation as conditional generation: instead of prompting a generalist LLM to “make some QA data,” Bonito is explicitly trained to map raw context to a chosen task format, which should keep the outputs closer to the target domain. The library is essentially a thin orchestration layer around that specialized model.
Key highlights
- Covers a broad menu of task types—NLI, coreference, sentiment, summarization, multiple-choice QA, and others—without hand-writing prompts for each.
- Runs fully offline using local inference via
vllmor standardtransformers; no OpenAI dependency. - Ships a quantized variant that fits in a Colab T4, lowering the hardware barrier for experimentation.
- Accepted to ACL Findings 2024; the underlying model is on Hugging Face and the library is on PyPI as
bonito-llm.
Caveats
- The README doesn’t specify dataset size limits, throughput, or how well the synthetic data transfers to downstream model performance, so practical scaling is unclear.
- Task types are drawn from a fixed list of 16 formats; extensibility to custom schemas isn’t mentioned.
Verdict
Worth a look if you need to bootstrap domain-specific instruction data but want to keep everything local and off the OpenAI meter. If you already have clean, annotated gold data or need a task format outside the supported list, it won’t move the needle.
Frequently asked
- What is BatsResearch/bonito?
- Bonito generates synthetic instruction-tuning datasets from raw text using a local model, removing the need for GPT API access to create task-specific training material.
- Is bonito open source?
- Yes — BatsResearch/bonito is open source, released under the BSD-3-Clause license.
- What language is bonito written in?
- BatsResearch/bonito is primarily written in Python.
- How popular is bonito?
- BatsResearch/bonito has 831 stars on GitHub.
- Where can I find bonito?
- BatsResearch/bonito is on GitHub at https://github.com/BatsResearch/bonito.