# Language Models

Language models (LMs) are a type of deep learning model that fundamentally predicts
tokens within some context window, either in a [masked](https://huggingface.co/docs/transformers/main/en/tasks/masked_language_modeling) or
[causal](https://huggingface.co/docs/transformers/en/tasks/language_modeling) manner.

Large language models (LLMs) are a type of language model that have many trainable
parameters, which in recent times can be hundreds of millions to trillions of parameters.
LMs can also perform a wider range of inference-time tasks compared to traditional
ML methods because they can operate on structured and unstructured text data. This
means they can perform tasks like text generation, API function calling,
summarization, and question-answering.

In these examples, you'll learn how to use LMs of different sizes for different
use cases, from sentiment analysis to retrieval augmented generation (RAG).

## Subpages

- [Sentiment Classification with Language Models](https://www.union.ai/docs/v1/union/tutorials/language-models/sentiment-classifier/page.md)
- [HDBSCAN Soft Clustering With Headline Embeddings on GPUs](https://www.union.ai/docs/v1/union/tutorials/language-models/soft-clustering-hdbscan/page.md)
- [Benchmarking LLM training with the Liger Kernel](https://www.union.ai/docs/v1/union/tutorials/language-models/liger-kernel-finetuning/page.md)
- [Fine-Tune BERT on Arabic Reviews with Multi-Node Training and Data Streaming](https://www.union.ai/docs/v1/union/tutorials/language-models/data-streaming/page.md)

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/tutorials/language-models/_index.md
**HTML**: https://www.union.ai/docs/v1/union/tutorials/language-models/
