• Stars
    star
    1,094
  • Rank 42,362 (Top 0.9 %)
  • Language
    Jupyter Notebook
  • License
    Apache License 2.0
  • Created over 1 year ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A comprehensive guide to understanding and implementing large language models with hands-on examples using LangChain for GenAI applications.

OpenAI Quickstart


English | 中文

This project is designed as a one-stop learning resource for anyone interested in large language models and their application in Generative AI(GenAI) scenarios. By providing theoretical foundations, development basics, and hands-on examples, this project offers comprehensive guidance on these cutting-edge topics.

Features

  • Theory and Development Basics of Large Language Models: Deep dive into the inner workings of large language models like BERT and GPT Family, including their architecture, training methods, applications, and more.

  • OpenAI-based Development: tutorial and best practices for OpenAI's Embedding, GPT-3.5, GPT-4, as well as practical development such as Function Calling and ChatGPT Plugin.

  • GenAI Application Development with LangChain: Hands-on examples and tutorials using LangChain to develop GenAI applications, demonstrating the practical application of large language models(AutoGPT, RAG-chatbot, Machine Translation)

  • LLM Tech Stack and Ecosystem: Data privacy and legal compliance, GPU Technology Selection Guide, Hugging Face quick start, ChatGLM usage.

Getting Started

You can start by cloning this repository to your local machine:

git clone https://github.com/DjangoPeng/openai-quickstart.git

Then navigate to the directory and follow the individual module instructions to get started.

Schedule

Lesson Description Course Materials Events
Lesson 1 Fundamentals of Large Models: Evolution of Theory and Technology
- An Initial Exploration of Large Models: Origin and Development
- Warm-up: Decoding Attention Mechanism
- Milestone of Transformation: The Rise of Transformer
- Taking Different Paths: The Choices of GPT and Bert
Suggested Readings:
- Attention Mechanism: Neural Machine Translation by Jointly Learning to Align and Translate
- An Attentive Survey of Attention Models
- Transformer: Attention is All you Need
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
[Homework]
Lesson 2 The GPT Model Family: From Start to Present
- From GPT-1 to GPT-3.5: The Evolution
- ChatGPT: Where It Wins
- GPT-4: A New Beginning
Prompt Learning
- Chain-of-Thought (CoT): The Pioneering Work
- Self-Consistency: Multi-path Reasoning
- Tree-of-Thoughts (ToT): Continuing the Story
Suggested Readings:
- GPT-1: Improving Language Understanding by Generative Pre-training
- GPT-2: Language Models are Unsupervised Multitask Learners
- GPT-3: Language Models are Few-Shot Learners


Additional Readings:
- GPT-4: Architecture, Infrastructure, Training Dataset, Costs, Vision, MoE
- GPTs are GPTs: An Early Look at the Labor Market Impact Potential of Large Language Models
- Sparks of Artificial General Intelligence: Early experiments with GPT-4

[Homework]
Lesson 3 Fundamentals of Large Model Development: OpenAI Embedding
- The Eve of General Artificial Intelligence
- "Three Worlds" and "Turing Test"
- Computer Data Representation
- Representation Learning and Embedding
Embeddings Dev 101
- Course Project: GitHub openai-quickstart
- Getting Started with OpenAI Embeddings
Suggested Readings:
- Representation Learning: A Review and New Perspectives
- Word2Vec: Efficient Estimation of Word Representations in Vector Space
- GloVe: Global Vectors for Word Representation

Additional Readings:

- Improving Distributional Similarity with Lessons Learned from Word Embeddings
- Evaluation methods for unsupervised word embeddings
[Homework]
Code:
[embedding]
Lesson 4 OpenAI Large Model Development and Application Practice
- OpenAI Large Model Development Guide
- Overview of OpenAI Language Models
- OpenAI GPT-4, GPT-3.5, GPT-3, Moderation
- OpenAI Token Billing and Calculation
OpenAI API Introduction and Practice
- OpenAI Models API
- OpenAI Completions API
- OpenAI Chat Completions API
- Completions vs Chat Completions
OpenAI Large Model Application Practice
- Initial Exploration of Text Completion
- Initial Exploration of Chatbots
Suggested Readings:

- OpenAI Models
- OpenAI Completions API
- OpenAI Chat Completions API
Code:
[models]
[tiktoken]
Lesson 5 Best Practices for Applying Large AI Models
- How to Improve the Efficiency and Quality of GPT Model Use
- Best Practices for Applying Large AI Models
- Text Creation and Generation
- Article Abstract and Summary
- Novel Generation and Content Supervision
- Executing Complex Tasks Step by Step
- Evaluating the Quality of Model Output
- Constructing Training Annotation Data
- Code Debugging Assistant
- New Features: Function Calling Introduction and Practical Application
Suggested Readings
- GPT Best Practices
- Function Calling
Code:
Function Calling
Lesson 6 Practical: OpenAI-Translator
- Market demand analysis for OpenAI-Translator
- Product definition and feature planning for OpenAI-Translator
- Technical solutions and architecture design for OpenAI-Translator
- OpenAI module design
- OpenAI-Translator practical application
Code:
pdfplumber
Lesson 7 ChatGPT Plugin Development Guide
- Introduction to ChatGPT Plugin
- Sample project: Todo management plugin
- Deployment and testing of practical examples
- ChatGPT developer mode
- Practical: Weather Forecast plugin development
- Weather Forecast Plugin design and definition
- Weather Forecast function service
- Integration with third-party weather query platform
- Practical Weather Forecast Plugin
Code:
[todo list]
[weather forecast]
Lesson 8 LLM Application Development Framework LangChain (Part 1)
- LangChain 101
- What is LangChain
- Why LangChain is Needed
- Typical Use Cases of LangChain
- Basic Concepts and Modular Design of LangChain
- Introduction and Practice of LangChain Core Modules
- Standardized Large-Scale Model Abstraction: Mode I/O
- Template Input: Prompts
- Language Model: Models
- Standardized Output: Output Parsers
Code:
[model io]
Lesson 9 LLM Application Development Framework LangChain (Part 2)
- Best Practices for LLM Chains
- Getting Started with Your First Chain: LLM Chain
- Sequential Chain: A Chained Call with Sequential Arrangement
- Transform Chain: A Chain for Processing Long Texts
- Router Chain: A Chain for Implementing Conditional Judgments
- Memory: Endowing Applications with Memory Capabilities
- The Relationship between Memory System and Chain
- BaseMemory and BaseChatMessageMemory: Memory Base Classes
- Memory System for Service Chatting
- ConversationBufferMemory
- ConversationBufferWindowMemory
- ConversationSummaryBufferMemory
Code:
[chain]
[memory]
Lesson 10 LLM Application Development Framework LangChain (Part 3)
- Native data processing flow of the framework: Data Connection
- Document Loaders
- Document Transformers
- Text Embedding Models
- Vector Stores
- Retrievers
- Agent Systems for Building Complex Applications: Agents
- Theoretical Foundation of Agents: ReAct
- LLM Reasoning Capabilities: CoT, ToT
- LLM Operation Capabilities: WebGPT, SayCan
- LangChain Agents Module Design and Principle Analysis
- Module: Agent, Tools, Toolkits
- Runtime: AgentExecutor, PlanAndExecute, AutoGPT
- Getting Started with Your First Agent: Google Search + LLM
- Practice with ReAct: SerpAPI + LLM-MATH
Code:
[data connection]
[agents]
Lesson 11 Practical: LangChain version OpenAI-Translator v2.0
- In-depth understanding of Chat Model and Chat Prompt Template
- Review: LangChain Chat Model usage and process
- Design translation prompt templates using Chat Prompt Template
- Implement bilingual translation using Chat Model
- Simplify Chat Prompt construction using LLMChain
- Optimize OpenAI-Translator architecture design based on LangChain
- Hand over large model management to LangChain framework
- Focus on application-specific Prompt design
- Implement translation interface using TranslationChain
- More concise and unified configuration management
- Development of OpenAI-Translator v2.0 feature
- Design and implementation of graphical interface based on Gradio
- Design and implementation of Web Server based on Flask
Code:
[openai-translator]
Lesson 12 Practical: LangChain version Auto-GPT
- Auto-GPT project positioning and value interpretation
- Introduction to Auto-GPT open source project
- Auto-GPT positioning: an independent GPT-4 experiment
- Auto-GPT value: an attempt at AGI based on Agent
- LangChain version Auto-GPT technical solution and architecture design
- In-depth understanding of LangChain Agents
- LangChain Experimental module
- Auto-GPT autonomous agent design
- Auto-GPT Prompt design
- Auto-GPT Memory design
- In-depth understanding of LangChain VectorStore
- Auto-GPT OutputParser design
- Practical LangChain version Auto-GPT
Code:
[autogpt]
Lesson 13 Sales-Consultant business process and value analysis
- Technical solution and architecture design of Sales-Consultant
- Use GPT-4 to generate sales pitches
- Store sales Q&A pitches in FAISS vector database
- Retrieve sales pitches data using RetrievalQA
- Implement chatbot graphical interface using Gradio
- Practical LangChain version Sales-Consultant
Code:
[sales_chatbot]
Lesson 14 Era of large models: Open source and data protocols
- What is open source?
- Widely used open source and data protocols
- Is Llama pseudo-open source?
- Open source protocol of ChatGLM2-6B
Interpretability of large language models
- Enhancing transparency in model decision-making
- Related research of Stanford Alpaca
Regulatory compliance of large language model applications
- Mainland China: Registration of generative AI services
- International: Data privacy and protection (taking GDPR as an example)
- Key points of corporate compliance
Lesson 15 Github in the era of large models: Hugging Face
- What is Hugging Face?
- Hugging Face Transformers library
- Hugging Face open community: Models, Datasets, Spaces, Docs
- Comparative analysis of large models
- Open LLM Leaderboard (Large Model Ladder)
Graphics card selection guide
- GPU vs Graphics card
- GPU Core vs AMD CU
- CUDA Core vs Tensor Core
- Evolution of Nvidia architectures
- Graphics card performance ladder
Lesson 16 Tsinghua GLM large model family
- Strongest base model GLM-130B
- Enhanced dialogue capability ChatGLM
- Open source chat model ChatGLM2-6B
- Internet search capability WebGLM
- Initial exploration of multimodal VisualGLM-6B
- Code generation model CodeGeex2
Application development of ChatGLM2-6B large model
- Private deployment of ChatGLM2-6B
- HF Transformers Tokenizer
- HF Transformers Model
- Synchronize the model to Hugging Face
- Empower ChatGLM2-6B graphical interface using Gradio
- Fine-tuning of ChatGLM2-6B model
- Practical assignment: Implement graphical interface of openai-translator based on ChatGLM2-6B

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. If you have any suggestions or feature requests, please open an issue first to discuss what you would like to change.

Github

License

This project is licensed under the terms of the Apache-2.0 License . See the LICENSE file for details.

Contact

Django Peng - [email protected]

Project Link: https://github.com/DjangoPeng/openai-quickstart

More Repositories

1

tensorflow-101

《TensorFlow 快速入门与实战》和《TensorFlow 2 项目进阶实战》课程代码与课件
Jupyter Notebook
453
star
2

LLM-quickstart

Quick Start for Large Language Models (Theoretical Learning and Practical Fine-tuning) 大语言模型快速入门(理论学习与微调实战)
Jupyter Notebook
450
star
3

tensorflow-in-depth

《深入理解TensorFlow》项目代码与样章
Python
304
star
4

agent-hub

This repository is a hub for AI Agent projects, including GitHub Sentinel, LanguageMentor, and ChatPPT, designed to enhance enterprise workflows, language learning, and multimodal interaction. Explore a growing family of agents geared towards revolutionizing various industries with cutting-edge AI solutions.
Shell
75
star
5

openai-translator

A versatile AI translation tool powered by LLMs.
Python
72
star
6

GitHubSentinel

GitHub Sentinel 是专为大模型(LLMs)时代打造的智能信息检索和高价值内容挖掘 AI Agent。它面向那些需要高频次、大量信息获取的用户,特别是开源爱好者、个人开发者和投资人等。GitHub Sentinel 不仅能帮助用户自动跟踪和分析 GitHub 开源项目 的最新动态,还能快速扩展到其他信息渠道,如 Hacker News 的热门话题,提供更全面的信息挖掘与分析能力。
Jupyter Notebook
66
star
7

keras-101

Keras 快速入门与实战
Jupyter Notebook
60
star
8

start-ai

从零开始学习人工智能(Start-AI)
39
star
9

aml-101

微软机器学习(Azure Machine Learning)快速入门与实战
Jupyter Notebook
25
star
10

tensorflow2-tutorials

Tutorials of TensorFlow 2.0(Keras, Eager, TFX, etc)
Jupyter Notebook
18
star
11

leetcode-solutions

The Python solutions of leetcode
Jupyter Notebook
12
star
12

DjangoPeng.github.io

Personal Blog
HTML
9
star
13

CRF

Build the crf++ project with Visual Studio in MS-Windows
C++
7
star
14

PredictionModel

Python
6
star
15

word2vec

Build word2vec with Visual Studio in MS-Windows
C
2
star