This repository is a collection of mini-projects, notebooks, and experiments focused on Large Language Models (LLMs). It covers various topics including LangChain, Llama models, and integration with services like Together AI and OpenAI.
These notebooks follow the LangChain for LLM Application Development course and cover:
langchain-Model_prompt_parser.ipynb: Introduction to Models, Prompts, and Output Parsers.langchain-Chains.ipynb: Working with different types of chains (Simple, Sequential).langchain-Memory.ipynb: Implementing memory in LLM applications.langchain-QnA.ipynb: Question and Answering over documents.langchain-Evaluation.ipynb: Evaluating LLM applications.langchain-Agents.ipynb: Using LLMs as reasoning engines to take actions.
A series of notebooks focused on Llama models, inspired by DeepLearning.AI's "Prompt Engineering with Llama 2/3" course:
deeplearning_ai_getting_started_llama.ipynb: Basic interactions with Llama.deeplearning_ai_prompt_engineering_techniques_llama.ipynb: Advanced prompting strategies.deeplearning_ai_code_llama.ipynb: Using Llama for code generation and analysis.deeplearning_ai_multi_turn_conversations_llama.ipynb: Building conversational interfaces.deeplearning_ai_comparing_llama_models.ipynb: Comparing different Llama model sizes and versions.deeplearning_ai_llama_guard.ipynb: Implementing safety guardrails.deeplearning_ai_walkthrough_helper_function.ipynb: Utility functions for Llama API calls.
together_ai_service_setup.ipynb: Setting up and using the Together AI API.tokenise_test_gpt2.ipynb: Testing tokenization with GPT-2.
ml_app/: A standalone Flask application for image classification.app.py: Flask API using MobileNetV2 (TensorFlow/Keras).- Includes sample images for testing.
-
Clone the repository:
git clone https://github.com/ppant/llm-projects.git cd llm-projects -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies: The notebooks require several packages. You can install them using:
pip install langchain openai together python-dotenv tensorflow flask pillow numpy
Some notebooks require API keys from OpenAI or Together AI. Create a .env file in the root directory and add your keys:
OPENAI_API_KEY=your_openai_api_key_here
TOGETHER_API_KEY=your_together_api_key_here- DeepLearning.AI - Prompt Engineering with Llama 2
- Together AI API Documentation
- LangChain Documentation
This project is licensed under the MIT License - see the LICENSE file for details.