diff --git a/README.md b/README.md index cc6e19f..bc90aeb 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,11 @@ By understanding these pitfalls upfront, readers will be better equipped to buil | About the Book | [html](https://www.souzatharsis.com/tamingLLMs/markdown/intro.html) | N/A | *Ready for Review* | | Chapter 1: Wrestling with Structured Output| [html](https://www.souzatharsis.com/tamingLLMs/notebooks/structured_output.html) | [ipynb](https://github.com/souzatharsis/tamingLLMs/blob/master/tamingllms/notebooks/structured_output.ipynb) | *Ready for Review* | | Chapter 2: The Input Data Challenge | | | | -| Chapter 3: Output Size Limitations | [html](https://www.souzatharsis.com/tamingLLMs/notebooks/output_size_limit.html) | [ipynb](https://github.com/souzatharsis/tamingLLMs/blob/master/tamingllms/notebooks/output_size_limit.ipynb) | *Ready for Review* | +| Chapter 3: Output Size Limitations | [html](https://www.souzatharsis.com/tamingLLMs/notebooks/output_size_limit.html) | [ipynb](https://github.com/souzatharsis/tamingLLMs/blob/master/tamingllms/notebooks/output_size_limit.ipynb) | WIP | | Chapter 4: The Evals Gap | [html](https://www.souzatharsis.com/tamingLLMs/notebooks/evals.html) | [ipynb](https://github.com/souzatharsis/tamingLLMs/blob/master/tamingllms/notebooks/evals.ipynb) | *Ready for Review* | | Chapter 5: Safety Concerns | [html](https://www.souzatharsis.com/tamingLLMs/notebooks/safety.html) | [ipynb](https://github.com/souzatharsis/tamingLLMs/blob/master/tamingllms/notebooks/safety.ipynb) | *Ready for Review* | | Chapter 6: Preference-Based Alignment | [html](https://www.souzatharsis.com/tamingLLMs/notebooks/alignment.html) | [ipynb](https://github.com/souzatharsis/tamingLLMs/blob/master/tamingllms/notebooks/alignment.ipynb) | *Ready for Review* | -| Chapter 7: Breaking Free from Cloud-Based Models | [html](https://www.souzatharsis.com/tamingLLMs/notebooks/local.html) | [ipynb](https://github.com/souzatharsis/tamingLLMs/blob/master/tamingllms/notebooks/local.ipynb) | *Ready for Review* | +| Chapter 7: Local LLMs in Practice | [html](https://www.souzatharsis.com/tamingLLMs/notebooks/local.html) | [ipynb](https://github.com/souzatharsis/tamingLLMs/blob/master/tamingllms/notebooks/local.ipynb) | *Ready for Review* | | Chapter 8: The Cost Factor | | | | | Chapter 9: Frontiers | | | WIP | | Appendix A: Tools and Resources | | | | diff --git a/tamingllms/_build/.doctrees/environment.pickle b/tamingllms/_build/.doctrees/environment.pickle index 1b543c8..6105ff1 100644 Binary files a/tamingllms/_build/.doctrees/environment.pickle and b/tamingllms/_build/.doctrees/environment.pickle differ diff --git a/tamingllms/_build/.doctrees/markdown/toc.doctree b/tamingllms/_build/.doctrees/markdown/toc.doctree index fb49b17..add20da 100644 Binary files a/tamingllms/_build/.doctrees/markdown/toc.doctree and b/tamingllms/_build/.doctrees/markdown/toc.doctree differ diff --git a/tamingllms/_build/.doctrees/notebooks/alignment.doctree b/tamingllms/_build/.doctrees/notebooks/alignment.doctree index d43a856..5114671 100644 Binary files a/tamingllms/_build/.doctrees/notebooks/alignment.doctree and b/tamingllms/_build/.doctrees/notebooks/alignment.doctree differ diff --git a/tamingllms/_build/.doctrees/notebooks/local.doctree b/tamingllms/_build/.doctrees/notebooks/local.doctree index 6b0932a..6592e07 100644 Binary files a/tamingllms/_build/.doctrees/notebooks/local.doctree and b/tamingllms/_build/.doctrees/notebooks/local.doctree differ diff --git a/tamingllms/_build/.doctrees/notebooks/safety.doctree b/tamingllms/_build/.doctrees/notebooks/safety.doctree index 139aedb..33932a9 100644 Binary files a/tamingllms/_build/.doctrees/notebooks/safety.doctree and b/tamingllms/_build/.doctrees/notebooks/safety.doctree differ diff --git a/tamingllms/_build/html/_sources/markdown/toc.md b/tamingllms/_build/html/_sources/markdown/toc.md index 849b1f3..0345e9f 100644 --- a/tamingllms/_build/html/_sources/markdown/toc.md +++ b/tamingllms/_build/html/_sources/markdown/toc.md @@ -32,7 +32,7 @@ Abstract: *The current discourse around Large Language Models (LLMs) tends to fo ## [Chapter 6: Preference-based Alignment](https://www.souzatharsis.com/tamingLLMs/notebooks/alignment.html) -## [Chapter 7: Breaking Free from Proprietary Models](https://www.souzatharsis.com/tamingLLMs/notebooks/local.html) +## [Chapter 7: Local LLMs in Practice](https://www.souzatharsis.com/tamingLLMs/notebooks/local.html) ## Chapter 8: The Cost Factor diff --git a/tamingllms/_build/html/_sources/notebooks/alignment.ipynb b/tamingllms/_build/html/_sources/notebooks/alignment.ipynb index 6267fe5..552ad7f 100644 --- a/tamingllms/_build/html/_sources/notebooks/alignment.ipynb +++ b/tamingllms/_build/html/_sources/notebooks/alignment.ipynb @@ -4,6 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ + "(alignment)=\n", "# Preference-Based Alignment\n", "```{epigraph}\n", "A people that values its privileges above its principles soon loses both.\n", diff --git a/tamingllms/_build/html/_sources/notebooks/local.ipynb b/tamingllms/_build/html/_sources/notebooks/local.ipynb index 2c61e5d..46a979a 100644 --- a/tamingllms/_build/html/_sources/notebooks/local.ipynb +++ b/tamingllms/_build/html/_sources/notebooks/local.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Breaking Free from Proprietary Models\n", + "# Local LLMs in Practice\n", "```{epigraph}\n", "Freedom is something that dies unless it's used.\n", "\n", @@ -1364,7 +1364,7 @@ " author = {Tharsis T. P. Souza},\n", " title = {Taming LLMs: A Practical Guide to LLM Pitfalls with Open Source Software},\n", " year = {2024},\n", - " chapter = {Breaking Free from Cloud Providers},\n", + " chapter = {Local LLMs in Practice},\n", " journal = {GitHub repository},\n", " url = {https://github.com/souzatharsis/tamingLLMs)\n", "}\n", diff --git a/tamingllms/_build/html/_sources/notebooks/safety.ipynb b/tamingllms/_build/html/_sources/notebooks/safety.ipynb index 655ed49..853506f 100644 --- a/tamingllms/_build/html/_sources/notebooks/safety.ipynb +++ b/tamingllms/_build/html/_sources/notebooks/safety.ipynb @@ -1178,7 +1178,7 @@ "IBM Granite Guardian performance is superior compared to Llama-Guard and ShieldGemma model families for the \"Harm\" risk dimension {cite}`padhi2024graniteguardian`.\n", "```\n", "\n", - "The industry is increasingly focusing on the fine-tuning of pre-trained base models targeting a specific dimension of requirements and standards, here Safety being a critical one. This trend encompasses the release of open-source, fine-tuned safety models that can act as protective guardrails for LLM applications, as exemplified by LLaMa-Guard and IBM Granite Guardian. Additionally, there is a notable rise in models fine-tuned through techniques such as Reinforcement Learning from Human Feedback (RLHF), utilizing human preference datasets that incorporate safety considerations. These specialized models can function as safety filters as discussed but also as main models that alone could accomplished their original intended task but safely. We will cover this specific topic of preference-based alignment in the [next chapter](https://www.souzatharsis.com/tamingLLMs/notebooks/alignment.html), where we will explore the process of aligning language models with human preferences ultimately leading to the development of an open source fine-tuned model that complies with user provided policy-based requirements." + "The industry is increasingly focusing on the fine-tuning of pre-trained base models targeting a specific dimension of requirements and standards, here Safety being a critical one. This trend encompasses the release of open-source, fine-tuned safety models that can act as protective guardrails for LLM applications, as exemplified by LLaMa-Guard and IBM Granite Guardian. Additionally, there is a notable rise in models fine-tuned through techniques such as Reinforcement Learning from Human Feedback (RLHF), utilizing human preference datasets that incorporate safety considerations. These specialized models can function as safety filters as discussed but also as main models that alone could accomplished their original intended task but safely. We will cover this specific topic of preference-based alignment in the next Chapter {ref}`alignment`, where we will explore the process of aligning language models with human preferences ultimately leading to the development of an open source fine-tuned model that complies with user provided policy-based requirements." ] }, { @@ -1305,7 +1305,7 @@ "- Scoring system: The prompt employs a scoring mechanism that quantifies content severity on a scale from 0 to 1, allowing for nuanced assessments and encouraging consideration of context.\n", "- Transparency in decision-making: The requirement for a brief explanation of the verdict fosters transparency, helping educators and students understand the rationale behind content moderation decisions.\n", "- Few-shot learning: Incorporating few-shot learning techniques can enhance the AI's ability to generalize from limited examples.\n", - "- Output format: Both examples and instruction specify a target output format increasing reliability of the structure of the response (see [Chapter 4. Wrestling with Structured Output](https://www.souzatharsis.com/tamingLLMs/notebooks/structured_output.html) on how to guarantee structured output).\n", + "- Output format: Both examples and instruction specify a target output format increasing reliability of the structure of the response (see Chapter {ref}`structure` on how to guarantee structured output).\n", "\n", "Of course, an LLM-as-a-judge filtering approach is not free of limitations, since it may add latency, cost, operational complexity and the LLM judge itself may be unsafe! We will discuss it later in the case study." ] diff --git a/tamingllms/_build/html/genindex.html b/tamingllms/_build/html/genindex.html index 796c436..dbe7112 100644 --- a/tamingllms/_build/html/genindex.html +++ b/tamingllms/_build/html/genindex.html @@ -192,7 +192,7 @@
  • - Breaking Free from Proprietary Models + Local LLMs in Practice diff --git a/tamingllms/_build/html/markdown/intro.html b/tamingllms/_build/html/markdown/intro.html index ef96671..275d7a9 100644 --- a/tamingllms/_build/html/markdown/intro.html +++ b/tamingllms/_build/html/markdown/intro.html @@ -210,7 +210,7 @@
  • - Breaking Free from Proprietary Models + Local LLMs in Practice diff --git a/tamingllms/_build/html/markdown/preface.html b/tamingllms/_build/html/markdown/preface.html index 2cbbe8a..ba7a810 100644 --- a/tamingllms/_build/html/markdown/preface.html +++ b/tamingllms/_build/html/markdown/preface.html @@ -192,7 +192,7 @@
  • - Breaking Free from Proprietary Models + Local LLMs in Practice diff --git a/tamingllms/_build/html/markdown/toc.html b/tamingllms/_build/html/markdown/toc.html index bd3b931..5b88a7a 100644 --- a/tamingllms/_build/html/markdown/toc.html +++ b/tamingllms/_build/html/markdown/toc.html @@ -185,7 +185,7 @@
  • - Breaking Free from Proprietary Models + Local LLMs in Practice @@ -254,8 +254,8 @@

    Chapter 6: Preference-based Alignment

    -
    -

    Chapter 7: Breaking Free from Proprietary Models

    +
    +

    Chapter 7: Local LLMs in Practice

    Chapter 8: The Cost Factor

    diff --git a/tamingllms/_build/html/notebooks/alignment.html b/tamingllms/_build/html/notebooks/alignment.html index 9a7c976..17a52a5 100644 --- a/tamingllms/_build/html/notebooks/alignment.html +++ b/tamingllms/_build/html/notebooks/alignment.html @@ -47,7 +47,7 @@ - + @@ -214,7 +214,7 @@
  • - Breaking Free from Proprietary Models + Local LLMs in Practice @@ -244,7 +244,7 @@
  • @@ -253,7 +253,7 @@
    -

    7. Preference-Based Alignment

    +

    7. Preference-Based Alignment

    A people that values its privileges above its principles soon loses both.

    —Dwight D. Eisenhower

    @@ -2632,7 +2632,7 @@

    8. Breaking Free from Proprietary Models → + title="next chapter">8. Local LLMs in Practice →