Generative AI with local LLM (1 copy)
$15.00
Minimum price
$19.00
Suggested price

Generative AI with local LLM

A comprehensive roadmap for building AI-Driven applications with local LLMs

About the Book

This book is a practical guide for anyone interested in diving into the world of Generative AI development, regardless of their prior programming experience.

How This Book Stands Out

When writing this book, we focused on two main goals: creating a clear, practical roadmap and striking a good balance between theory and hands-on practice. Unlike other books that can get lost in theory or assume you need advanced technical skills, this book is tailored for both beginners and advanced users. We place a special emphasis on using local LLM inference and developing AI-driven applications—something that’s now more affordable thanks to the newly released LLMs for edge computing. Our key takeaway: You don’t need to be a machine learning expert to learn Generative AI.

Here's what you can expect:

  1. Clear and concise explanations: Complex AI concepts are broken down into simple, digestible steps, making this book accessible to anyone, regardless of technical background.
  2. Hands-On Projects: Each chapter guides you through building specific AI applications, from setting up your environment to deploying your final product.
  3. Real-World Applications: Learn through practical examples that solve real problems, giving you valuable experience in applying AI techniques.
  4. Essential Tools & Libraries: Master popular tools like Langchain, Vanna, TensorFlow, and PyTorch, giving you in-demand skills to thrive in the AI space.
  5. Project-Based Learning: Work on engaging projects ranging from image recognition to advanced LLM fine-tuning, reinforcing your knowledge with hands-on practice.

By the end of this book, you'll be able to:

  1. Grasp the fundamentals of Generative AI and Large Language Models (LLMs).
  2. Efficiently set up and use local LLM inference for AI development.
  3. Enrich RAG (Retrieval Augmented Generation) models with your own data, like PDFs and documents.
  4. Integrate LLM models with SQL databases for more dynamic AI solutions.
  5. Build and train your own AI models from scratch.
  6. Use AI agents to perform tasks autonomously.
  7. Deploy your AI applications in real-world environments confidently.

This book offers a comprehensive roadmap for anyone, whether you're a student, a professional, or simply curious about AI—providing the tools and confidence to create innovative AI solutions. Start your AI journey today and turn your ideas into reality!

The book was first published on October 4, 2024, and has been continuously updated with new content based on the growing interest in Generative AI. Once you purchase the book, you will receive notifications whenever updates are made. Happy reading!

The source code for the examples in the book is available on GitHub.

  • Share this book

  • Categories

    • Artificial Intelligence
    • Python
  • Feedback

    You must own a copy of this Book to access the forums.

    Email the Author(s)

About the Authors

Shamim Bhuiyan
Shamim Bhuiyan

Shamim Bhuiyan, currently working as an Enterprise architect, where he is responsible for designing and building out high scalable, high load middleware solutions. He has been in the IT field for over 16 years and specialized in Java and Data science. Also, he is a former SOA solution designer, speaker, and Big data evangelist. Actively participates in the development and designing high-performance software for IT, telecommunication and banking industry. In spare times, he usually writes blogs #frommyworkshop and shares ideas with others. 

Timur Isachenko
Timur Isachenko

Timur Isachenko is an accomplished Technical Lead and Solution Architect, known for his expertise in backend development and microservices architecture. With over 14 years in the IT industry, he has a rich history of developing and implementing high-load systems across the finance, healthcare, and online banking sectors. Timur holds a Specialist Degree in Computer Science and Applied Mathematics from Kuban State University.

He has led numerous projects, including the development of educational platforms, billing systems for betting and gambling platforms, and integration services for major enterprises. Timur is also a co-author of “High Performance In-Memory Data Grid with Ignite” and has been a speaker at various conferences.

In his personal life, Timur is a dedicated father to three daughters and an avid runner who once ran every day for an entire year.

Team Discounts

Get a team discount on this book!

Up to 10 Team Members
Minimum price$133.00Suggested price$175.00

Bundles that include this book

$49.00
Bought separately
$29.00
Bundle Price

Reader Testimonials

Victor Shilo
Victor Shilo

Author of the book "AI Driven"

In contrast to my book AI Driven, which targets CxOs, Timur’s book offers practical insights for architects and developers. I had the privilege of reading a pre-release version, and as an engineer at heart, I found it easy to follow from chapter to chapter. Highly recommended!

Lucy Tai
Lucy Tai

Data Scientist

I really appreciated the effort to explain key concepts and break down the symbolism behind them. Including a code base was a huge plus—it made everything feel solid and practical. The examples were clear and easy to follow, making the learning experience enjoyable and effective.

Table of Contents

    • Preface
      • What this book covers
      • Code Samples
      • Readership
      • Conventions
      • Reader feedback
    • About the authors
    • Acknowledgments
    • Chapter 1: Getting started with Local LLM
      • Tools and frameworks used in this book
      • Installing and setting up the local LLM inference
        • Useful commands and interfaces
        • Additional setup
        • Uninstall LLM inference
      • Installing a graphical user interface (GUI) client to work with local LLM
      • Configure a Python virtual environment for AI development
        • Install Python 3
        • Install Python package manager pip3
        • Installing and configuring Miniconda
        • Install IDE: Jupyter lab and notebook
        • Install and configure SQLLite database
        • Additional setups
      • Develop your first application with local LLM
        • Troubleshooting
      • Hardware acceleration
        • Using a Workstation with GPU
        • Enabling AVX/AVX2 for CPU acceleration
        • Using 3rd party ASIC platform or VPS with GPU support
        • Using Google Colab or Kaggle service
      • Conclusion
    • Chapter 2: Deep dive into the theories of Generative AI
      • Artificial Intelligence (AI)
      • Machine Learning (ML)
      • Deep Learning (DL)
      • Natural Language Processing (NLP)
      • Transformer
        • Self-Attention mechanism
        • Encoder-Decoder architecture
      • Generative AI
        • What is Generative AI and what is not?
        • Categories of Generative AI
      • Large Language Model
        • How LLM works internally?
          • Tokenization
          • Vector
          • Embedding
          • Transformers
        • Training LLM
          • Pre-training
          • Fine-tuning
      • RAG
      • AI Agents
      • Prompt engineering
      • Resources
      • Conclusion
    • Chapter 3: RAG, enrich LLM models with private datasets
      • RAG vs fine-tuning LLMs
      • Key concepts of RAG
        • Embeddings
        • Vector database
        • Semantic Search
        • How semantic search is different from full text search?
      • Real world use cases of using RAG
      • Implementing RAG in a private company
      • Step-by-Step Example: Loading, retrieving, and processing custom documents with LLM
      • Conclusion
    • Chapter 4: Text-to-SQL, enhance your LLM responses by integrating data from the Database
      • What is Text-to-SQL?
      • Challenges of Text-to-SQL
      • LLM for Text-to-SQL
      • System design patterns of using Text-to-SQL with examples
        • Design pattern 1. Generating and executing SQL queries
        • Design pattern 2. Using Agent’s for error handling and ensure correctness
        • Design pattern 3. Text-To-SQL with RAG
      • Conclusion
    • Chapter 5: Fine-tuning LLMs
      • Steps for Fine-tuning a pre-trained model
      • Fine-tuning technics
        • Full Fine-Tuning
        • Parameter-Efficient Fine-Tuning (PEFT)
          • LoRA (Low-Rank Adaptation)
          • Quantized LoRA (QLoRA)
        • Knowledge Distillation (KD)
      • Popular frameworks used for fine-tuning LLMs
      • Step-by-step example of fine-tuning an LLM
        • Prerequisites
        • Part 1. Analyze business requirements, choosing a base model and environment setup
        • Part 2. Exploring the training dataset
        • Part 3. Dataset pre-processing and adapter configuration
        • Part 4. Train the model
        • Part 5. Evaluate the model
        • Part 6. Save & deploy the final model
      • Conclusion
    • Chapter 6: Image processing & generating with LLM
      • Image visioning
        • Possibilities and Functionalities of LLaVA-v1.6
        • LLaVa architecture
        • Step-by-Step Example: Utilizing LLaVA-v1.6 for Image Visioning
        • Incorporating LLaVA into your application for image processing
      • Image processing
        • Tips for Better Results
        • References
      • Conclusion
    • Chapter 7: Developing and utilizing AI agents
      • The future of AI agents
      • Difference between AI Agents and AI Tools
      • Use cases of AI agents in Generative AI
        • Use cases from a developer’s perspective
        • Use cases from a product manager’s perspective
      • Classification of AI Agents in Generative AI
      • AI agents architecture
      • Frameworks for developing AI Agents
      • Developing a practical AI Agents: a step-by-step Guide
      • Conclusion
    • Final words

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub