
Explore four open-source LLM exercises on Google Colab with Kaggle data and Hugging Face models, including question answering on Nvidia docs, text summarization, semantic search, attention is all you need.
Learn to download any Kaggle dataset into Google Colab by creating a Kaggle API token, installing the open datasets library, and fetching a CSV dataset for analysis.
Discover retrieval augmented generation (rag) and how it complements language models by using embeddings and a vector database to retrieve relevant text, reduce training costs, and enable real-time updates.
Explore evaluation methods for large language models, including rouge score for text similarity and bleu score for translations, plus benchmarks like glue and super glue to rank models.
Fine-tune an open-source language model on a Nvidia documentation question-answer dataset from Kaggle, using transformers tools to preprocess and convert data for training.
Learn to import pandas and transformers, read csv file, from data sets import data set class, clean text with regex, and split train, validation, and test sets for model training.
Define and load a small Flan-T5 base model and its tokenizer, design a tokenization prompt, and prepare tokenized datasets for training and evaluation.
learn how to set up full fine-tuning of a language model, configure hyperparameters (5 epochs, lr 1e-3, batch size 2), manage training checkpoints, and save the final model and tokenizer.
Evaluate the model on the testing data with trainer.evaluate, noting that low loss isn’t the sole indicator of success. Learn rouge and Bleu scores for evaluation in the next lecture.
Introduce a CNN/daily mail news text summarization task from Kaggle, outline dataset scale and resource limits, and explain quantization with LoRa finetuning on bloom 1b.
Lowercase text, remove special characters, and filter article and highlights; build a final statement by combining them and use a summarize prompt to train a decoder autoregressive model.
Download the auto tokenizer from pre-trained sources, set padding and eos tokens, tokenize inputs into input IDs and labels, convert to a dataset, and prep for model training.
Create a quantization config and load a four-bit quantized Bloom 1 billion model. Configure LoRa with alpha 16, dropout 0.1, rank 8, and train only about 0.11% of parameters.
Define training arguments, create a trainer with the test_model and train_tokenized_dataset, start training, and save the final model and tokenizer.
Fine-tune a large language model on 5000 rows, fix bloom tokenizer issues, and test summarization on CNN and Fox News articles using prompts.
Push your trained model to Hugging Face using trainer.push_to_hub, attach a model card and tokenizer, and upload credentials to publish publicly.
Import pandas and csv and data frame loaders to extract titles and descriptions from Netflix.csv, then create a chroma vector database using open-source Hugging Face embeddings.
Create a chroma vector database with a persist directory from documents and embeddings using sentence transformers. Learn to access and test the database in Python.
Read and load the chroma db in Python by specifying the persist directory and embedding function to enable vector similarity search and test with a query against documents.
Learn how to turn a prototype find the movie app into a real-world Python Streamlit application by building scripts, vector embeddings, and a deployable interface.
Learn to chat with documents using retrieval augmented generation, extract answer paragraphs from pdfs, and feed them to an open-source lm using transformer concepts.
Learn data preparation for open-source LMS by loading PDFs, splitting text into chunks with recursive character text splitter, and building embeddings and a vector database using Hugging Face and Mistral.
Create an embeddings object using a sentence transformers model on cuda, build a vector database from text chunks, and perform similarity search to retrieve nearest documents.
Explore retrieval augmented generation with Rag, using embedding-based context in a structured prompt to guide a quantized Mistral model through a retrieval qa chain, and test the end-to-end pipeline.
Test and refine a QA chain by running queries, extracting answers from results, and inspecting source documents to understand encoder-decoder and self-attention in large language models.
Dive into the revolutionary world of Large Language Models (LLMs) with our comprehensive 4-hour workshop, designed to bridge the gap between theoretical knowledge and practical skills. Whether you're a budding data scientist, an AI enthusiast, or a seasoned professional looking to expand your toolkit, this course is tailored to empower you with hands-on experience in leveraging LLMs for a variety of real-world applications.
What You'll Learn:
Fundamentals and Advanced Techniques: Start with the basics of Large Language Models, including their architecture and capabilities, before progressing to advanced optimization methods such as Quantization and LoRA.
Practical Exercises: Engage in structured exercises using Kaggle datasets in Colab, fine-tuning models for tasks like question answering and text summarization with QLoRA, and exploring cutting-edge concepts such as Retrieval Augmented Generation (RAG).
Real-World Applications: Tackle engaging projects like building a semantic search engine to find movies and developing a chat interface with scholarly articles, applying your knowledge in tangible, impactful ways.
Model Publication: As a bonus, learn how to share your fine-tuned models with the world through Huggingface, enhancing your visibility in the AI community.
Intended Learners:
This course is perfect for individuals looking to deepen their understanding of LLMs and apply these models in innovative ways. Ideal for AI professionals, data scientists, and researchers eager to expand their skills and apply LLMs to solve complex problems.