Announcing DLite V2: Lightweight, Open LLMs That Can Run Anywhere

Jacob Renn
ai squared
Published in
5 min readMay 10, 2023

Summary

AI Squared is committed to democratizing AI technologies so that they can be used by all. As part of this effort, we are extremely excited to announce DLite V2 family of large language models. Just like our DLite V1 models, DLite V2 are lightweight instruction following models which exhibit ChatGPT-like interactivity. What makes them different from DLite V1, however, is that the V2 family of models is licensed for commercial use, not just for research purposes!

Introduction

AI Squared’s mission is to help make the results of artificial intelligence (AI) more accessible and actionable for everyone. Part of that mission includes democratizing models and other AI resources so that anyone can use them. That is why we are pleased to officially announce our DLite V2 family of large language models (LLMs). Just a few weeks ago, we released our DLite V1 family of models, which are lightweight LLMs ranging from 124 million parameters to 1.5 billion parameters that exhibit ChatGPT-like interactivity. The small size of these models means that they can be run on almost any device, including laptop CPUs, instead of being limited to deployment on specialized, expensive cloud resources.

Our DLite V2 model family also has four different models ranging from 124 million to 1.5 billion parameters, but this time, we utilized the databricks-dolly-15k dataset released by Databricks. We have also uploaded this dataset to our HuggingFace page so anyone can easily use it. Because this training dataset is also licensed for commercial purposes, we are also happy to announce that all models in the DLite V2 family can also be used for commercial purposes, enabling organizations to build upon these models with no licensing constraints whatsoever. DLite V2 is truly free for any purpose!

Because our smallest DLite model is just 124 million parameters, it is extremely easy and cost-efficient to train and utilize the model. Just as with our V1 version, we trained this model on a single T4 GPU, this time with a cost of less than $10. And while DLite V2 does not achieve state-of-the-art performance, the openness of the models enables organizations to be able to fine tune this model on their own data to specialize the models for their own tasks. We believe this is an important step in the democratization of AI for all!

For full transparency, we have run the all DLite V1 and V2 models, as well as all GPT2 models through an evaluation process using the EleutherAI LLM Evaluation Harness on a subset of the available tasks. The results of those evaluations are contained in the following table. Models are arranged by mean score, ascending, with the lowest performing models appearing at the top of the table and the highest performing models appearing at the bottom.

| Model         |   arc_challenge |   arc_easy |    boolq |   hellaswag |   openbookqa |     piqa |   winogrande |
|:--------------|----------------:|-----------:|---------:|------------:|-------------:|---------:|-------------:|
| dlite-v2-124m | 0.199659 | 0.447811 | 0.494801 | 0.291675 | 0.156 | 0.620239 | 0.487766 |
| gpt2 | 0.190273 | 0.438131 | 0.487156 | 0.289185 | 0.164 | 0.628945 | 0.51618 |
| dlite-v1-124m | 0.223549 | 0.462542 | 0.502446 | 0.293268 | 0.17 | 0.622416 | 0.494081 |
| gpt2-medium | 0.215017 | 0.490741 | 0.585933 | 0.333101 | 0.186 | 0.676279 | 0.531176 |
| dlite-v2-355m | 0.251706 | 0.486111 | 0.547401 | 0.344354 | 0.216 | 0.671926 | 0.52723 |
| dlite-v1-355m | 0.234642 | 0.507576 | 0.600306 | 0.338478 | 0.216 | 0.664309 | 0.496448 |
| gpt2-large | 0.216724 | 0.531566 | 0.604893 | 0.363971 | 0.194 | 0.703482 | 0.553275 |
| dlite-v1-774m | 0.250853 | 0.545875 | 0.614985 | 0.375124 | 0.218 | 0.698041 | 0.562747 |
| dlite-v2-774m | 0.269625 | 0.52904 | 0.613761 | 0.395937 | 0.256 | 0.691513 | 0.566693 |
| gpt2-xl | 0.25 | 0.582912 | 0.617737 | 0.400418 | 0.224 | 0.708379 | 0.583268 |
| dlite-v1-1_5b | 0.268771 | 0.588384 | 0.624159 | 0.401414 | 0.226 | 0.708379 | 0.584846 |
| dlite-v2-1_5b | 0.289249 | 0.565657 | 0.601223 | 0.434077 | 0.272 | 0.703482 | 0.588003 |

Using and Training DLite V2

As all of our DLite V1 and V2 models are hosted on HuggingFace, it is extremely simple to use these models. The preferred method is to utilize the pipeline interface in the transformers library as described in each of the model’s model card, as we have developed specialized pipelines to ensure prompts are preprocessed and formatted exactly how the model has trained. The following code shows how to utilize DLite in a pipeline in this way:

# Working in a Python environment with transformers installed

# Import pipeline from transformers
from transformers import pipeline

# Create the DLite pipeline
DLite = pipeline(model='aisquared/dlite-v2-1_5b', trust_remote_code=True)

# Use DLite on a prompt
prompt = 'How are you today?'
response = DLite(prompt)

# Print DLite's response
print(response)

Here are the links to each of our DLite V2 models:

For those who want to train their own versions of DLite (V1 or V2), we have completely open sourced the training code on our GitHub repository as well! By default, the notebook in the repository will train the 124 million parameter version of DLite V2. To train DLite V1, simply change the dataset to the alpaca dataset. To train a different base model (by default, we use the smallest version of GPT2), simply change the model_id parameter in the notebook. It’s really that simple!

We are also excited to announce that our training code leverages the new capabilities of MLFlow 2.3.0 to log the trained model as well as training parameters such as the base model, the training dataset, and the number of epochs. These new capabilities from the MLFlow team have been integral to our development and experimentation processes, as they have enabled us to streamline our model versioning and evaluation processes. The final cell of the training notebook performs those operations.

DLite V2 and AI Squared

At AI Squared, we believe in the transformative power of bringing AI into everyone’s workflows. We are therefore very excited to showcase an integration we have created for DLite V2. By utilizing our platform and browser-based technology, we have enabled a way for anyone to interact with DLite, or their own model, in any browser-based workflow. Take a look below!

Chat-based Integration of DLite V2 using AI Squared.

For those who are interested, we have also released a publicly-available version of our browser extension which interacts with ChatGPT. The extension can be found here and is free for anyone to install and use! If you are interested in utilizing AI Squared to integrate DLite or your own custom version of DLite, feel free to reach out to us at support@squared.ai!

Disclaimer:

DLite is an experimental technology and is not designed for use in any environment without significant testing and safety consideration. Furthermore, the model can sometimes exhibit undesired behaviors. Some of these behaviors include, but are not limited to: factual inaccuracies, biases, offensive responses, toxicity, and hallucinations. Just as with any other LLM, we advise users of this technology to exercise good judgment when applying this technology.

--

--

Jacob Renn
ai squared

Chief Technologist and Head of Research and Open Source at AI Squared