为了方便LLM相关的学习,整理了ChatGPT相关开源库列表,包括数据预处理、训练/微调、评估/基准测试、服务/推理、应用/RAG、测试/监控、安全等。
LLM 数据处理
- data-juicer [github.com/modelscope/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fmodelscope%2Fdata-juicer "https://github.com/modelscope/data-juicer") 一个一站式数据处理系统,使数据质量更高、更丰富、更易于(多模态)LLM处理!
- datatrove [github.com/huggingface...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fhuggingface%2Fdatatrove "https://github.com/huggingface/datatrove") 通过提供一组平台无关的可定制管道处理模块,解放数据处理脚本的混乱。
- dolma [github.com/allenai/dol...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fallenai%2Fdolma "https://github.com/allenai/dolma") 用于生成和检查OLMo预训练数据的数据和工具。
- dataverse [github.com/UpstageAI/d...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FUpstageAI%2Fdataverse "https://github.com/UpstageAI/dataverse") 数据的宇宙。关于数据、数据科学和数据工程的一切。
- NeMo-Curator [github.com/NVIDIA/NeMo...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FNVIDIA%2FNeMo-Curator "https://github.com/NVIDIA/NeMo-Curator") 可扩展的数据管理工具包。
- dps [github.com/EleutherAI/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FEleutherAI%2Fdps "https://github.com/EleutherAI/dps") 多语言数据处理系统。
LLM 训练 / 微调
- nanoGPT [github.com/karpathy/na...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fkarpathy%2FnanoGPT "https://github.com/karpathy/nanoGPT") 最简单、最快速的中型GPT训练/微调仓库。
- LLaMA-Factory [github.com/hiyouga/LLa...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fhiyouga%2FLLaMA-Factory "https://github.com/hiyouga/LLaMA-Factory") 一个用于高效微调100+ LLMs的WebUI(ACL 2024)。
- peft [github.com/huggingface...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fhuggingface%2Fpeft "https://github.com/huggingface/peft") PEFT:最先进的参数高效微调。
- llama-recipes [github.com/meta-llama/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-recipes "https://github.com/meta-llama/llama-recipes") 使用可组合的FSDP和PEFT方法微调Meta Llama3的脚本,覆盖单节点/多节点GPU。
- Megatron-LM [github.com/NVIDIA/Mega...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FNVIDIA%2FMegatron-LM "https://github.com/NVIDIA/Megatron-LM") 大规模训练Transformer模型的持续研究。
- litgpt [github.com/Lightning-A...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FLightning-AI%2Flitgpt "https://github.com/Lightning-AI/litgpt") 20+高性能LLM,提供预训练、微调和大规模部署的配方。
- trl [github.com/huggingface...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fhuggingface%2Ftrl "https://github.com/huggingface/trl") 使用强化学习训练Transformer语言模型。
- LMFlow [github.com/OptimalScal...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FOptimalScale%2FLMFlow "https://github.com/OptimalScale/LMFlow") 一个用于大模型微调和推理的可扩展工具包。大模型为所有人服务。
- gpt-neox [github.com/EleutherAI/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FEleutherAI%2Fgpt-neox "https://github.com/EleutherAI/gpt-neox") 基于Megatron和DeepSpeed库的GPU上模型并行自回归Transformer的实现。
- torchtune [github.com/pytorch/tor...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fpytorch%2Ftorchtune "https://github.com/pytorch/torchtune") 一个原生PyTorch的LLM微调库。
- xtuner [github.com/InternLM/xt...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FInternLM%2Fxtuner "https://github.com/InternLM/xtuner") 一个高效、灵活且功能齐全的LLM微调工具包(支持InternLM2、Llama3、Phi3、Qwen、Mistral等)。
- nanotron [github.com/huggingface...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fhuggingface%2Fnanotron "https://github.com/huggingface/nanotron") 极简的大语言模型3D并行训练。
LLM 评估 / 基准测试
- evals [github.com/openai/eval...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fopenai%2Fevals "https://github.com/openai/evals") 一个用于评估LLM和LLM系统的框架,以及一个开源的基准测试注册表。
- lm-evaluation-harness [github.com/EleutherAI/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FEleutherAI%2Flm-evaluation-harness "https://github.com/EleutherAI/lm-evaluation-harness") 一个用于少样本评估语言模型的框架。
- opencompass [github.com/open-compas...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fopen-compass%2Fopencompass "https://github.com/open-compass/opencompass") 一个LLM评估平台,支持多种模型(Llama3、Mistral、InternLM2、GPT-4、LLaMa2、Qwen、GLM、Claude等)和100+数据集。
- deepeval [github.com/confident-a...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fconfident-ai%2Fdeepeval "https://github.com/confident-ai/deepeval") LLM评估框架。
- lighteval [github.com/huggingface...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fhuggingface%2Flighteval "https://github.com/huggingface/lighteval") LightEval是一个轻量级的LLM评估套件,Hugging Face内部使用,最近发布了LLM数据处理库datatrove和LLM训练库nanotron。
- evalverse [github.com/UpstageAI/e...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FUpstageAI%2Fevalverse "https://github.com/UpstageAI/evalverse") 评估的宇宙,关于LLM评估的一切。
LLM 服务 / 推理
- ollama [github.com/ollama/olla...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Follama%2Follama "https://github.com/ollama/ollama") 快速启动并运行Llama 3.1、Mistral、Gemma 2和其他大语言模型。
- gpt4all [github.com/nomic-ai/gp...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fnomic-ai%2Fgpt4all "https://github.com/nomic-ai/gpt4all") GPT4All:在任何设备上与本地LLMs聊天。
- llama.cpp [github.com/ggerganov/l...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fggerganov%2Fllama.cpp "https://github.com/ggerganov/llama.cpp") 用C/C++进行LLM推理。
- FastChat [github.com/lm-sys/Fast...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flm-sys%2FFastChat "https://github.com/lm-sys/FastChat") 一个用于训练、服务和评估大语言模型的开放平台。Vicuna和Chatbot Arena的发布仓库。
- vllm [github.com/vllm-projec...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fvllm-project%2Fvllm "https://github.com/vllm-project/vllm") 一个高吞吐量和内存高效的LLM推理和服务引擎。
- guidance [github.com/guidance-ai...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fguidance-ai%2Fguidance "https://github.com/guidance-ai/guidance") 一个用于控制大语言模型的指导语言。
- LiteLLM [github.com/BerriAI/lit...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FBerriAI%2Flitellm "https://github.com/BerriAI/litellm") 使用OpenAI格式调用所有LLM API。支持Bedrock、Azure、OpenAI、Cohere、Anthropic、Ollama、Sagemaker、HuggingFace、Replicate、Groq(100+ LLMs)。
- OpenLLM [github.com/bentoml/Ope...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fbentoml%2FOpenLLM "https://github.com/bentoml/OpenLLM") 在云中以OpenAI兼容的API端点运行任何开源LLM,如Llama 3.1、Gemma。
- text-generation-inference [github.com/huggingface...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fhuggingface%2Ftext-generation-inference "https://github.com/huggingface/text-generation-inference") 大语言模型文本生成推理。
- TensorRT-LLM [github.com/NVIDIA/Tens...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FNVIDIA%2FTensorRT-LLM "https://github.com/NVIDIA/TensorRT-LLM") TensorRT-LLM为用户提供了一个易于使用的Python API,用于定义大语言模型(LLMs)并构建包含最先进优化的TensorRT引擎,以在NVIDIA GPU上高效地进行推理。
- LMDeploy [github.com/InternLM/lm...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FInternLM%2Flmdeploy "https://github.com/InternLM/lmdeploy") LMDeploy是一个用于压缩、部署和服务LLM的工具包。
- RouteLLM [github.com/lm-sys/Rout...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flm-sys%2FRouteLLM "https://github.com/lm-sys/RouteLLM") 一个用于服务和评估LLM路由器的框架------在不牺牲质量的情况下节省LLM成本!
LLM 应用 / RAG
- AutoGPT [github.com/Significant...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FSignificant-Gravitas%2FAutoGPT "https://github.com/Significant-Gravitas/AutoGPT") AutoGPT是人人可用的AI愿景,供使用和构建,我们的使命是提供工具,让你专注于重要的事情。
- langchain [github.com/langchain-a...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flangchain-ai%2Flangchain "https://github.com/langchain-ai/langchain") 构建上下文感知的推理应用。
- MetaGPT [github.com/geekan/Meta...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fgeekan%2FMetaGPT "https://github.com/geekan/MetaGPT") 多代理框架:第一个AI软件公司,迈向自然语言编程。
- dify [github.com/langgenius/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flanggenius%2Fdify "https://github.com/langgenius/dify") Dify是一个开源的LLM应用开发平台。Dify的直观界面结合了AI工作流、RAG管道、代理功能、模型管理、可观察性功能等,让你快速从原型到生产。
- llama_index [github.com/run-llama/l...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Frun-llama%2Fllama_index "https://github.com/run-llama/llama_index") LlamaIndex是一个用于LLM应用的数据框架。
- Flowise [github.com/FlowiseAI/F...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FFlowiseAI%2FFlowise "https://github.com/FlowiseAI/Flowise") 拖放式UI构建自定义LLM流程。
- mem0 [github.com/mem0ai/mem0](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fmem0ai%2Fmem0 "https://github.com/mem0ai/mem0") 个性化AI的记忆层。
- haystack [github.com/deepset-ai/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fdeepset-ai%2Fhaystack "https://github.com/deepset-ai/haystack") LLM编排框架,用于构建可定制的、生产就绪的LLM应用。将组件(模型、向量数据库、文件转换器)连接到管道或代理,以便与数据交互。
- GraphRAG [github.com/microsoft/g...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fgraphrag "https://github.com/microsoft/graphrag") 一个模块化的基于图的检索增强生成(RAG)系统。
- RAGFlow [github.com/infiniflow/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Finfiniflow%2Fragflow "https://github.com/infiniflow/ragflow") RAGFlow是一个基于深度文档理解的开源RAG(检索增强生成)引擎。
- llmware [github.com/llmware-ai/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fllmware-ai%2Fllmware "https://github.com/llmware-ai/llmware") 用于构建企业RAG管道的统一框架,使用小型、专用模型。
- llama-agentic-system [github.com/meta-llama/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fmeta-llama%2Fllama-agentic-system "https://github.com/meta-llama/llama-agentic-system") Llama Stack API的代理组件。
LLM 测试 / 监控
- promptflow [github.com/microsoft/p...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fpromptflow "https://github.com/microsoft/promptflow") 构建高质量的LLM应用------从原型、测试到生产部署和监控。
- langfuse [github.com/langfuse/la...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Flangfuse%2Flangfuse "https://github.com/langfuse/langfuse") 开源LLM工程平台:可观察性、指标、评估、提示管理、操场、数据集,与LlamaIndex、Langchain、OpenAI SDK、LiteLLM等集成。
- evidently [github.com/evidentlyai...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fevidentlyai%2Fevidently "https://github.com/evidentlyai/evidently") Evidently是一个开源的ML和LLM可观察性框架,评估、测试和监控任何AI驱动的系统或数据管道。从表格数据到生成AI,100+指标。
- giskard [github.com/Giskard-AI/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FGiskard-AI%2Fgiskard "https://github.com/Giskard-AI/giskard") 开源的LLM和ML模型评估与测试。
- promptfoo [github.com/promptfoo/p...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fpromptfoo%2Fpromptfoo "https://github.com/promptfoo/promptfoo") 测试你的提示、代理和RAG。对LLM进行红队测试、渗透测试和漏洞扫描,提高应用质量并发现问题。比较GPT、Claude、Gemini、Llama等的性能,简单的声明性配置,支持命令行和CI/CD集成。
- phoenix [github.com/Arize-ai/ph...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FArize-ai%2Fphoenix "https://github.com/Arize-ai/phoenix") AI可观察性与评估。
- agenta [github.com/Agenta-AI/a...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FAgenta-AI%2Fagenta "https://github.com/Agenta-AI/agenta") 一体化LLM开发平台:提示管理、评估、人类反馈和部署一站式解决。
LLM 安全
- NeMo-Guardrails [github.com/NVIDIA/NeMo...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2FNVIDIA%2FNeMo-Guardrails "https://github.com/NVIDIA/NeMo-Guardrails") NeMo Guardrails是一个开源工具包,用于轻松为基于LLM的对话系统添加可编程护栏。
- guardrails [github.com/guardrails-...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fguardrails-ai%2Fguardrails "https://github.com/guardrails-ai/guardrails") 为大语言模型添加护栏。
- PurpleLlama [github.com/meta-llama/...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fmeta-llama%2FPurpleLlama "https://github.com/meta-llama/PurpleLlama") 一套评估和改进LLM安全性的工具。
- llm-guard [github.com/protectai/l...](https://link.juejin.cn?target=https%3A%2F%2Fgithub.com%2Fprotectai%2Fllm-guard "https://github.com/protectai/llm-guard") LLM交互的安全工具包。