llm-python  by onlyphantom

LLM tutorials and sample scripts for popular AI frameworks

created 2 years ago
876 stars

Top 41.9% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a comprehensive collection of tutorials and sample Python scripts for building applications with Large Language Models (LLMs). It targets developers and researchers interested in practical LLM implementation, featuring popular frameworks like LangChain and LlamaIndex, and various vector databases and LLM providers. The primary benefit is hands-on learning through self-contained code examples that mirror detailed YouTube video tutorials.

How It Works

The project offers a structured learning path through a series of Python scripts, each corresponding to a YouTube tutorial. It demonstrates practical LLM applications such as building Q&A systems, querying databases, using local LLMs, and integrating with services like OpenAI, HuggingFace, Pinecone, and Cohere. The approach emphasizes practical implementation and covers key concepts like embeddings, tool-use, and conversational memory.

Quick Start & Requirements

  • Install dependencies: pip install -r requirements.txt
  • Requires an OpenAI API key (add to .env file).
  • Optional API keys for HuggingFace (HUGGINGFACEHUB_API_TOKEN) and Pinecone (PINECONE_API_KEY) can be added to .env.
  • Lesson 10 requires Cohere (COHERE_API_KEY) and Stability AI (STABILITY_API_KEY) keys, both offering free tiers.
  • Some dependencies, like triton, may have architecture-specific installation issues (x86_64 recommended).
  • Official tutorials playlist: [Link to full lesson playlist]

Highlighted Details

  • Covers a wide range of LLM tools: LangChain, LlamaIndex, OpenAI, HuggingFace, ChromaDB, Pinecone, Cohere, Stability AI.
  • Includes tutorials on advanced topics like tool-use, structured output, and conversational memory agents.
  • Demonstrates building applications like AI tutors, queryable journals, and generative AI games.
  • Code is updated to reflect newer library versions (e.g., LangChain v0.3.2, LlamaIndex v0.6.31), with notes on potential minor differences from older video content.

Maintenance & Community

  • Maintained by onlyphantom.
  • Mentorship program available via Supertype Fellowship.
  • Community support via GitHub Issues or Discussions.

Licensing & Compatibility

  • License: MIT
  • Permissive license allows for commercial use and integration into closed-source projects.

Limitations & Caveats

The triton package has architecture-specific installation requirements, potentially causing issues on non-x86_64 systems. While the repository aims to stay updated, minor code discrepancies may exist between the scripts and older YouTube tutorial videos.

Health Check
Last commit

3 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
56 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.