Akshay πŸš€ Profile picture
Simplifying LLMs, MLOps, Python & Machine Learning for you! β€’ AI Engineering @LightningAI β€’ Lead Data Scientist β€’ BITS Pilani β€’ 3 Patents
Ella Sanders Profile picture Rodolpho Gurgel Profile picture Sujoy De Profile picture valuepiper Profile picture Shashi Kumar Profile picture 14 subscribed
Sep 17 β€’ 10 tweets β€’ 3 min read
Multithreading in Python clearly explained: Ever felt like your Python code could run faster❓

Multithreading might be the solution you're looking for!

Today, I'll simplify it for you in this step-by-step guide.

Let's go! πŸš€ Image
Sep 13 β€’ 9 tweets β€’ 3 min read
7 amazing Python libraries for building production-ready LLM-powered RAG apps: 1️⃣ Ragas

First demo'd by OpenAI at their dev day, Ragas is the Pytest for RAG Apps

Check this outπŸ‘‡
ragas.io
Sep 12 β€’ 11 tweets β€’ 3 min read
Object oriented programming in Python, clearly explained: We break it down to 6 important concepts:

- Object 🚘
- Class πŸ—οΈ
- Inheritance 🧬
- Encapsulation πŸ”
- Abstraction 🎭
- Polymorphism πŸŒ€

Let's take them one-by-one... πŸš€ Image
Sep 6 β€’ 8 tweets β€’ 3 min read
Key concepts to understand before you start working with LLMs/AI Engineering: 1️⃣ The Transformer

Transformers brought the AI revolution we see today, with their ability to process data in parallel & the attention mechanism.

Here's an illustrated guide to understanding self-attention in transformers:
mlspring.beehiiv.com/p/attention-ne…
Sep 4 β€’ 7 tweets β€’ 3 min read
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... πŸ‘‡ Image 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 πŸ‘‡ Image
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! πŸš€ Image
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: Image
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! πŸš€ Image
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! πŸš€ Image
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 Image
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 πŸ‘‡ Image
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! πŸš€ Image
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.

It's like a magic wand! πŸͺ„βœ¨

Check this outπŸ‘‡
github.com/cleanlab/clean…
Aug 9 β€’ 10 tweets β€’ 3 min read
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 πŸ‘‡ Image
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: Image
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.

Check out the syntax πŸ‘‡ Image