How Large Language Models Work

Contents

How Large Language Models Work#

This chapter provides an introduction to large language models (LLMs) and their applications in finance.

Note

This chapter is under construction.

Topics to Cover#

  • What is a language model?

  • From n-grams to neural networks

  • The transformer architecture

  • Attention mechanisms

  • Pre-training and fine-tuning

  • Tokenization and embeddings

  • Prompt engineering basics

  • Using LLMs via APIs

  • Applications in finance

    • Document summarization

    • Information extraction

    • Code generation

  • Limitations and considerations

# Placeholder for imports
import pandas as pd
import numpy as np