From the course: Azure AI for Developers: LLMs and SLMs

What is a small language model (SLM)?

- [Narrator] SLMs or small language models are AI models similar to their large language model counterparts. They're trained on smaller data sets, and a small language model typically has a parameter count in the range of millions to a few billion, whereas LLMs can have hundreds of billions or even trillions of parameters. SLMs are designed to perform a variety of tasks like natural language understanding or sentiment analysis. They also have low computational requirements for devices with limited processing power, such as tablets, embedded systems, or edge devices. Some of the advantages are that it's a smaller size model that you're dealing with, so it makes them more portable and can run on almost any device using less CPU and memory storage. Most SLMs are task focused for specific tasks such as translation, summarization, or sentiment analysis. As opposed to large language models that can be multimodal, SLMs are also easier to fine tune for industry specific requirements. For example, if you're utilizing a small language model in either the medical field or the engineering field, you may want to fine tune it to utilize terminology used in that field. Also, because small language models are small, they are efficient and can typically run faster than LLMs. Like everything else, it also has disadvantages. So SLMs have limited understanding of complexity, and they may struggle to grasp complex or nuanced language constructs leading to less accurate or insightful responses. Also, they have less capacity to learn from vast amounts of data, which can result in lower performance on tasks that require deep understanding or contextual awareness. SLMs might also struggle to maintain context over longer conversations or documents because of this lower capacity leading to fragmented or inconsistent responses. Another disadvantage is that SLMs have a lack of generalization, meaning the responses generated may be more straightforward and less sophisticated compared to those from larger language models. They might like the ability to produce detailed creative or engaging text. Also, SLMs often have more limited capabilities in terms of understanding different languages, handling diverse inputs, and performing a wide range of tasks.

Contents