Skip to content

Commit

Permalink
add correction to safety chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
souzatharsis committed Jan 10, 2025
1 parent e6f1bbb commit a4e93b1
Show file tree
Hide file tree
Showing 27 changed files with 39 additions and 11 deletions.
Binary file modified tamingllms/_build/.doctrees/environment.pickle
Binary file not shown.
Binary file modified tamingllms/_build/.doctrees/markdown/toc.doctree
Binary file not shown.
Binary file modified tamingllms/_build/.doctrees/notebooks/safety.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion tamingllms/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: b72ab834db8f31605e361f26c8f2a57b
config: fa8d6b99199a6b892b703f4c8078973c
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added tamingllms/_build/html/_images/design.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions tamingllms/_build/html/_sources/markdown/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ date: "2024-12-16"

Abstract: *The current discourse around Large Language Models (LLMs) tends to focus heavily on their capabilities while glossing over fundamental challenges. Conversely, this book takes a critical look at the key limitations and implementation pitfalls that engineers and technical leaders encounter when building LLM-powered applications. Through practical Python examples and proven open source solutions, it provides an introductory yet comprehensive guide for navigating these challenges. The focus is on concrete problems with reproducible code examples and battle-tested open source tools. By understanding these pitfalls upfront, readers will be better equipped to build products that harness the power of LLMs while sidestepping their inherent limitations.*

---

(*) *The pdf version is preferred as it contains corrections and side notes.*

| Chapter (*) | PDF | Podcast | Website | Notebook | Status |
Expand Down
2 changes: 1 addition & 1 deletion tamingllms/_build/html/_sources/notebooks/safety.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
"\n",
"Building safe and reliable AI systems requires a comprehensive safety plan that addresses potential risks and establishes clear guidelines for development and deployment. This section outlines a structured approach to designing such a plan, breaking down the process into key phases from initial policy definition through implementation and monitoring as depicted in {numref}`safety-plan`.\n",
"\n",
"```{figure} ../_static/safety/design.svg\n",
"```{figure} ../_static/safety/design.png\n",
"---\n",
"name: safety-plan\n",
"alt: Safety Plan Design Phases\n",
Expand Down
Binary file added tamingllms/_build/html/_static/taming.ico
Binary file not shown.
1 change: 1 addition & 0 deletions tamingllms/_build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<!-- <script src="_static/theme-vendors.js"></script> -->
<script src="_static/theme.js" defer></script>

<link rel="shortcut icon" href="_static/taming.ico"/>
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
</head>
Expand Down
1 change: 1 addition & 0 deletions tamingllms/_build/html/markdown/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<!-- <script src="../_static/theme-vendors.js"></script> -->
<script src="../_static/theme.js" defer></script>

<link rel="shortcut icon" href="../../_static/taming.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="3. The Evals Gap" href="../notebooks/evals.html" />
Expand Down
1 change: 1 addition & 0 deletions tamingllms/_build/html/markdown/preface.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<!-- <script src="../_static/theme-vendors.js"></script> -->
<script src="../_static/theme.js" defer></script>

<link rel="shortcut icon" href="../../_static/taming.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="2. About the Book" href="intro.html" />
Expand Down
2 changes: 2 additions & 0 deletions tamingllms/_build/html/markdown/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<!-- <script src="../_static/theme-vendors.js"></script> -->
<script src="../_static/theme.js" defer></script>

<link rel="shortcut icon" href="../../_static/taming.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="1. Preface" href="preface.html" />
Expand Down Expand Up @@ -237,6 +238,7 @@ <h1><a class="reference external" href="https://www.tamingllms.com">Taming LLMs<
<section id="a-practical-guide-to-llm-pitfalls-with-open-source-software">
<h2><em>A Practical Guide to LLM Pitfalls with Open Source Software</em><a class="headerlink" href="#a-practical-guide-to-llm-pitfalls-with-open-source-software" title="Permalink to this heading"></a></h2>
<p>Abstract: <em>The current discourse around Large Language Models (LLMs) tends to focus heavily on their capabilities while glossing over fundamental challenges. Conversely, this book takes a critical look at the key limitations and implementation pitfalls that engineers and technical leaders encounter when building LLM-powered applications. Through practical Python examples and proven open source solutions, it provides an introductory yet comprehensive guide for navigating these challenges. The focus is on concrete problems with reproducible code examples and battle-tested open source tools. By understanding these pitfalls upfront, readers will be better equipped to build products that harness the power of LLMs while sidestepping their inherent limitations.</em></p>
<hr class="docutils" />
<p>(*) <em>The pdf version is preferred as it contains corrections and side notes.</em></p>
<table class="docutils align-default">
<thead>
Expand Down
1 change: 1 addition & 0 deletions tamingllms/_build/html/notebooks/alignment.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<!-- <script src="../_static/theme-vendors.js"></script> -->
<script src="../_static/theme.js" defer></script>

<link rel="shortcut icon" href="../../_static/taming.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="8. Local LLMs in Practice" href="local.html" />
Expand Down
1 change: 1 addition & 0 deletions tamingllms/_build/html/notebooks/cost.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<!-- <script src="../_static/theme-vendors.js"></script> -->
<script src="../_static/theme.js" defer></script>

<link rel="shortcut icon" href="../../_static/taming.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="prev" title="8. Local LLMs in Practice" href="local.html" />
Expand Down
1 change: 1 addition & 0 deletions tamingllms/_build/html/notebooks/evals.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<!-- <script src="../_static/theme-vendors.js"></script> -->
<script src="../_static/theme.js" defer></script>

<link rel="shortcut icon" href="../../_static/taming.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="4. Structured Output" href="structured_output.html" />
Expand Down
1 change: 1 addition & 0 deletions tamingllms/_build/html/notebooks/input.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<!-- <script src="../_static/theme-vendors.js"></script> -->
<script src="../_static/theme.js" defer></script>

<link rel="shortcut icon" href="../../_static/taming.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="6. Safety" href="safety.html" />
Expand Down
1 change: 1 addition & 0 deletions tamingllms/_build/html/notebooks/local.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<!-- <script src="../_static/theme-vendors.js"></script> -->
<script src="../_static/theme.js" defer></script>

<link rel="shortcut icon" href="../../_static/taming.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="9. The Falling Cost Paradox" href="cost.html" />
Expand Down
3 changes: 2 additions & 1 deletion tamingllms/_build/html/notebooks/safety.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<!-- <script src="../_static/theme-vendors.js"></script> -->
<script src="../_static/theme.js" defer></script>

<link rel="shortcut icon" href="../../_static/taming.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="7. Preference-Based Alignment" href="alignment.html" />
Expand Down Expand Up @@ -707,7 +708,7 @@ <h3><a class="toc-backref" href="#id370" role="doc-backlink"><span class="sectio
<h2><a class="toc-backref" href="#id371" role="doc-backlink"><span class="section-number">6.5. </span>Designing a Safety Plan</a><a class="headerlink" href="#designing-a-safety-plan" title="Permalink to this heading"></a></h2>
<p>Building safe and reliable AI systems requires a comprehensive safety plan that addresses potential risks and establishes clear guidelines for development and deployment. This section outlines a structured approach to designing such a plan, breaking down the process into key phases from initial policy definition through implementation and monitoring as depicted in <a class="reference internal" href="#safety-plan"><span class="std std-numref">Fig. 6.9</span></a>.</p>
<figure class="align-center" id="safety-plan">
<a class="reference internal image-reference" href="_static/safety/design.svg"><img alt="Safety Plan Design Phases" src="_static/safety/design.svg" width="80%" /></a>
<a class="reference internal image-reference" href="../_images/design.png"><img alt="Safety Plan Design Phases" src="../_images/design.png" style="width: 80%;" /></a>
<figcaption>
<p><span class="caption-number">Fig. 6.9 </span><span class="caption-text">Safety Plan Design Phases.</span><a class="headerlink" href="#safety-plan" title="Permalink to this image"></a></p>
</figcaption>
Expand Down
1 change: 1 addition & 0 deletions tamingllms/_build/html/notebooks/structured_output.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<!-- <script src="../_static/theme-vendors.js"></script> -->
<script src="../_static/theme.js" defer></script>

<link rel="shortcut icon" href="../../_static/taming.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="5. Managing Input Data" href="input.html" />
Expand Down
1 change: 1 addition & 0 deletions tamingllms/_build/html/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<script type="text/javascript" src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>

<link rel="shortcut icon" href="_static/taming.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
<script type="text/javascript" src="searchindex.js" defer></script>
Expand Down
2 changes: 1 addition & 1 deletion tamingllms/_build/jupyter_execute/markdown/intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "0907576d",
"id": "b8ca7a3c",
"metadata": {},
"source": [
"(intro)=\n",
Expand Down
2 changes: 1 addition & 1 deletion tamingllms/_build/jupyter_execute/notebooks/safety.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
"\n",
"Building safe and reliable AI systems requires a comprehensive safety plan that addresses potential risks and establishes clear guidelines for development and deployment. This section outlines a structured approach to designing such a plan, breaking down the process into key phases from initial policy definition through implementation and monitoring as depicted in {numref}`safety-plan`.\n",
"\n",
"```{figure} ../_static/safety/design.svg\n",
"```{figure} ../_static/safety/design.png\n",
"---\n",
"name: safety-plan\n",
"alt: Safety Plan Design Phases\n",
Expand Down
7 changes: 7 additions & 0 deletions tamingllms/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ bibtex_bibfiles:
- references.bib


repository:
url: https://github.com/souzatharsis/tamingllms

html:
use_repository_button: true
favicon: "_static/taming.ico"

only_build_toc_files: true


Expand Down
Binary file added tamingllms/_static/taming.ico
Binary file not shown.
14 changes: 9 additions & 5 deletions tamingllms/latex/local.tex
Original file line number Diff line number Diff line change
Expand Up @@ -251,16 +251,20 @@ \subsection{Licensing}
\centering
\caption{Open Source LLMs.}
\label{tab:open_source_llms}
\begin{tabular}{lll}
\begin{tabular}{p{2cm}p{2cm}p{8cm}}
\hline
Creator & LLM & License \\
\hline
Meta AI & LLaMA 3 & Custom - Free if under 700M users, cannot use outputs to train other non-LLaMA LLMs \\
Meta AI & LLaMA 3 & Custom - Free if under 700M users,\\
& & cannot use outputs to train other non-LLaMA LLMs \\
Microsoft & Phi-3 & MIT \\
Mistral AI & Mistral & Apache 2.0 \\
Alibaba & Qwen2.5 & Custom - Free if under 100M users, cannot use outputs to train other non-Qwen LLMs \\
Google & Gemma & Custom - Free with usage restrictions, models trained on outputs become Gemma derivatives \\
DeepSeek & DeepSeek-V2 & Custom - Free with usage restrictions, models trained on outputs become DeepSeek derivatives \\
Alibaba & Qwen2.5 & Custom - Free if under 100M users,\\
& & cannot use outputs to train other non-Qwen LLMs \\
Google & Gemma & Custom - Free with usage restrictions,\\
& & models trained on outputs become Gemma derivatives \\
DeepSeek & DeepSeek-V2 & Custom - Free with usage restrictions,\\
& & models trained on outputs become DeepSeek derivatives \\
\hline
\end{tabular}
\end{table}
Expand Down
2 changes: 2 additions & 0 deletions tamingllms/markdown/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ date: "2024-12-16"

Abstract: *The current discourse around Large Language Models (LLMs) tends to focus heavily on their capabilities while glossing over fundamental challenges. Conversely, this book takes a critical look at the key limitations and implementation pitfalls that engineers and technical leaders encounter when building LLM-powered applications. Through practical Python examples and proven open source solutions, it provides an introductory yet comprehensive guide for navigating these challenges. The focus is on concrete problems with reproducible code examples and battle-tested open source tools. By understanding these pitfalls upfront, readers will be better equipped to build products that harness the power of LLMs while sidestepping their inherent limitations.*

---

(*) *The pdf version is preferred as it contains corrections and side notes.*

| Chapter (*) | PDF | Podcast | Website | Notebook | Status |
Expand Down
2 changes: 1 addition & 1 deletion tamingllms/notebooks/safety.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
"\n",
"Building safe and reliable AI systems requires a comprehensive safety plan that addresses potential risks and establishes clear guidelines for development and deployment. This section outlines a structured approach to designing such a plan, breaking down the process into key phases from initial policy definition through implementation and monitoring as depicted in {numref}`safety-plan`.\n",
"\n",
"```{figure} ../_static/safety/design.svg\n",
"```{figure} ../_static/safety/design.png\n",
"---\n",
"name: safety-plan\n",
"alt: Safety Plan Design Phases\n",
Expand Down

0 comments on commit a4e93b1

Please sign in to comment.