
Set up a Pipenv environment and install the required libraries. Load Mistral A-7b from Hugging Face as an 8-bit quantized CPU model and stream text in the terminal.
Explore how prompts guide language models using prompt templates for dynamic customization with variables and placeholders. Learn how to construct a chain to apply these prompts in practice.
Learn to add memory to a chatbot by using LangChain's conversation buffer memory with a chat history key, load memory variables via runnable lambda, and save context after each exchange.
Open a terminal, navigate to chat and back end, install LangChain, llama cpp, Python, and faster pi, create a models directory, and download gemma seven with wget.
Create a fast api app with cors middleware for localhost 5173 and credentials, install an auto formatter, and build a chat prompt template with a language model, stopping at Q.
Configure allow origins to asterisk to make the url accessible, run uvicorn with reload, publish port 8000, and update the frontend to use the copied url with /chat.
In this course I will teach you how to use langchain to build LLM powered Applications and I will be using Open source models from hugging face
What is LangChain?
LangChain serves as a framework aimed at streamlining the development of applications utilizing Large language models. Functioning as a language model integration framework, LangChain's applications align closely with those of language models, spanning document analysis, summarization, chatbots, and code analysis.
What is an LLM?
A Large Language Model (LLM) is a type of artificial intelligence model that is trained on a vast amount of text data. It’s designed to generate human-like text based on the input it receives.
In this course, I will be using LLMs such as Llama 2 7B and Mistral 7B.
What is LCEL?
LangChain Expression Language (LCEL) emerges as a declarative method within the LangChain framework, enabling effortless composition of chains. From its inception, LCEL prioritizes seamless transition from prototypes to production, accommodating a spectrum of complexities, from straightforward "prompt + LLM" sequences to intricate chains comprising hundreds of steps. Noteworthy features encompass streaming support for optimal time-to-first-token, asynchronous capabilities for versatile API usage, and optimized parallel execution for reduced latency. LCEL further offers configurations for retries, fallbacks, and access to intermediate results, enhancing reliability and debugging.
In this course you learn
- Langchain Basics
- Langchain Expression Language
- Chains
- Memory
- Agents and Tools
- RAG etc
Disclaimer:
In this course I won't be using Open Ai API instead I would be using Open source models from hugging face and i will be using windows, kaggle