
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Generative AI refers to models that create new data from prompts. It can generate text, images, audio, video, and code, enabling intuitive content creation.
Explore the Venn diagram of AI, machine learning, deep learning, and generative AI. Learn how these domains use data to identify patterns and power creative content.
Navigate the roadmap to generative ai by mastering Python fundamentals, ml and dl concepts, nlp, llms, and deployment, plus vector databases, apis, and cloud ecosystems for practical product-ready ai.
Install Python and Jupyter Notebook, create a virtual environment, and explore local LM tools such as Jan dot AI, LM Studio, and Ulama to prepare your machine for GenAI experiments.
Learn to use the OpenAI API programmatically and via GUI with Postman, including creating an API key, setting authorization headers, and building chat completions with GPT-3.5-turbo.
Explore how temperature in large language models shapes creativity and output style. Learn why a temperature around one balances factual accuracy and creative responses.
Explore max tokens as a tool to restrict generation length for token saving or cost control, demonstrated by setting max tokens to five and noting the finish reason becomes length.
Explore tokenization basics, from corpus and vocabulary to character, word, and subword methods. Learn how token types impact semantics, model performance, and pricing, with practical insights from the OpenAI tokenizer.
Learn to implement character tokenization by converting a string into a list of characters, producing tokens as text, and test the simple implementation.
Learn to implement word tokenization in Python by splitting text on spaces to produce individual words, and understand its advantages over character or subword tokenization and challenges with out-of-vocabulary words.
Explore subword tokenization that breaks rare words into meaningful subword units such as character engrams and byte pair encodings, improving handling of misspellings and out-of-vocabulary words.
Explore how tokenization, vectorization, and embeddings transform raw text into meaningful word vectors, and learn how cosine similarity reveals relationships among words like dog, wolf, and fish.
Demonstrate tokenizing sentences with auto tokenizer, converting tokens to IDs, and creating word embeddings using Bert base uncased in PyTorch, revealing a 1-by-768 embedding and its cosine similarity.
Explore cosine similarity to compare word embeddings built from token ids and PyTorch tensors, using dog, wolf, and fish to show higher similarity for related words like happy and cheerful.
Explore how large language models use transformers, with encoders, decoders, and attention, to generate and translate text. Learn data collection, cleaning, bias considerations, and supervised training with backpropagation.
Evaluate language models using a metrics toolbox: coherence, relevance, factual accuracy, and fairness, and compare architectures and benchmarks to select the right LM for a given use case.
Fine tuning a pre-trained large language model tailors it to a specific domain by training on a curated dataset, reducing bias, and shaping outputs into concise lists or JSON.
Explore why fine tuning matters for text moderation models, showing how tailored datasets and prompts improve multilingual toxicity detection, indecent content labeling, and cost efficiency.
Explore fine tuning on OpenAI: prepare JSON training and validation data with a system, user, and assistant prompt structure, convert from CSV to JSON, and use Dspam to score toxicity.
Estimate fine-tuning costs by calculating total training and validation tokens with the Tiktokin library and GPT 3.5 turbo, then apply OpenAI's 8 USD per million tokens to derive the cost.
Format data for OpenAI fine-tuning by converting data frames to jsonl, stringifying content fields, and creating a scores column with stringified JSON to support system prompts and training data.
Install openai packages, upload training and validation jsonl files, and start a fine tuning job with GPT-3.5-turbo. Monitor training and validation losses for early stopping and learning rate tweaks.
Learn how to deploy a custom fine-tuned model via the OpenAI API, swap in your model name, and run chat completions with the OpenAI SDK, including training data considerations.
Learn how to serve a fine-tuned model via an api using fast api and uvicorn, with environment-managed keys, a post endpoint for chat completions, and openai integration.
Automat framework for prompt engineering by specifying act as, user persona, targeted action, output definition, mode, typical case, and topic whitelisting to craft precise AI prompts.
Build a naive pdf chatbot that extracts all words, sends tokens and the user's question to LangChain for question answering via the OpenAI server. Iterate to tackle large PDFs.
This course is a practical guide to learning Generative AI concepts:
- Large Language Models
- Tokenization, Word Vectors and Embeddings
- Fine tuning LLMs
- Langchain
- Prompt Enginnering concepts
- Using OpenAI API
The field of artificial intelligence has seen incredible advances in recent years, with one area gaining significant traction - generative AI. This cutting-edge technology is poised to revolutionize how we create and interact with all kinds of digital content.
So, What exactly is generative AI? At its core, it refers to AI models that can generate new data, rather than just analyzing existing data. This could include generating text, images, audio, video, computer code, and more - often starting from just a basic prompt or input from a user. What makes this technology so powerful is how user-friendly it is becoming. You can simply describe a scene or concept, and the AI model generates high-quality digital content in response - almost like magic!
1. Artificial Intelligence:
This prime spot is reserved for just plain AI. It's a broad term, the overarching goal: machines that mimic human intelligence. That includes everything from playing chess to diagnosing diseases, from composing music to writing this blog.
2. Machine Learning:
Machine Learning (ML), a subset of AI. It's where the magic of learning from data happens. ML algorithms don't need explicit programming – they gobble up data, identify patterns, and improve their performance over time.
3. Deeper and Deeper: When ML Gets Fancy - Deep Learning
This is ML on steroids, using complex artificial neural networks loosely inspired by the human brain. Deep learning is the secret sauce behind many of AI's recent breakthroughs, allowing for crazy-powerful stuff like image and speech recognition.
4. Generative AI
This is the elephant baby of the AI world or the rebellious teenager with a paintbrush. It uses machine learning to create entirely new content, from composing electronic dance music symphonies to generating hyperrealistic images of, well, anything you can imagine (including, unfortunately, deepfakes so convincing they'd make our grandma believe the orange cats can dance).