Avi Chawla Profile picture
Jan 25 7 tweets 2 min read Read on X
Let's build a mini-ChatGPT that's powered by DeepSeek-R1 (100% local):
Here's a mini-ChatGPT app that runs locally on your computer. You can chat with it just like you would chat with ChatGPT.

We use:
- @DeepSeek_AI R1 as the LLM
- @Ollama to locally serve R1
- @chainlit_io for the UI

Let's build it!
We begin with the import statements and define the start_chat method.

It is invoked as soon as a new chat session starts. Image
Next, we define another method which will be invoked to generate a response from the LLM:

• The user inputs a prompt.
• We add it to the interaction history.
• We generate a response from the LLM.
• We store the LLM response in the interaction history. Image
Finally, we define the main method and run the app as follows: Image
Done!

This launches our 100% locally running mini-ChatGPT that is powered by DeepSeek-R1.
That's a wrap!

If you enjoyed this tutorial:

Find me → @_avichawla

Every day, I share tutorials and insights on DS, ML, LLMs, and RAGs.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Avi Chawla

Avi Chawla Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @_avichawla

Apr 14
5 open-source MCP servers that will give superpowers to your AI Agents:
1️⃣ Stagehand MCP Server

This MCP server (by @browserbasehq) provides web automation capabilities to AI Agents.

Combining Stagehand with Claude delivers an OpenAI Operator alternative that’s more controlled and reliable.

Fully open-source! Image
2️⃣ Jupyter MCP server

This MCP server lets you control Jupyter notebooks to:
- Create code cells
- Execute code cells
- Create markdown cells

Use this for complex use cases where you can analyze full datasets by just telling Claude Desktop a file path.
Read 7 tweets
Apr 13
10 MCP, AI Agents, and RAG projects for AI Engineers (with code):
1️⃣ MCP-powered Agentic RAG

In this project, you'll learn how to create an MCP-powered Agentic RAG that searches a vector database and falls back to web search if needed.

Check the full breakdown (with code) below👇
2️⃣ A multi-agent book writer

In this project, you'll build an Agentic workflow that can write a 20k word book from a 3-5 word book title.

Read the walk-through thread below👇
Read 12 tweets
Apr 8
Let's build an MCP-powered Agentic RAG (100% local):
Below, we have an MCP-driven Agentic RAG that searches a vector database and falls back to web search if needed.

To build this, we'll use:
- Bright Data to scrape web at scale.
- @qdrant_engine as the vector DB.
- @cursor_ai as the MCP client.

Let's build it!
Here's how it works:

1) The user inputs a query through the MCP client (Cursor).
2-3) The client contacts the MCP server to select a relevant tool.
4-6) The tool output is returned to the client to generate a response.

Let's implement this!
Read 12 tweets
Apr 7
Let's build a RAG app with Meta's latest Llama 4:
Meta just released multilingual and multimodal open-source LLMs.

Today, we're building a RAG app powered by @Meta's Llama4.

Tech stack:
- @Llama_Index for orchestration.
- @CerebrasSystems for blazing-fast Llama4 inference.
- @Streamlit for the UI.

Let's build it!
Before we dive into the code, here's a diagram that illustrates the key components & how they interact with each other!

It will be followed by detailed descriptions & code for each component:
Read 11 tweets
Mar 28
9 RAG, LLM, and AI Agent cheat sheets for AI engineers (with visuals):
1️⃣ Transformer vs. Mixture of Experts in LLMs

Mixture of Experts (MoE) is a popular architecture that uses different "experts" to improve Transformer models.

The visual below explains how they differ from Transformers.

Here's my detailed thread about it👇
2️⃣ 5 techniques to fine-tune LLMs

Traditional fine-tuning is infeasible with LLMs since they have billions of parameters (and 100s of GBs in size).

Check my detailed explainer thread on this👇
Read 11 tweets
Mar 26
5 MCP servers that will give superpowers to your AI Agents:
Integrating a tool/API with Agents demands:
- reading docs
- writing code
- updating the code, etc.

To simplify this, platforms now offer MCP servers. Developers can plug them to let Agents use their APIs instantly.

Below, let's look at 5 incredibly powerful MCP servers.
1️⃣ Firecrawl MCP server

This adds powerful web scraping capabilities to Cursor, Claude, and any other LLM clients using @firecrawl_dev.

Tools include:
- Scraping
- Crawling
- Deep research
- Extracting structured data
- and more

Check this demo👇
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(