explaingit

databrickslabs/dolly

10,792PythonAudience · researcherComplexity · 4/5LicenseSetup · hard

TLDR

Dolly is an open-source instruction-following AI model from Databricks, trained on 15,000 human-written examples and licensed for commercial use, though it is not competitive with larger modern models.

Mindmap

mindmap
  root((repo))
    What It Does
      Follows written instructions
      Answers questions
      Summarizes text
      Classifies and extracts
    Training Data
      15k human-written pairs
      Creative Commons license
    Requirements
      GPU with 24GB VRAM
      Python Transformers
      Databricks for training
    Limitations
      Weak math reasoning
      May hallucinate facts
      Smaller than new models
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run a locally-hosted instruction-following AI model you can use commercially without paying per-token API fees.

USE CASE 2

Fine-tune or study the model to understand how instruction tuning transforms a base language model.

USE CASE 3

Use the databricks-dolly-15k dataset to train or benchmark your own instruction-following model.

USE CASE 4

Experiment with summarization, classification, or question-answering tasks using a fully open model you can inspect.

Tech stack

PythonPyTorchHugging Face TransformersDatabricks

Getting it running

Difficulty · hard Time to first run · 1h+

Requires a GPU with at least 24GB VRAM such as an A100 or A10, 8-bit mode is available for smaller GPUs with some quality tradeoff.

The model weights and training dataset are released for commercial use, the dataset uses a Creative Commons license permitting broad reuse including in products.

In plain English

Dolly is an instruction-following language model released by Databricks in 2023. It is built on top of an existing model called Pythia-12B and trained further on a dataset of roughly 15,000 question-and-answer pairs written by Databricks employees. The result is a model that can follow written instructions in a way the base model could not, and it is licensed for commercial use, which was notable at the time of its release. The training dataset, called databricks-dolly-15k, covers several categories of tasks: answering questions from a given passage, open-ended question answering, summarization, classification, text generation, information extraction, and brainstorming. The data was written by people, not generated by another AI, and is released under a permissive Creative Commons license. The repository documents the model's known limitations honestly. Dolly v2 (the 12B parameter version) struggles with complex reasoning, mathematical problems, factual accuracy, and generating responses in specific formats. The maintainers describe it as exhibiting surprisingly good instruction-following behavior for a model of its size, but they are clear that it is not competitive with larger or more recent models. To run the model yourself, you can load it from Hugging Face using the standard transformers Python library. Full inference requires a GPU with at least 24 GB of memory, such as an A100 or A10. For smaller GPUs, the model can be loaded in 8-bit mode with some quality tradeoff. Training the model from scratch is also documented for users with access to Databricks and a multi-GPU cluster. The training notebook runs on Databricks notebooks and supports A100, A10, and V100 GPU types, with configuration files provided for each.

Copy-paste prompts

Prompt 1
I want to run databrickslabs/dolly v2 locally for text summarization. I have an A10 GPU with 24GB. Walk me through loading the model from Hugging Face with the transformers library and running my first inference call.
Prompt 2
I have a smaller GPU and want to load databrickslabs/dolly in 8-bit mode to reduce memory usage. Show me the Python code using BitsAndBytes and the transformers library to do this.
Prompt 3
I want to fine-tune my own model using the databrickslabs/dolly training approach on Databricks. What format should my training data be in, and which training script do I run?
Prompt 4
Dolly v2 has known weaknesses in math and factual accuracy. Based on these limitations, help me decide which tasks it is good enough for and which I should use a larger API-based model for instead.
Open on GitHub → Explain another repo

← databrickslabs on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.