欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

开源大型语言模型 (LLM) 摘要(持续更新)

最编程 2024-04-06 08:11:30
...

随着ChatGPT的火爆,越来越多人希望在本地运行一个大语言模型。为此我维护了这个开源大语言模型汇总,跟踪每天不发的大语言模型和精调语言模型。

我将根据个模型采用的基础大模型进行分类,每个大模型下列出各派生模型。

Alpaca (Stanford)

斯坦福Alpaca:一种指令遵从型 LLaMA 模型。

  • ????Alpaca 官网: https://crfm.stanford.edu/2023/03/13/alpaca.html
  • ❤️Alpaca GitHub: https://github.com/tatsu-lab/stanford_alpaca
  • ????是否可以商用: 否

以下是基于 Stanford Alpaca 项目的衍生模型或类似模型:

  • Alpaca.cpp
  • Alpaca-LoRA
  • Baize
  • Cabrita
  • BELLE
  • Luotuo
  • Vicuna
  • Chinese-Vicuna
  • GPT4All
  • Koala
  • llama.cpp
  • Lit-LLaMA ️
Alpaca.cpp

一个可以在本地设备上快速运行的类ChatGPT模型。视频中演示的模型具有4G权重,运行在M2芯片的Macbook Air上。视频是原始速度,没有加速。

  • GitHub: https://github.com/antimatter15/alpaca.cpp
Alpaca-LoRA

该项目使用低秩适应 (LoRA) 重现Stanford Alpaca。

项目提供了一个与 text-davinci-003 质量相似的指令模型,可以在 Raspberry Pi 上运行(用于研究),代码可以很容易地扩展到 13B、30B 和 65B 模型。

  • ❤️GitHub: GitHub - tloen/alpaca-lora: Instruct-tune LLaMA on consumer hardware
  • ????Demo: Alpaca-LoRA — a Hugging Face Space by tloen
Baize

Baize 是一个使用 LoRA 微调的开源聊天模型。 它使用与 ChatGPT 聊天生成的 100k 对话进行训练。 还使用 Alpaca 的数据来提高其性能。 目前已经发布了 7B、13B 和 30B 规模模型。

  • ❤️GitHub: https://github.com/project-baize/baize
  • ????论文: 2304.01196.pdf (arxiv.org)
Cabrita

基于LLaMA的葡萄牙语微调模型

  • ❤️GitHub: https://github.com/22-hours/cabrita
BELLE

BELLE 基于斯坦福的 Alpaca 完成,对中文做了优化,并对生成代码进行了一些修改,模型调优仅使用由 ChatGPT 生产的数据(不包含任何其他数据)。

  • ❤️GitHub: https://github.com/LianjiaTech/BELLE
Luotuo

来自商汤科技和华中科技大学开源中文语言模型骆驼 Luotuo,该项目基于 LLaMA、Stanford Alpaca、Alpaca LoRA、Japanese-Alpaca-LoRA 等完成,单卡就能完成训练部署。

  • ❤️GitHub: GitHub - LC1332/Luotuo-Chinese-LLM: 骆驼(Luotuo): Open Sourced Chinese Language Models. Developed by 陈启源 @ 华中师范大学 & 李鲁鲁 @ 商汤科技 & 冷子昂 @ 商汤科技
  • ❤️GitHub: GitHub - LC1332/Chinese-alpaca-lora: 骆驼:A Chinese finetuned instruction LLaMA. Developed by 陈启源 @ 华中师范大学 & 李鲁鲁 @ 商汤科技 & 冷子昂 @ 商汤科技
Vicuna (FastChat)

一个达到ChatGPT 90%效果的开源聊天机器人。

  • ❤️GitHub: GitHub - lm-sys/FastChat: An open platform for training, serving, and evaluating large language models. Release repo for Vicuna and Chatbot Arena.
  • ????视频: Vicuna — 90% of ChatGPT quality by using a new dataset? — YouTube
Chinese-Vicuna

一个中文低资源的LLaMA + LoRA方案,结构参考Alpaca

  • ❤️GitHub: https://github.com/Facico/Chinese-Vicuna
GPT4All

基于 LLaMA,用大约 800k GPT-3.5-Turbo 生成数据训练的助手式大语言模型。

  • ❤️GitHub: GitHub - nomic-ai/gpt4all: gpt4all: run open-source LLMs anywhere
  • ????视频: Is GPT4All your new personal ChatGPT? — YouTube
Koala

Koala 是一个在 LLaMA 上微调的语言模型。

  • ????博客: Koala: A Dialogue Model for Academic Research — The Berkeley Artificial Intelligence Research Blog
  • ❤️GitHub: EasyLM/koala.md at main · young-geng/EasyLM (github.com)
  • ????Demo: FastChat (lmsys.org)
  • ????视频: Investigating Koala a ChatGPT style Dialogue Model — YouTube
llama.cpp

用纯C/C++实现的LLaMA模型推理。支持3个模型:LLaMAAlpacaGPT4All

  • ❤️GitHub: GitHub - ggerganov/llama.cpp: LLM inference in C/C++
Lit-LLaMA ️

LLaMA 的独立实现,支持量化、LoRA微调和预训练。在 Apache 2.0 许可下完全开源。 此实现基于 nanoGPT

  • ❤️GitHub: GitHub - Lightning-AI/lit-llama: Implementation of the LLaMA language model based on nanoGPT. Supports flash attention, Int8 and GPTQ 4bit quantization, LoRA and LLaMA-Adapter fine-tuning, pre-training. Apache 2.0-licensed.

BLOOM (BigScience)

BigScience 大型开放科学开放存取多语言模型。

  • ❤️Hugging Face: bigscience/bloom · Hugging Face
  • ????Hugging Face Demo: Bloom Demo — a Hugging Face Space by huggingface

以下是基于 BigScience BLOOM 项目的衍生模型或类似模型:

  • BLOOM-LoRA
  • Petals
BLOOM-LoRA

各种指令调优数据集的低秩适应模型。

  • ❤️GitHub: GitHub - linhduongtuan/BLOOM-LORA: Due to restriction of LLaMA, we try to reimplement BLOOM-LoRA (much less restricted BLOOM license here https://huggingface.co/spaces/bigscience/license) using Alpaca-LoRA and Alpaca_data_cleaned.json
Petals

使用分布式 176B 参数 BLOOM 或 BLOOMZ 生成文本,并根据您自己的任务对其进行微调。

  • ❤️GitHub: GitHub - bigscience-workshop/petals: ???? Run LLMs at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading

Flamingo (Google/Deepmind)

使用单一视觉语言模型处理多项任务

  • ????官网: Tackling multiple tasks with a single visual language model

以下是基于 Flamingo 项目的衍生模型或类似模型:

  • Flamingo — Pytorch
  • OpenFlamingo
Flamingo — Pytorch

在 Pytorch 中实现 Flamingo。包括感知器重采样器(包括学习查询贡献要注意的键/值的方案,以及媒体嵌入)、专门的掩码交叉注意力块,以及交叉注意力末端的 tanh 门控 + 相应的前馈块。

  • ❤️GitHub: https://github.com/lucidrains/flamingo-pytorch
OpenFlamingo

DeepMind Flamingo 模型的开源版本。提供了用于训练和评估 OpenFlamingo 模型的 PyTorch 实现。还提供了在新的多模态 C4 数据集(即将推出)上训练的初始 OpenFlamingo 9B 模型。

  • ❤️GitHub: GitHub - mlfoundations/open_flamingo: An open-source framework for training large multimodal models.

FLAN (Google)

包含用于生成指令调优数据集集合的代码。 第一个是原始的 Flan 2021,记录在 Finetuned Language Models are Zero-Shot Learners 中;第二个是扩展版本,被称为 Flan Collection,记录在 The Flan Collection: Designing Data and Methods for Effective Instruction Tuning 中,用于生成 Flan-T5 和 Flan-PaLM

  • ❤️GitHub: GitHub - google-research/FLAN

以下是基于 FLAN 项目的衍生模型或类似模型:

  • Flan-Alpaca
  • Flan-UL2
Flan-Alpaca

来自人类和机器的指令调优。 包含用于将 Stanford Alpaca 合成指令调优扩展到现有指令调优模型(例如 Flan-T5)的代码。 HuggingFace 上提供了预训练模型和演示。

  • ❤️GitHub: GitHub - declare-lab/flan-alpaca: This repository contains code for extending the Stanford Alpaca synthetic instruction tuning to existing instruction-tuned models such as Flan-T5.
Flan-UL2

Flan-UL2是基于T5架构的编解码器模型。 它使用与去年早些时候发布的 UL2 模型相同的配置。 使用“Flan”提示调整和数据集收集对其进行了微调。

  • ❤️Hugging Face: google/flan-ul2 · Hugging Face
  • ????视频: Trying Out Flan 20B with UL2 — Working in Colab with 8Bit Inference — YouTube

GLM (General Language Model)

GLM 是一种使用自回归填空目标进行预训练的通用语言模型,可以针对各种自然语言理解和生成任务进行微调。

以下是基于 GLM 项目的衍生模型或类似模型:

  • GLM-130B
  • ChatGLM-6B
GLM-130B

GLM-130B是一个开放的双语(英汉)双向密集模型,拥有1300亿个参数,使用通用语言模型(GLM)的算法进行预训练。 它旨在在单台A100(40G * 8)或V100(32G * 8)服务器上用具有130B参数模型进行推理任务。 通过 INT4 量化,硬件要求可以进一步降低到具有 4 * RTX 3090(24G)的单个服务器,而性能几乎没有下降。 截至 2022 年 7 月 3 日,GLM-130B 已经接受了超过 4000 亿个文本标记的训练(中文和英文各 200B)。

  • ❤️GitHub: GitHub - THUDM/GLM-130B: GLM-130B: An Open Bilingual Pre-Trained Model (ICLR 2023)
ChatGLM-6B

ChatGLM-6B 是一个开源的、支持中英双语的对话语言模型,基于 General Language Model (GLM) 架构,具有 62 亿参数。结合模型量化技术,用户可以在消费级的显卡上进行本地部署(INT4 量化级别下最低只需 6GB 显存)。 ChatGLM-6B 使用了和 ChatGPT 相似的技术,针对中文问答和对话进行了优化。经过约 1T 标识符的中英双语训练,辅以监督微调、反馈自助、人类反馈强化学习等技术的加持,62 亿参数的 ChatGLM-6B 已经能生成相当符合人类偏好的回答。

  • ????官网: ChatGLM
  • ❤️GitHub: GitHub - THUDM/ChatGLM-6B: ChatGLM-6B: An Open Bilingual Dialogue Language Model | 开源双语对话语言模型

GPT-J (EleutherAI)

GPT-J 是 EleutherAI 开发的开源人工智能语言模型。GPT-J 在各种零样本下游任务上的表现与 OpenAI 的 GPT-3 非常相似,甚至在代码生成任务上的表现优于它。

最新版本 GPT-J-6B 是一种基于名为 The Pile 的数据集的语言模型。The Pile 是一个开源的 825 GB 语言建模数据集,分为 22 个较小的数据集。GPT-J 在能力上与 ChatGPT 类似,虽然它不具有聊天机器人的功能,仅作为文本预测器。

  • ❤️GitHub: https://github.com/kingoflolz/mesh-transformer-jax/#gpt-j-6b
  • ????Demo: https://6b.eleuther.ai/

以下是基于 GPT-J 项目的衍生模型或类似模型:

  • Dolly
Dolly (Databricks)

Databricks 的 Dolly 是一个在 Databricks 机器学习平台上训练的大型语言模型,它基于开源模型 (GPT-J) 在对 50k的重点语料库(Stanford Alpaca)进行仅 30 分钟的微调 ,就表现出令人惊讶的高质量指令遵循行为。 我们认为这一发现很重要,因为它表明创造强大的人工智能技术的能力比以前意识到的要容易得多。

  • ❤️GitHub: GitHub - databrickslabs/dolly: Databricks’ Dolly, a large language model trained on the Databricks Machine Learning Platform
  • ????视频: Meet Dolly the new Alpaca model — YouTube

Cerebras-GPT (Cerebras)

一系列开源、高效的大型语言模型。 Cerebras 开源了七个 GPT-3 模型,参数从 1.11 亿到 130 亿。 这些模型使用 Chinchilla 公式进行训练,为准确性和计算效率设定了新的基准。

  • ????官网: Cerebras-GPT: A Family of Open, Compute-efficient, Large Language Models — Cerebras
  • ❤️Hugging Face: cerebras (Cerebras) (huggingface.co)
  • ????视频: Checking out the Cerebras-GPT family of models — YouTube

GPT-NeoX

该项目记录了 EleutherAI 用于在 GPU 上训练大规模语言模型的库。 当前的框架基于 NVIDIA 的 Megatron 语言模型,并通过 DeepSpeed 技术以及一些新颖的优化得到了增强。 目标是使这个项目成为一个可访问的集散地,以收集训练大规模自回归语言模型的技术,并加速对大规模训练的研究。

  • ❤️GitHub: GitHub - EleutherAI/gpt-neox: An implementation of model parallel autoregressive transformers on GPUs, based on the DeepSpeed library.

HuggingGPT

HuggingGPT 是一个协作系统,由作为控制器的 LLM 和作为协作执行者的众多专家模型组成(来自 HuggingFace Hub)。

  • ❤️GitHub: GitHub - microsoft/JARVIS: JARVIS, a system to connect LLMs with ML community. Paper: https://arxiv.org/pdf/2303.17580.pdf
  • ????论文: https://arxiv.org/abs/2303.17580

Polyglot

多语言均衡能力的大型语言模型。 由于对当前多语言模型的非英语性能不满意,Polyglot团队制作了非英语语言性能更高的多语言模型,并将其命名为“Polyglot”。

  • ❤️GitHub: GitHub - EleutherAI/polyglot: Polyglot: Large Language Models of Well-balanced Competence in Multi-languages

Pythia

跨时间和尺度解释自回归Transformer

  • ❤️GitHub: GitHub - EleutherAI/pythia: The hub for EleutherAI's work on interpretability and learning dynamics

Segment Anything

Segment Anything Model (SAM) 根据输入提示(例如点或框)生成高质量的对象掩码,它可用于为图像中的所有对象生成掩码。 它已经在 1100 万张图像和 11 亿个掩码的数据集上进行了训练,并且在各种分割任务上具有很强的零样本性能。

  • ????官网: Introducing Segment Anything: Working toward the first foundation model for image segmentation (facebook.com)
  • ❤️GitHub: GitHub - facebookresearch/segment-anything: The repository provides code for running inference with the SegmentAnything Model (SAM), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.

The RWKV Language Model

RWKV:具有 Transformer 级 LLM 性能的可并行化 RNN(RWKV来自Transformer的4 个主要参数:R W K V)

  • ❤️GitHub: https://github.com/BlinkDL/RWKV-LM/RWKV-LM
  • ❤️ChatRWKV: https://github.com/BlinkDL/ChatRWKV
  • ????Hugging Face Demo: HuggingFace Gradio demo (14B ctx8192)
  • ????Hugging Face Demo: Raven (7B finetuned on Alpaca) Demo
  • ????视频: Raven — RWKV-7B RNN’s LLM Strikes Back — YouTube

XGLM

XGLM 模型是 Few-shot Learning with Multilingual Language Models 中提出的模型。

  • ❤️GitHub: https://github.com/facebookresearch/fairseq/tree/main/examples/xglm
  • ❤️Hugging Face: https://huggingface.co/docs/transformers/model_doc/xglm