Explore Library
AI Engineering / Working with LLMsLocal & Open-Source Model Deployment

67 items

1

Streaming Without a Background Thread

Code Quiz
2

4-bit Loading with BitsAndBytesConfig

Code Quiz
3

Generating and Decoding Output

Code Quiz
4

AutoTokenizer and AutoModel Loading

Code Quiz
5

Deploying Open Models on Cloud GPUs

Slides / Video
6

Securing Self-Hosted Model Servers

Slides / Video
7

Configuring Sampling Parameters

Code Quiz
8

Half-Precision Loading with torch_dtype

Code Quiz
9

Device Placement with device_map

Code Quiz
10

Applying a Chat Template

Code Quiz
11

Loading a Model with the Pipeline

Code Quiz
12

Where trust_remote_code Belongs

Code Quiz
13

Slicing Off the Prompt Tokens

Code Quiz
14

Stop Sequence with stop_strings

Code Quiz
15

Local Embedding and Reranker Models

Slides / Video
16

Benchmarking Local Inference Speed

Slides / Video
17

Serving LoRA Adapters Locally

Slides / Video
18

Containerizing Local Model Deployments

Slides / Video
19

Serving Quantized Models: Speed vs Quality

Slides / Video
20

Chat Templates Per Model

Slides / Video
21

OpenAI-Compatible Local API Endpoints

Slides / Video
22

CPU Offloading and Mixed Inference

Slides / Video
23

Model Sharding and Parallelism

Slides / Video
24

Estimating VRAM for a Model

Slides / Video
25

PagedAttention and KV Cache Management

Slides / Video
26

Production Serving Engines for LLMs

Slides / Video
27

Local Inference Runtimes Compared

Slides / Video
28

Model Weight Formats Explained

Slides / Video
29

Landscape of Open Models

Slides / Video
30

Local Embeddings with sentence-transformers

Code Quiz
31

Estimating VRAM from Parameter Count

Code Quiz
32

KV Cache During Generation

Code Quiz
33

GPU Offloading with n_gpu_layers

Code Quiz
34

Authenticating for Gated HF Models

Code Quiz
35

Loading a Model from a Local Path

Code Quiz
36

Merging a LoRA Adapter

Code Quiz
37

Batched Generation Padding Side

Code Quiz
38

max_new_tokens vs max_length

Code Quiz
39

Missing pad token for GPT-2

Code Quiz
40

OpenAI client base_url path

Code Quiz
41

Default context window too small

Code Quiz
42

Reading an Ollama response

Code Quiz
43

Loading a GGUF with llama-cpp

Code Quiz
44

vLLM model name mismatch

Code Quiz
45

Open Model Licensing and Commercial Use

Slides / Video
46

Open-Source vs Open-Weight vs Proprietary

Slides / Video
47

Why Run LLMs Locally

Slides / Video
48

Containerizing Model Deployments

Flashcard
49

Security of Self-Hosted Inference

Flashcard
50

Serving LoRA Adapters Locally

Flashcard
51

Evaluating Quantization Quality Loss

Flashcard
52

Cloud GPU Providers for Self-Hosting

Flashcard
53

Chat Templates per Model

Flashcard
54

Edge and On-Device Constraints

Flashcard
55

Context Length and RoPE Scaling

Flashcard
56

VRAM Estimation

Flashcard
57

PagedAttention and vLLM

Flashcard
58

Open Weights vs Open Source

Flashcard
59

GGUF Quantization Formats

Flashcard
60

Multi-GPU Inference

Flashcard
61

Model Weight Formats

Flashcard
62

OpenAI-Compatible Local API

Flashcard
63

Memory Offloading

Flashcard
64

Open-Source Model Landscape

Flashcard
65

GPU vs CPU vs Apple Silicon

Flashcard
66

Local Inference Runtimes

Flashcard
67

Hugging Face Hub Downloading

Flashcard
Code QuizAdvanced

OpenAI client base_url path

Pointing the OpenAI SDK at a local server without the /v1 path.

Codepython
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:11434",
    api_key="ollama"
)

resp = client.chat.completions.create(
    model="llama3",
    messages=[{"role": "user", "content": "Hi"}]
)

Why do requests to the local server 404 / fail to route?