Skip to content
Home/Resources/Projects/AI projects with code
Project guide · AI

AI Projects With Source Code: 15 Checked GitHub Repositories for LLMs, RAG, Agents, Vision and Machine Learning

By Younus FardeenUpdated 4 Nov 202611 min read
Short answer

The best AI projects with source code are notebooks and apps you can run and measure: Sebastian Raschka's code for building a language model from scratch, Hugging Face and Gemini cookbooks, a large collection of runnable LLM apps, agent libraries, computer-vision utilities and classic machine learning notebooks. Run one, change the data or the model, and report a number. Check each repository's key requirements first, because several assume a paid API key.

Repositories were checked with the GitHub API on 4 November 2026 for licence, last commit and archived status. Free-tier limits and model names change quickly, so the Check first line flags keys and costs. For project ideas to build yourself, see the AI project ideas and the free LLM APIs.

Learn how models work

rasbt/LLMs-from-scratch

Intermediate to advanced

Python, PyTorch, Jupyter notebooks, tiktoken; setup via conda, uv, pixi or Docker

WhatOfficial code for the book 'Build a Large Language Model (From Scratch)': chapters 1-7 plus appendices implement tokenisation, attention, a GPT model, pretraining, classification fine-tuning and instruction fine-tuning in plain PyTorch.

LearnHow a GPT-style model actually works inside, step by step, with no hidden LLM library: data loading, multi-head attention, training loop, evaluation, and fine-tuning.

Try thisTrain a BPE tokenizer on Hindi or Tamil text and swap it in, then fine-tune the classification head on a small labelled dataset of your own (for example support tickets) and report accuracy.

Check firstApache-2.0 licence, about 108,000 stars, last push 2026-10-30. The book is paid but the code is free. Needs PyTorch familiarity; the larger bonus experiments are faster with a GPU. Very active (91 commits in 12 months) and only 1 open issue.

Python, PyTorch, uv (gpu or cpu extras), scripts/ and runs/ shell recipes

WhatA minimal single-node harness that covers the whole LLM pipeline (tokenizer, pretraining, finetuning, evaluation, inference and chat) with a time-to-GPT-2 leaderboard.

LearnHow every stage of a ChatGPT-style model fits together in one compact, hackable repo, and what training compute really costs.

Try thisRun only the tiny CPU/MPS path, change the tokenizer vocabulary size or a data mixture, and compare the validation loss of two settings in a short write-up.

Check firstMIT licence, about 60,000 stars, last push 2026-09-07. Full training needs a rented multi-GPU node (paid); the CPU or MPS path is only for learning the code. The author's older nanoGPT repo now points here.

ageron/handson-ml3

Beginner to intermediate

Python, scikit-learn, Keras/TensorFlow, pandas, Jupyter; Colab, Anaconda or Docker

WhatNotebooks for 'Hands-On Machine Learning with Scikit-Learn, Keras and TensorFlow' (3rd edition): an end-to-end ML project (housing prices), classification, SVMs, trees, ensembles, dimensionality reduction, neural nets, CNNs, RNNs, NLP with attention.

LearnClassic machine-learning practice end to end: data cleaning, pipelines, cross-validation, model selection and deep learning basics.

Try thisRedo chapter 2 on an Indian open dataset (for example a crop-yield or house-price CSV from data.gov.in), build a scikit-learn pipeline with cross-validation, and write a one-page model card.

Check firstApache-2.0 licence, about 14,000 stars, last push 2026-10-06. The book is paid; the notebooks are Apache-2.0. The author has a newer repo (ageron/handson-mlp, active in 2026-10) for the follow-on edition.

mrdbourke/pytorch-deep-learning

Beginner to intermediate

Python, PyTorch, torchvision, TensorBoard, Jupyter/Colab

WhatMaterials for the Zero to Mastery 'Learn PyTorch for Deep Learning' course: notebooks 00-09.

LearnDeep learning from tensors to a deployed image classifier, including how to turn notebook code into modular Python scripts.

Try thisReplace the food images with 5-10 classes of Indian dishes you photograph yourself, fine-tune EfficientNet from the transfer-learning notebook, and deploy a demo on a Hugging Face Space.

Check firstMIT licence, about 19,000 stars, last push 2026-09-27. Accompanies a paid video course (the notebooks and the learnpytorch.io text are free); some notebooks use older torchvision APIs.

Python, Hugging Face Transformers/Datasets, PyTorch, Jupyter (Colab and Kaggle badges), conda environments

WhatNotebooks for the book 'Natural Language Processing with Transformers': text classification, transformer anatomy, multilingual NER, text generation, summarisation, question answering, model compression.

LearnApplied NLP with transformers end to end: tokenisation, fine-tuning, evaluation and common tasks, with each chapter runnable.

Try thisRedo the classification chapter on a Hindi or Hinglish text dataset from the Hugging Face Hub and compare a fine-tuned model with a TF-IDF baseline.

Check firstApache-2.0 licence, about 4,800 stars, last push 2026-05-29. The book is paid; notebooks are Apache-2.0. Only 2 commits in the last 12 months, but the latest (2026-05-29) is titled 'Make the notebooks runnable again', so they were revalidated.

LLM apps, RAG and agents

Shubhamsaboo/awesome-llm-apps

Beginner to intermediate

Python, Streamlit, OpenAI/Gemini/Anthropic SDKs and local models via Ollama, agent frameworks (varies per app)

WhatA large collection of runnable LLM apps, each in its own folder: starter single-file agents, RAG tutorials (agentic, local, corrective, hybrid-search, vision RAG), advanced and multi-agent apps, voice agents and MCP agents.

LearnHow many different LLM application patterns look as small working programs, and how to read and modify one quickly.

Try thisChoose a local RAG app (for example the llama3.1 or qwen local RAG folder, which can run on Ollama without a paid key), swap the vector store, add source citations and test it on 10 questions with known answers.

Check firstApache-2.0 licence, about 144,000 stars, last push 2026-10-22. Quality is uneven (many are demo-grade single files) and most apps need a paid or free-tier API key, though several have local model variants. Dependencies differ per folder.

Python, Streamlit, OpenAI API, LangChain

WhatStreamlit's starter LLM app: a chatbot, file Q&A, chat with internet search, LangChain quickstart, LangChain prompt template and a chat-with-feedback page, each as a small page file.

LearnThe minimum code for a chat UI with message history, file upload Q&A and tool use, using Streamlit session state.

Try thisSwap the OpenAI client for a free or local model endpoint (Ollama or another provider with an OpenAI-compatible API), add persistent chat history in SQLite and a token counter.

Check firstApache-2.0 licence, about 935 stars, last push 2025-12-08. Needs a paid OpenAI key. Small and lightly maintained: 4 commits in the last 12 months, mostly dependency updates.

google-gemini/cookbook

Beginner to intermediate

Python (Jupyter/Colab) and JavaScript, Gemini API

WhatGoogle's official notebooks and examples for the Gemini API: quickstarts (get started, function calling, embeddings, caching, File API, batch mode, live/audio, image generation) plus examples and JavaScript quickstarts.

LearnCalling a hosted multimodal model from code: prompts, structured output, tool use, embeddings and caching, with runnable examples to adapt.

Try thisTake the Function_calling quickstart and wrap it in a small Streamlit app that answers questions from a CSV you supply, with the API key read from an environment variable.

Check firstApache-2.0 licence, about 18,000 stars, last push 2026-11-04. Needs a Google AI Studio API key; free-tier limits and regional availability change, so check AI Studio before promising 'free'.

Python, Hugging Face Transformers/TRL/Datasets, smolagents, Jupyter or Colab

WhatThe open-source AI Cookbook: notebooks in notebooks/en covering advanced RAG, agentic RAG, multi-agent RAG, text-to-SQL agents, fine-tuning (vision-language models, ViT, object detection), LLM-as-a-judge and embeddings.

LearnCurrent, practical recipes for RAG, agents and fine-tuning, with evaluation notebooks so you can measure what you build.

Try thisRebuild the agentic RAG notebook over your own corpus (for example a set of college handbook PDFs) and score the answers with the LLM-as-a-judge notebook.

Check firstApache-2.0 licence, about 2,800 stars, last push 2026-10-28. Several notebooks need a GPU (Colab free tier may cover some) and a free Hugging Face access token; some use hosted inference endpoints. Notebooks can drift as libraries change.

Python, smolagents, Hugging Face Inference or local models via LiteLLM, optional sandboxes (E2B, Docker)

WhatA small library for building AI agents (code agents and tool-calling agents) with an examples/ folder: any-LLM agents, multi-LLM, RAG (including ChromaDB), text-to-SQL, open deep research, sandboxed execution, async agents and a Gradio UI.

LearnHow agents decide, call tools and run code; the difference between code agents and JSON tool-calling agents; basics of agent safety.

Try thisBuild a CodeAgent that answers questions about your own CSV with a pandas tool, run its code in the sandbox example, and compare it with a tool-calling agent on 10 tasks.

Check firstApache-2.0 licence, about 30,000 stars, last push 2026-11-03. A library repo (most code is src/), not a project collection. Works with free or local models but small models are weak at agent tasks; agent-generated code must be sandboxed.

Python 3.11-3.13, LangGraph, LangChain, OpenAI API, LangSmith

WhatNotebooks for LangChain Academy's LangGraph course: modules 0-6 cover chains, routers, agents with memory, state and reducers, human-in-the-loop, parallelisation, sub-graphs, map-reduce and a research-assistant project, each module with a studio/ folder.

LearnBuilding stateful agents as graphs, with memory, branching, parallel nodes and debugging in LangGraph Studio.

Try thisRedo the module 4 research-assistant for a topic you choose (for example summarising exam syllabi), switch the model provider, and add a SQLite checkpointer for resumable runs.

Check firstMIT licence, about 3,000 stars, last push 2026-06-15. Needs an OpenAI API key (paid) and a LangSmith account, and ties you to the LangChain ecosystem. 11 commits in 12 months, none in the last 90 days (last 2026-06-15); 31 open issues.

Python API service, uv, Docker, works with Ollama, llama.cpp or vLLM servers

WhatAn open-source API layer for private, local-model AI apps (formerly imartinez/privateGPT): file ingestion, retrieval with citations, agentic RAG, tools and MCP connectors, with a built-in /ui workbench, over any OpenAI-compatible inference server.

LearnHow a RAG service is structured: ingestion, embeddings, vector store, retrieval, citations and an API on top, running without sending data to a cloud model.

Try thisRun it against a local Ollama model, ingest a folder of PDFs, then compare answer quality with two chunk sizes and add a small script that tests 10 questions.

Check firstApache-2.0 licence, about 58,000 stars, last push 2026-11-03. README says PrivateGPT does not run models itself, so you must also run an inference server; the architecture changed over time and older tutorials describe a different version.

Vision and recommenders

Python 3.10+, supervision, OpenCV, NumPy; detectors such as RF-DETR installed separately

WhatReusable computer-vision utilities (detections, annotators, trackers, zones, counting) with an examples/ folder of end-to-end apps: count people in a zone, heatmap and tracking, speed estimation, time in zone, traffic analysis, depth showcase.

LearnHow to go from detector output to a working vision application: tracking, counting, zones, annotation and video I/O.

Try thisRun traffic_analysis on a road video you are allowed to use, log vehicles per minute to CSV, and then replace the detector with another model to compare counts.

Check firstMIT licence, about 51,000 stars, last push 2026-11-03. Library repo; examples need model weights and sample videos downloaded separately and run faster with a GPU. Some popular detectors carry their own licences (for example Ultralytics YOLO is AGPL-3.0).

ageitgey/face_recognition

Beginner to intermediate

Python 3, dlib, NumPy, Pillow, OpenCV (for webcam examples), Flask (web service example)

WhatA Python library and command-line tool for face detection and recognition built on dlib, with about two dozen example scripts: recognise faces in pictures, from a webcam or video, KNN and SVM classifiers, facial features, blur faces.

LearnFace encodings, distance matching and thresholds, and how to build a small recognition pipeline from stock components.

Try thisBuild a class attendance prototype: enrol a few consenting volunteers from photos, recognise them via webcam, and write date-stamped rows to SQLite; measure false matches at different tolerances.

Check firstMIT licence, about 57,000 stars, last push 2026-06-25. Effectively frozen: 3 commits in the last 12 months (doc fixes, last 2026-06-25) and the latest GitHub release is from 2018; 775 open issues.

recommenders-team/recommenders

Intermediate to advanced

Python 3.11 (README), uv/pip, pandas, scikit-learn; optional TensorFlow/PyTorch (gpu) and PySpark extras

WhatBest-practice notebooks and a library for building recommender systems (formerly microsoft/recommenders): quick starts, data prep, collaborative filtering (SAR, ALS, embedding dot bias and more), content-based models, evaluation, tuning and operationalisation.

LearnHow recommender pipelines are built and evaluated (MovieLens quick starts, ranking metrics such as precision@k and NDCG), and how to compare algorithms fairly.

Try thisRun the SAR MovieLens quick start, then replace MovieLens with a small interaction log of your own (for example book borrowings) and compare with a popularity baseline using the same metrics.

Check firstMIT licence, about 22,000 stars, last push 2026-11-04. Heavy dependency stack; some notebooks target Azure or Spark. Last tagged release is 2024-12-24 but main is active (100+ commits in 12 months). 168 open issues.

How to study a repository

  1. Read the README and run the project exactly as written before you change anything.
  2. Open the folder tree and write one sentence for what each folder does.
  3. Find the entry point and trace one feature from the screen or command to the data.
  4. Run the tests, then break something on purpose and watch a test fail.
  5. Make the change in the Try this line, commit it and write what you learned in your own README.

Licences in one minute

  • MIT, BSD and Apache-2.0 let you reuse the code, including in a portfolio, if you keep the notice.
  • GPL is copyleft: software you build from it must also be released under the GPL.
  • CC0 is a public-domain dedication.
  • A repository with no licence is all rights reserved, so link to it but do not copy it.
  • Never commit API keys. Use test keys and environment variables.

What to measure after you run one

  • A baseline to beat and a test set the model has not seen.
  • Cost and latency for any language-model app.
  • Three failures and your explanation of each.
  • For face or personal data projects, written consent and a privacy note.

Frequently asked questions

Where can I find AI projects with source code?

On GitHub in maintained repositories with a licence. The list above covers language models from scratch, LLM apps and agents, vision and classic machine learning, each checked on 4 November 2026.

Which AI repo is best for beginners?

Start with Hands-On Machine Learning's notebooks, Streamlit's LLM examples or the Gemini cookbook, then move to RAG and agent repositories.

Do these AI projects need a paid API key?

Some do. LangChain Academy and Streamlit's LLM examples assume an OpenAI key, and the Gemini cookbook needs a Google AI Studio key whose free tier has limits. Several others work with local or free models.

Can I run these on a laptop?

Most notebooks run on a laptop or free Colab. Training a language model from scratch or fine-tuning large models needs a GPU, and the repos say which parts are heavy.

Are these safe to use for face recognition projects?

Face data is sensitive personal data. Use only photos of people who consent, store as little as possible and write a privacy note.

Continue learning

Project guide · AI

AI project ideas

40 AI project ideas for 2026, from a spam classifier to RAG apps, agents and fine-tuning, each with a dataset or API and a stand-out upgrade.

Open guide →40 ideas
Project guide · AI & ML

AI & ML projects

Churn, fraud, recommenders and RAG, each with data and a metric.

Open guide →24 ideas
Source code

Free projects with source code

28 maintained repositories to clone, run and change.

Browse the repositories →30 repos