LangChain Module I/O — LLM

Tony
7 min readDec 31, 2023

In my previous article, I introduced “Prompt” components in LangChain Module I/O, let’s talk about “Language Models” in this article.

Large language models aren’t limited to just ChatGPT. While using OpenAI’s API is convenient and efficient, what if I want to use a different model, such as the open-source Llama2 or ChatGLM? How would I go about doing that?

The History of LLM Development

Google’s seminal 2018 paper, “Attention is All You Need,” introduced the Transformer architecture, sparking a significant leap in AI development. The Transformer has become the foundational architecture underlying almost all pretrained models. Large-scale language models based on Transformer pretraining are often referred to as “Foundation Models” or “Base Models.”

During their training phase, these models acquire extensive linguistic knowledge, encompassing vocabulary, grammar, sentence structure, and contextual information. This knowledge, learned from vast datasets, provides a versatile and rich linguistic foundation for various downstream tasks, such as sentiment analysis, text classification, named entity recognition, and question-answering…

--

--