We've all dealt with activation functions while working with neural nets.
- Sigmoid
- Tanh
- ReLu & Leaky ReLu
- Gelu
Ever wondered why they are so importantβπ€
Let me explain it to... π
Before we proceed I want you to understand something!
You can think of a layer in neural net as a function & multiple layers makes the network a composite function.
Now, a composite function consisting of individual linear functions is also linear.
Check this π
Sep 2 β’ 12 tweets β’ 4 min read
Finetuning for RAG using DSPy, clearly explained:
DSPy is a framework for algorithmically optimizing LM prompts and weights.
DSPy : RAG :: PyTorch : DNNs
I'll make sure today's tutorial can be followed with minimal background knowledge!
Let's go! π
Aug 30 β’ 7 tweets β’ 3 min read
6 months ago I landed my job as an AI Engineer!
Here's a roadmap for those starting today:
1οΈβ£ Learn Python & do it quickly!!
Start with freeCodeCamp's 4 hours bootcamp!
You'll learn:
- Installing Python
- Setting up an IDE
- Basics Syntax
- Variables & Datatypes
- Exception handling
- Modules & pip
- Mini hands-on projects π₯
Check this π
Aug 28 β’ 8 tweets β’ 2 min read
Bayes' Theorem clearly explained:
Bayes' Theorem is a cornerstone of probability theory!
It calculates the probability of an event, given that another event has occurred.
It's like updating your guess with fresh information!
Before we delve into the details, let's take a quick look at its formula:
Aug 25 β’ 8 tweets β’ 3 min read
Precision Recall (PR) curve, clearly explained:
A Data Scientist often needs to strike a balance between Precision & Recall & creating a PR-curve is the best way to do so.
Let's understand how to create one today! π
Aug 22 β’ 10 tweets β’ 3 min read
Let's build a crew of AI agents to scrape the web and write blog posts for you, powered by Llama-3 (100% local):
Before we begin, take a look at what we're about to create!
Here's what you'll learn:
- @Ollama for locally serving a LLM (Llama-3)
- @CrewAIInc for building a multi-agent system
- @LightningAI for development & hosting
Let's go! π
Aug 20 β’ 6 tweets β’ 2 min read
Data Classes in Python, clearly explained:
Data classes can save you hours of writing boilerplate code!
Today, we'll understand what data classes are & how to use them!
Let's go! π
Aug 19 β’ 8 tweets β’ 3 min read
Let's learn how to evaluate a RAG application (part 1):
1/n
To evaluate a typical RAG application, we need two things:
- A set of questions
- And ground truth answers for these questions
Let's see how to do it automatically using ragas in this step-by-step guide that follows.
2/n
Aug 15 β’ 10 tweets β’ 4 min read
Retrieval Augmented Generation (RAGs), clearly explained:
Imagine creating a ChatGPT-like interface that taps into our own knowledge base to answer our queries.
That's precisely what RAG offers you! β¨
Today, I'll delve into each component required to develop a RAG application and share a working project by the end!
Let's go! π
Aug 14 β’ 8 tweets β’ 3 min read
Finetuning LLMs using LoRA, clearly explained:
LoRA (Low-Rank Adaptation) is one of the most powerful techniques when it comes to Fine-Tuning LLMs.
Today Iβll explain:
β’ What is Loraβ
β’ How it works β
β’ Followed by a hands-on coding tutorialβοΈ
But before we do that, let's understand what finetuning means...π
Aug 13 β’ 7 tweets β’ 2 min read
Precision & Recall clearly explained:
Let's say there are 10 people in a Town.
2 of them have committed a crime, so in reality:
- 8 are innocent
- 2 are guilty
This is how it looks π
Aug 11 β’ 10 tweets β’ 3 min read
How LLMs understand relative positions of input words, clearly explained:
RoPE (Rotary Positional Embeddings) revolutionised the way positional information is encoded in LLMs and it's widely used by models like Llama-3.
Today, I'll clearly explain what they are & how positional embeddings evolved over time.
Let's go! π
Aug 10 β’ 12 tweets β’ 5 min read
10 great Python packages for Data Science not known to many:
1οΈβ£ CleanLab
You're missing out on a lot if you haven't started using Cleanlab yet!
Cleanlab helps you clean data and labels by automatically detecting issues in a ML dataset.
How LLMs work, clearly explained:
Before diving into LLMs, we must understand conditional probability.
Let's consider a population of 14 individuals:
- Some of them like Tennis πΎ
- Some like Football β½οΈ
- A few like both πΎ β½οΈ
- And few like none
Here's how it looks π
Aug 8 β’ 12 tweets β’ 4 min read
Let's build a 100% local RAG app, featuring βR, a self-hosted vector
database, a fast embedding library & a reranker:
Before we begin, take a look at what we're building today!
And here's what you'll learn:
- @Ollama for serving βR
- @Streamlit for building the UI
- @Llama_Index for orchestration
- @qdrant_engine to self-host a vector db
- @LightningAI for development & hosting
Let's go! π
Aug 6 β’ 6 tweets β’ 2 min read
Python *args & **kwargs clearly explained:
*args allows you to pass a variable number of non-keyword arguments to a function.
It collects all non-keyword arguments passed to the function and stores them as a tuple.
Consider the following example:
Aug 1 β’ 6 tweets β’ 2 min read
Lambda functions in Python clearly explained:
What are lambda functions ?
Simply put, they are small anonymous functions that are defined without a name.