Model Card for DLite-DAIS-2023
AI Squared's dlite-v2-355m is a large language model which is derived from OpenAI's medium-sized GPT-2 model and fine-tuned on a corpus of 15k records (Databricks' "Dolly 15k" Dataset) to help it exhibit chat-based capabilities.
Just like Databricks' Dolly V2 models, dlite-v2-355m (and all other members of the dlite-v2 family) is licensed for both research and commercial use. We are extremely grateful for the work that Databricks has done to create the databricks-dolly-15k dataset, for without it we would not be able to create and release this model under such an open and permissive license.
While dlite-v2-355m is not a state-of-the-art model, we believe that the level of interactivity that can be achieved on such a small model that is trained so cheaply is important to showcase, as it continues to demonstrate that creating powerful AI capabilities may be much more accessible than previously thought.
To develop dlite-dais-2023
, we took dlite-v2-355m and trained it on two successive datasets:
The
aisquared/dais-2023
dataset, which contains information from the Databricks website and surrounding links regarding the Data and AI Summit 2023The
aisquared/dais-question-answers
dataset, which contains question-answer pairs from ChatGPT compiled using information from theaisquared/dais-2023
datasetUnfortunately, due to our use of ChatGPT to generate question-answer pairs, this model is not available for commercial use.
Model Description Developed by: AI Squared, Inc. Shared by: AI Squared, Inc. Model type: Large Language Model Language(s) (NLP): EN License: Apache v2.0 Finetuned from model: GPT-2 Bias, Risks, and Limitations dlite-v2-355m is not a state-of-the-art language model. dlite-v2-355m is an experimental technology, and as with any experimental technology, AI Squared urges potential users of this technology to test its capabilities thoroughly before usage. 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.
Usage To use the model with the transformers library on a machine with GPUs, first make sure you have the transformers and accelerate libraries installed. From your terminal, run:
pip install "accelerate" "transformers[torch]" "torch" The instruction following pipeline can be loaded using the pipeline function as shown below. This loads a custom InstructionTextGenerationPipeline found in the model repo here, which is why trust_remote_code=True is required. Including torch_dtype=torch.bfloat16 is generally recommended if this type is supported in order to reduce memory usage. It does not appear to impact output quality. It is also fine to remove it if there is sufficient memory.
from transformers import pipeline
import torch
generate_text = pipeline(model="aisquared/dlite-dais-2023", torch_dtype=torch.float16, trust_remote_code=True, device_map="auto")
# You can then use the pipeline to answer instructions:
res = generate_text("Tell me about the Data And AI Summit 2023.")
print(res)
Alternatively, if you prefer to not use trust_remote_code=True you can download instruct_pipeline.py, store it alongside your notebook, and construct the pipeline yourself from the loaded model and tokenizer:
from instruct_pipeline import InstructionTextGenerationPipeline
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
tokenizer = AutoTokenizer.from_pretrained("aisquared/dlite-v2-1_5b", padding_side="left")
model = AutoModelForCausalLM.from_pretrained("aisquared/dlite-v2-1_5b", device_map="auto", torch_dtype=torch.bfloat16)
generate_text = InstructionTextGenerationPipeline(model=model, tokenizer=tokenizer)
- Downloads last month
- 14