ACompact Guideto Learn Large Language Models
ACompact Guideto Learn Large Language Models
net/publication/385521944
CITATIONS READS
0 129
1 author:
Al Mahmud Suruj
Southwest Jiaotong University
4 PUBLICATIONS 0 CITATIONS
SEE PROFILE
All content following this page was uploaded by Al Mahmud Suruj on 04 November 2024.
2000s
Advancements in machine learning increase the complexity of language models, and the wide
adoption of the internet sees an enormous increase in available training data.
2012
Advancements in deep learning architectures and larger data sets lead to the development of GPT
(Generative Pre-trained Transformer).
2018
Google introduces BERT (Bidirectional Encoder Representations from Transformers), which is a big
leap in architecture and paves the way for future large language models.
2020
OpenAI releases GPT-3, which becomes the largest model at 175B parameters and sets a new
performance benchmark for language-related tasks.
2022
ChatGPT is launched, which turns GPT-3 and similar models into a service that is widely accessible to
users through a web interface and kicks off a huge increase in public awareness of LLMs and generative
AI.
2024
Open source LLMs begin showing increasingly impressive results with releases such as Dolly 2.0, LLaMA,
Alpaca and Vicuna. GPT-4 is also released, setting a new benchmark for both parameter
size and performance.
If they’ve been around for so many years, why are they just now making headlines?
A few recent advancements have really brought the spotlight to generative AI and large language
models:
ADVANCEMENTS IN TECHNIQUES: Over the past few years, there have been significant advancements
in the techniques used to train these models, resulting in big leaps in performance.
Notably, one of the largest jumps in performance has come from integrating human feedback directly
into the training process.
INCREASED ACCESSIBILITY: The release of ChatGPT opened the door for anyone with internet access
to interact with one of the most advanced LLMs through a simple web interface. This brought the
impressive advancements of LLMs into the spotlight, since previously these more powerful LLMs were
only available to researchers with large amounts of resources and those with very deep
technical knowledge.
GROWING COMPUTATIONAL POWER: The availability of more powerful computing resources, such as
graphics processing units (GPUs), and better data processing techniques allowed researchers to train
much larger models, improving the performance of these language models.
IMPROVED TRAINING DATA: As we get better at collecting and analyzing large amounts of data, the
model performance has improved dramatically. In fact, Databricks showed that you can get amazing
results training a relatively small model with a high-quality data set with Dolly 2.0 (and we released
the data set as well with the databricks-dolly-15k data set)
CODE GENERATION AND DEBUGGING: LLMs can be trained on large amounts of code examples and
give useful code snippets as a response to a request written in natural language. With the proper
techniques, LLMs can also be built in a way to reference other relevant data that it may not have been
trained with, such as a company’s documentation, to help provide more accurate responses.
SENTIMENT ANALYSIS: Often a hard task to quantify, LLMs can help take a piece of text and gauge
emotion and opinions. This can help organizations gather the data and feedback needed to improve
customer satisfaction.
TEXT CLASSIFICATION AND CLUSTERING: The ability to categorize and sort large volumes of data
enables the identification of common themes and trends, supporting informed decision-making and
more targeted strategies.
LANGUAGE TRANSLATION: Globalize all your content without hours of painstaking work by simply
feeding your web pages through the proper LLMs and translating them to different languages. As more
LLMs are trained in other languages, quality and availability will continue to improve.
CONTENT GENERATION: Start with a detailed prompt and have an LLM develop an outline for you.
Then continue on with those prompts and LLMs can generate a good first draft for you to build off.
Use them to brainstorm ideas, and ask the LLM questions to help you draw inspiration from.
Applying Large Language Models
There are a few paths that one can take when looking to apply large language models for their given
use case. Generally speaking, you can break them down into two categories, but there’s some
crossover between each. We’ll briefly cover the pros and cons of each and what scenarios fit best for
each.
Proprietary services: As the first widely available LLM powered service, OpenAI’s ChatGPT was the
explosive charge that brought LLMs into the mainstream. ChatGPT provides a nice user interface (or
API) where users can feed prompts to one of many models (GPT-3.5, GPT-4, and more) and typically
get a fast response. These are among the highest-performing models, trained on enormous data sets,
and are capable of extremely complex tasks both from a technical standpoint, such as code generation,
as well as from a creative perspective like writing poetry in a specific style.
The downside of these services is the absolutely enormous amount of compute required not only to
train them (OpenAI has said GPT-4 cost them over $100 million to develop) but also to serve the
responses. For this reason, these extremely large models will likely always be under the control of
organizations, and require you to send your data to their servers in order to interact with their
language models. This raises privacy and security concerns, and also subjects users to “black box”
models, whose training and guardrails they have no control over. Also, due to the compute required,
these services are not free beyond a very limited use, so cost becomes a factor in applying these at
scale.In summary: Proprietary services are great to use if you have very complex tasks, are okay with
sharing your data with a third party, and are prepared to incur costs if operating at any significant scale.
Open-source models: The other avenue for language models is to go to the open-source community,
where there has been similarly explosive growth over the past few years. Communities like Hugging
Face gather hundreds of thousands of models from contributors that can help solve tons of specific
use cases such as text generation, summarization and classification. The open-source community has
been quickly catching up to the performance of the proprietary models, but ultimately still hasn’t
matched the performance of something like GPT-4.
It does currently take a little bit more work to grab an open-source model and start using it, but
progress is moving very quickly to make them more accessible to users. On Databricks, for example,
we’ve made improvements to open-source frameworks like MLflow to make it very easy for someone
with a bit of Python experience to pull any Hugging Face transformer model and use it as a Python
object. Oftentimes, you can find an open-source model that solves your specific problem that is orders
of magnitude smaller than ChatGPT, allowing you to bring the model into your environment and host
it yourself. This means that you can keep the data in your control for privacy and governance concerns
as well as manage your costs.Another huge upside to using open source models is the ability to fine-
tune them to your own data. Since you’re not dealing with a black box of a proprietary service, there
are techniques that let you take open source models and train them to your specific data, greatly
improving their performance on your specific domain. We believe the future of language models is
going to move in this direction, as more and more organizations will want full control and
understanding of their LLMs.
Conclusion and general guidelines: Ultimately, every organization is going to have unique challenges
to overcome, and there isn’t a one-size-fits-all approach when it comes to LLMs. As the world becomes
more data driven, everything, including LLMs, will be reliant on having a strong foundation of data.
LLMs are incredible tools, but they have to be used and implemented on top of this strong data
foundation. Databricks brings both that strong data foundation as well as the integrated tools to let
you use and fine-tune LLMs in your domain.