Companies today are moving rapidly to integrate generative AI into their products and services. But there's a great deal of hype (and misunderstanding) about the impact and promise of this technology. With this book, Chris Fregly, Antje Barth, and Shelbee Eigenbrode from AWS help CTOs, ML practitioners, application developers, business analysts, data engineers, and data scientists find practical ways to use this exciting new technology.
You'll learn the generative AI project life cycle including use case definition, model selection, model fine-tuning, retrieval-augmented generation, reinforcement learning from human feedback, and model quantization, optimization, and deployment. And you'll explore different types of models including large language models (LLMs) and multimodal models such as Stable Diffusion for generating images and Flamingo/IDEFICS for answering questions about images.
Apply generative AI to your business use casesDetermine which generative AI models are best suited to your task Perform prompt engineering and in-context learningFine-tune generative AI models on your datasets with low-rank adaptation (LoRA)Align generative AI models to human values with reinforcement learning from human feedback (RLHF)Augment your model with retrieval-augmented generation (RAG)Explore libraries such as LangChain and ReAct to develop agents and actionsBuild generative AI applications with Amazon Bedrock
When you start reading any article or book on Gen AI in general, you’ll easily find yourself ambushed with new terminologies as you land on each paragraph. The acronyms are so ubiquitous in the AI/ML domain that they can quickly make you feel like you're drowning in alphabets soup. When I handpicked this book and began turning a few pages, my first impression was that the authors clearly understood the 'jargon' problem prevalent in the AI/ML domain. Yet, they did a fantastic job of ironing out the terminologies mess and made them presentable in the book.
The first four chapters are straight through; one can understand every bit of the content, even if they are starting with Gen AI from scratch. Other chapters are deeply technical with some coding and pseudo lines. The coding part might seem to slow down the reading pace quite a bit, but it is absolutely okay to skip over if one doesn't find time for hands-on experience.From the outset, I wished the book would not intertwine AWS services with General AI too tightly and would explain General AI concepts in a cloud-agnostic way — in fact, the book does exactly that. Even if you are completely new to AWS SageMaker or Bedrock, you'll be able to grasp 95% of the book's content and correlate the examples with other cloud providers.
This book is one of my best reads in the recent times on AI/ML. I want to thank and congratulate the souls behind making it — the original authors - Chris Fregly, Antje Barth, Shelbee Eigenbrode. Awesome job!
Prompt engineering, in-context learning and inference parameters settings are techniques that can get better performance from generative AI models, but these do not modify the generative models' underlying weights. To further tailor the use of generative AI on a specific domain or a set of use cases, training or fine-tuning of a generative model using the corresponding datasets would be required.
Prompt Engineering Best Practices 1) Be clear and concise 2) Be creative 3) Move the instruction to the end of the pompt for large amount of text 4) Clearly convey the subject 5) Use explicit directive 6) Avoid negative formulations 7) Include context and few-shot example prompts 8) Specify the size of the response 9) Provide a specific response format 10) Define what to do if the model cannot answer confidently 11) As the model to think "step-by-step" 12) Add constraints for more control 13) Evaluate the response
To perform a full fine tuning of a foundation model, one not only need to load the entire set of model parameters, but also allocate memory for the optimizer states, gradients, forward activations and temporary memory -> extra 12-20 bytes of GPU memory per model parameter. E.g. Creative Writing, Story Generation.
PEFT (Parameter Efficient Fine Tuning) reduces the compute and memory requirements by freezing the original foundation model parameters and only fine tune a small set of new model parameters. E.g. Sentiment Analysis on Product Reviews.
Retrieval-Augmented Generation and Agents compliment the context of your promopts with relevant information needed to address knowledge limitations of LLMS and improve relevancy of generated output. Extra steps that need considerations: a) manage data source connections b) retrieve data from external data sources c) perform additional data preparation d) perform prompt augmentation
This entire review has been hidden because of spoilers.
This is an excellent book, whether one is looking to understand concepts at a high level, or details at the low level. I particularly benefited from the content pertaining to prompt engineering and the explanations of parameters affecting outcomes. Overall, the book was easy to understand and extremely well-written. Good job!
thử đọc 1 số sách về generative ai nhưng cảm thấy ko "vào" lắm. Nên chỉ định đọc cuốn này để thử thực hành trên aws thì phần intro lại viết hay tốt, lên check GR thử thì lượng rate 5* là phần lớn, hehe.
Great overview of Generative AI technology. Limp on low level information (math mostly) though but the audience for this book need not worry about how llm works in detail but just enough to be dangerous to build services on top of it. Needed it for work and glad I read it.
20% in and the book is VERY boring! I was expecting a book that talks about AWS services but it goes in math details that I didn’t expect from this book. It should be focused more on high level knowledge on how to accomplish something using AWS.