Skip to content

Commit 900c630

Browse files
committed
New conceptual doc on language models for AI and machine learning
1 parent 07f8ae5 commit 900c630

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

articles/aks/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@
150150
href: concepts-network-services.md
151151
- name: Ingress
152152
href: concepts-network-ingress.md
153+
- name: AI and machine learning
154+
items:
155+
- name: Small and large language models
156+
href: concepts-ai-ml-language-models.md
153157
- name: Advanced Container Networking Services
154158
items:
155159
- name: Advanced Container Networking Services overview
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Concepts - Small and large language models
3+
description: Learn about small and large language models, including when and how you can use them with your Azure Kubernetes Service (AKS) AI and machine learning workloads.
4+
ms.topic: conceptual
5+
ms.date: 06/14/2024
6+
author: schaffererin
7+
ms.author: schaffererin
8+
---
9+
10+
# Concepts - Small and large language models
11+
12+
In this article, you learn about small and large language models, including when to use them and how you can use them with your Azure Kubernetes Service (AKS) AI and machine learning workloads.
13+
14+
15+
## What are language models?
16+
17+
Language models are powerful machine learning models used for natural language processing (NLP) tasks, such as text generation and sentiment analysis. These models represent natural language based on the probability of words or sequences of words occurring in a given context.
18+
19+
*Conventional language models* have been used in supervised settings where they're trained on well-labeled text datasets for specific tasks. *Pretrained language models*, on the other hand, are trained on large-scale text corpora from the internet using deep neural networks and can be fine-tuned on smaller datasets for specific tasks.
20+
21+
The size of a language model is determined by the number of parameters it has, which is the number of weights that determine how the model processes input data and generates output. Parameters are learned during the training process by adjusting the weights to minimize the difference between the model's predictions and the actual data. The more parameters a model has, the more complex and expressive it is, but also the more computationally expensive it is to train and use.
22+
23+
In general, ***small language models*** have *fewer than 100 million parameters*, while ***large language models*** have *more than 100 million parameters*. For example, GPT-2 has four versions with different sizes: small (124 million parameters), medium (355 million parameters), large (774 million parameters), and extra-large (1.5 billion parameters).
24+
25+
## When to use small language models
26+
27+
### Advantages
28+
29+
Small language models are a good choice if you want models that are:
30+
31+
* **Faster and cheaper to train and run**: They require less data and compute power.
32+
* **Easy to deploy and maintain**: They have smaller storage and memory footprints.
33+
* **Less prone to *overfitting***, which is when a model learns the noise or specific patterns of the training data and fails to generalize new data.
34+
* **Interpretable and explainable**: They have fewer parameters and components to understand and analyze.
35+
36+
### Use cases
37+
38+
Small language models are suitable for use cases that require:
39+
40+
* **Limited data or resources**, and you need a quick and simple solution.
41+
* **Well-defined or narrow tasks**, and you don't need a lot of creativity in the output.
42+
* **High-precision and low-recall tasks**, and you value accuracy and quality over coverage and quantity.
43+
* **Sensitive or regulated tasks**, and you need to ensure the transparency and accountability of the model.
44+
45+
The following table lists some popular, high-performance small language models:
46+
47+
| Model family | Model sizes (Number of parameters) | Software license |
48+
|--------------|------------------------------------|------------------|
49+
| Microsoft Phi 3 | Phi-3-mini (3.8 billion), Phi-3-small (7 billion), Phi-3-medium (14 billion) | MIT license |
50+
| Meta LLaMA 3 | | Meta license |
51+
| Mistral open-weight models | Mistral7B (7.3 billion) | Apache 2.0 license |
52+
53+
## When to use large language models
54+
55+
### Advantages
56+
57+
Large language models are a good choice if you want models that are:
58+
59+
* **Powerful and expressive**: They can capture more complex and diverse patterns and relationships in the data.
60+
* **General and adaptable**: They can handle a wider range of tasks and domains and transfer knowledge across them.
61+
* **Creative and innovative**: They can generate more original and varied outputs and sometimes discover new knowledge.
62+
* **Robust and consistent**: They can handle noisy or incomplete inputs and avoid common errors and biases.
63+
64+
### Use cases
65+
66+
Large language models are suitable for use cases that require:
67+
68+
* **Abundant data and resources**, and you have the budget to build and maintain a complex solution.
69+
* **Broad and open-ended tasks**, and you need creativity and diversity in the output.
70+
* **Low-precision and high-recall tasks**, and you value coverage and quantity over accuracy and quality.
71+
* **Challenging or exploratory tasks**, and you want to leverage the model's capacity to learn and adapt.
72+
73+
The following table lists some popular, high-performance large language models:
74+
75+
| Model family | Model sizes (Number of parameters) | Software license |
76+
|--------------|------------------------------------|------------------|
77+
| | | |
78+
| | | |
79+
80+
## X
81+
82+
## Y
83+
84+
## Z
85+
86+
## Next steps
87+
88+
XYZ

0 commit comments

Comments
 (0)