AI Squared's
dlite-v1-774
(
blog post
) is a large language
model which is derived from OpenAI's large
GPT-2
model and fine-tuned on a single GPU on a corpus of 50k records
(
Stanford Alpaca
) to help it exhibit chat-based capabilities.
While
dlite-v1-774m
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.
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-v1-774m
is not a state-of-the-art language model.
dlite-v1-774m
is an experimental technology and is not designed for use in any
environment other than for research purposes. 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:
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.
You can then use the pipeline to answer instructions:
res = generate_text("Who was George Washington?")
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-v1-774m", padding_side="left")
model = AutoModelForCausalLM.from_pretrained("aisquared/dlite-v1-774m", device_map="auto", torch_dtype=torch.bfloat16)
generate_text = InstructionTextGenerationPipeline(model=model, tokenizer=tokenizer)
Model Performance Metrics
We present the results from various model benchmarks on the EleutherAI LLM Evaluation Harness for all models in the DLite family.
Model results are sorted by mean score, ascending, to provide an ordering. These metrics serve to further show that none of the DLite models are
state of the art, but rather further show that chat-like behaviors in LLMs can be trained almost independent of model size.
dlite-v1-774m huggingface.co is an AI model on huggingface.co that provides dlite-v1-774m's model effect (), which can be used instantly with this aisquared dlite-v1-774m model. huggingface.co supports a free trial of the dlite-v1-774m model, and also provides paid use of the dlite-v1-774m. Support call dlite-v1-774m model through api, including Node.js, Python, http.
dlite-v1-774m huggingface.co is an online trial and call api platform, which integrates dlite-v1-774m's modeling effects, including api services, and provides a free online trial of dlite-v1-774m, you can try dlite-v1-774m online for free by clicking the link below.
aisquared dlite-v1-774m online free url in huggingface.co:
dlite-v1-774m is an open source model from GitHub that offers a free installation service, and any user can find dlite-v1-774m on GitHub to install. At the same time, huggingface.co provides the effect of dlite-v1-774m install, users can directly use dlite-v1-774m installed effect in huggingface.co for debugging and trial. It also supports api for free installation.