LLM Scientist Roadmap

2025-02-05 00:25


1. The LLM Architecture


While an in-depth knowledge about the Transformer architecture is not required, it is important to have a good understanding of its inputs (tokens) and outputs (logits). The vanilla attention mechanism is another crucial component to master, as improved versions of it are introduced later on.

1.1 Tokenization


Understand how to convert raw text data into a format that the model can understand, which involves splitting the text into tokens (usually words or subwords).


Name

Category

Article Category

Source

Rating

Resources

Note

1

Tokenization 分词


分词是 NLP 的基础任务,将句子,段落分解为字词单位,方便后续的处理的分析。

Concept

技术点详解, 引导理解

Youtube

★★★★★

Natural Language Processing - Tokenization (NLP Zero to Hero - Part 1)

https://www.youtube.com/watch?v=fNxaJsNG3-s

比较基础的解释tokenization的视频

技术点详解, 引导理解

CSDN

★★★★★

AI多模态基础知识点:LLM小白也能看懂的分词(tokenization)解读

https://blog.csdn.net/AIGCmagic/article/details/142650858

分词解释中文版

技术点详解, 引导理解

Youtube

★★★★★

Word Embedding and Word2Vec, Clearly Explained!!!

https://www.youtube.com/watch?v=viZrOnJclY0

将tokenization延伸到word embedding和vector presentation

1.2 Encoder-Decoder V.S. Encoder-only V.S. Decoder-only


Revisit the encoder-decoder Transformer architecture, and more specifically the decoder-only GPT architecture, which is used in every modern LLM.


Name

Category

Article Category

Source

Rating

Resources

Note

2

Encoder-Decoder


Encoder-Decoder是一个模型构架,是一类算法统称,并不是特指某一个具体的算法,在这个框架下可以使用不同的算法来解决不同的任务。首先,编码(encode)由一个编码器将输入序列转化成一个固定维度的稠密向量,解码(decode)阶段将这个激活状态生成目标译文。

Concept

技术点详解, 代码解析

CSDN

★★★★★

Encoder-Decoder综述理解(推荐)

https://blog.csdn.net/u010626937/article/details/104819570

介绍了Encoder-Decoder模型构架/算法;个人觉得是对这个概念解释得最通俗易懂的博客,在看attention之前需要理解这些前置知识

精读视频, 技术点详解

Youtube

★★★★★

Sequence-to-Sequence (seq2seq) Encoder-Decoder Neural Networks, Clearly Explained!!!

https://www.youtube.com/watch?v=L8HKweZIOmg

这个youtube channel有所有关于Statistics, Machine Learning and Data Science的概念的解析,视听效果都很好;

这里放的是encoder-decoder的,视频提到需要有LSTM和word embedding的知识,如果不了解的话可以在这个channel里找到相应的视频去了解(这里也放一个LSTM的知乎讲解https://zhuanlan.zhihu.com/p/184937263

技术点详解

CSDN

★★★★☆

【NLP自然语言处理】深入解析Encoder与Decoder模块:结构、作用与深度学习应用

https://blog.csdn.net/2301_76820214/article/details/143472701

深入理解encode和decoder的构造

技术点详解, 代码解析

CSDN

★★★★☆

Encoder——Decoder工作原理与代码支撑

https://blog.csdn.net/weixin_44528463/article/details/138506472

更加深入的结合代码理解原理

3

Attention Is All You Need

https://arxiv.org/pdf/1706.03762


- Source Code (official tensorflow implementation)

https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/models/transformer.py

- PyTorch implementation of the Transformer model

https://github.com/jadore801120/attention-is-all-you-need-pytorch


理解了Encoder和decoder,以及其limitation之后,就可以读这篇论文。

Paper

技术点详解, 引导理解

Youtube

★★★★★

Attention for Neural Networks, Clearly Explained!!!

https://www.youtube.com/watch?v=PSs6nxngL6k&list=PLblh5JKOoLUIxGDQs4LFFD--41Vzf-ME1&index=20

这个视频解释了从encoder-decoder到attention机制的过渡,清楚解析了为什么需要attention

技术细节梳理, 引导理解, 技术点详解, 相关拓展, 见解分析

知乎

★★★★★

【经典精读】万字长文解读Transformer模型和Attention机制

https://zhuanlan.zhihu.com/p/104393915

这篇博客主要是介绍Transformer的,从Transformer和attention的背景开始介绍,对于技术细节的解释很清晰且易懂,文章逻辑通顺

GitHub

★★★★★

The Illustrated Transformer

https://jalammar.github.io/illustrated-transformer/

(强烈推荐)图文结合的非常详细的介绍

Personal Blog

★★★★★

Attention? Attention!

https://lilianweng.github.io/posts/2018-06-24-attention/

(强烈推荐)详细全面且通俗易懂的attention mechanism解析

Personal Blog

★★★★★

Attention Is All You Need (Transformer) 论文精读

https://zhouyifan.net/2022/11/12/20220925-Transformer/

补充背景知识的部分让论文更好理解,全文讲解过程也用了很多简单的实际例子来介绍抽象概念,对于论文的精读是有重点的

CSDN

★★★★★

【Transformer系列(3)】 《Attention Is All You Need》论文超详细解读(翻译+精读)

https://blog.csdn.net/weixin_43334693/article/details/130208816

这篇博客是一个系列:从encoder&decoder,到attention,论文和transformer一步一步深入解读。这篇精读也包括翻译+精读部分帮助理解

精读视频, 见解分析, 引导理解

Bilibili

★★★★★

《Attention Is All You Need》论文解读

https://www.bilibili.com/video/BV1pr421t73G/

深入浅出的精读论文,讲解的时候加入了一些例子,对小白很友好

精读视频, 见解分析, 引导理解

Bilibili

★★★★★

Transformer论文逐段精读【论文精读】

https://www.bilibili.com/video/BV1pu411o7BE/

逐段精读,评论区有一些笔记以及补充知识

引导理解, 代码解析

知乎

★★★★☆

Transformer 零基础解析教程,完整版代码最终挑战(4/4)

https://zhuanlan.zhihu.com/p/609535959

解析了原文代码;这篇文章也是系列解读中的一篇,同系列解读也很不错,但是需要一些基础

4

位置嵌入(Positional Embedding) 是一种为序列数据(如文本、时间序列等)添加位置信息的技术,主要用于Transformer模型中

Technique

技术点详解, 引导理解

Youtube

★★★★★

Positional Encoding in Transformer Neural Networks Explained

https://www.youtube.com/watch?v=ZMxVe-HK174

深入讲解,阐明了其在模型中引入序列顺序信息的原理和重要性

How Rotary Position Embedding Supercharges Modern LLMs

https://www.youtube.com/watch?v=SMBkImDWOyQ

介绍了旋转位置嵌入(RoPE)如何增强LLM的性能,通过改进 Transformer 对序列位置的理解,提升模型在长上下文中的泛化能力

How positional encoding works in transformers?

https://www.youtube.com/watch?v=T3OT8kqoqjc

简洁易懂的介绍,用可视化的形式解释positional embedding的概念

5

Encoder-only V.S. Decoder-only V.S. Encoder-Decoder


前面我们了解了Transformer, i.e., encoder-decoder architecture,接下来为了提高训练效率,解决一些弊端,分别出现了encoder-only和decoder-only models。这些模型有不同的适用领域,然而目前大多数LLM都是decoder-only的结构。

Encoder-decoder

技术点详解, 引导理解

Youtube

★★★★★

Transformers (how LLMs work) explained visually | DL5

https://www.youtube.com/watch?v=wjZofJX0v4M&t=187s

(强烈推荐)这个youtube channel的所有视频动画都是非常严谨的数学,从不一样的角度理解ML

技术细节梳理

Milestone papers

★★★★★

Milestone LLM Papers

https://www.xiaogeedu.net/sys-nd/360.html

在这个sheet中提到的T5模型用到的是encoder-decoder的结构

技术细节梳理, 引导理解, 相关拓展, 见解分析

CSDN

★★★★★

Transformer通俗笔记:从Word2Vec、Seq2Seq逐步理解到GPT、BERT

https://blog.csdn.net/v_JULY_v/article/details/127411638

(强烈推荐)可以看出作者很有思想,文章介绍了一系列的预训练模型,通俗易懂的带领读者理解透彻该模型的目的

Encoder-only

技术点详解, 引导理解

Youtube

★★★★★

Encoder-Only Transformers (like BERT) for RAG, Clearly Explained!!!

https://www.youtube.com/watch?v=GDN649X_acE

视频介绍了encoder-only transformers

技术细节梳理

Milestone papers

★★★★★

Milestone LLM Papers

https://www.xiaogeedu.net/sys-nd/360.html

sheet中提到的BERT模型用到的是encoder-only的结构

Decoder-only

技术点详解, 引导理解

Youtube

★★★★★

Decoder-Only Transformers, ChatGPTs specific Transformer, Clearly Explained!!!

https://www.youtube.com/watch?v=bQ5BoolX9Ag

介绍了decoder-only models的原理以及为什么decoder-only is what you need

引导理解, 技术点详解, 知乎讨论

知乎

★★★★★

为什么现在的LLM都是Decoder only的架构?

https://www.zhihu.com/question/588325646/answer/3073802666

有很多清晰全面的回答的知乎问题

技术细节梳理

Milestone papers

★★★★★

Milestone LLM Papers

https://www.xiaogeedu.net/sys-nd/360.html

Sheet中的GPT模型属于decoder-only模型,也是之后各LLM的基础

引导理解, 技术点详解, 相关拓展

CSDN

★★★★★

Transformer 三大变体之Decoder-Only模型详解

https://blog.csdn.net/xxue345678/article/details/144182120

都是关于三种架构的解释和优劣势分析对比,可以更加清楚的理解三者的区别和联系以及发展趋势

[ai笔记13] 大模型架构对比盘点:Encoder-Only、Decoder-Only、Encoder-Decoder

https://blog.csdn.net/xinquanv1/article/details/136287616

[从0开始AIGC][LLM]:LLM中Encoder-Only or Decoder-Only?为什么主流LLM是Decoder-Only?

https://blog.csdn.net/qq_41897558/article/details/141569810

Why decoder-only? LLM架构的演化之路

https://blog.csdn.net/2401_82452722/article/details/140802982

技术细节梳理, 引导理解, 技术点详解

Personal Blog

★★★★★

The Illustrated GPT-2 (Visualizing Transformer Language Models)

https://jalammar.github.io/illustrated-gpt2/

(强烈推荐)Transformers and how they’ve evolved.逻辑连贯清晰,介绍通俗易懂,图文结合

other

相关拓展

Other

★★★★★

LLM Visualization

https://bbycroft.net/llm

很有意思的一个visualization,可视化了LLM中decoder,encoder等components,不同的LLM之间也可以互相对比

模型实战, 代码复现

Youtube

★★★★★

Let's build GPT: from scratch, in code, spelled out.

https://www.youtube.com/watch?v=kCc8FmEb1nY

很长的一个视频,build了一个小型的GPT模型

1.3 Text generation


Learn about the different ways the model can generate output sequences. Common strategies include greedy decoding, beam search, top-k sampling, and nucleus sampling.


Name

Category

Article Category

Source

Rating

Resources

Note

6

Text Generation 文本生成


在自然语言任务中,我们通常使用一个预训练的大模型(比如GPT)来根据给定的输入文本(比如一个开头或一个问题)生成输出文本(比如一个答案或一个结尾)。为了生成输出文本,我们需要让模型逐个预测每个 token ,直到达到一个终止条件(如一个标点符号或一个最大长度)。在每一步,模型会给出一个概率分布,表示它对下一个单词的预测。那么,我们应该如何从这个概率分布中选择下一个单词呢?

Concept

引导理解, 技术点详解, 相关拓展

Youtube

★★★★★

AI Text Generation Clearly Explained!

https://www.youtube.com/watch?v=1ido2ruZhzU

非常详细清楚的解释了文本生成的techniques,包括Greedy search, sampling with Top K, Top P, Temperature and Beam search

技术细节梳理, 引导理解, 技术点详解

Medium

★★★★★

Decoding Strategies that You Need to Know for Response Generation

https://towardsdatascience.com/decoding-strategies-that-you-need-to-know-for-response-generation-ba95ee0faadc

清晰易懂,介绍了Greedy,Beam Search,Random Sampling,Temperature,Top-K Sampling,Nucleus Sampling

技术细节梳理, 引导理解, 技术点详解, 代码解析

HuggingFace

★★★★★

如何生成文本: 通过 Transformers 用不同的解码方法生成文本

https://huggingface.co/blog/zh/how-to-generate

通过GPT-2模型结合代码展示了不同的解码方法

Personal Blog

★★★★★

Decoding Strategies in Large Language Models

https://mlabonne.github.io/blog/posts/2023-06-07-Decoding_strategies.html

A Guide to Text Generation From Beam Search to Nucleus Sampling

知乎

★★★★★

大模型文本生成——解码策略(Top-k & Top-p & Temperature)

https://zhuanlan.zhihu.com/p/647813179

结合代码讲解了top-k和top-p以及temperature,非常通俗易懂

2. Building an instruction dataset


While it's easy to find raw data from Wikipedia and other websites, it's difficult to collect pairs of instructions and answers in the wild. Like in traditional machine learning, the quality of the dataset will directly influence the quality of the model, which is why it might be the most important component in the fine-tuning process.

2.1 Alpaca-like dataset

https://crfm.stanford.edu/2023/03/13/alpaca.html


Generate synthetic data from scratch with the OpenAI API (GPT). You can specify seeds and system prompts to create a diverse dataset.


Name

Category

Article Category

Source

Rating

Resources

Note

7

Instruction Tuning 指令微调

What is it and why do we need it: 指令微调是一种在带有指令提示和相应输出的标记数据集上微调大模型的技术。通过提供一组概述所需操作的指南或指令,使预训练模型适应执行特定任务。能提高模型在特定任务上的性能,还能在总体上提高遵循指令的能力,有助于调整预训练模型用于实际应用。

Concept

相关拓展, 见解分析, 技术点详解, 模型实战

CSDN

★★★★★

【大模型理论篇】大模型微调之指令微调(Instruction Fine-Tuning)

https://blog.csdn.net/weixin_65514978/article/details/141530837

写得非常详细易懂的文章,介绍了指令微调的概念和应用,以及实践

相关拓展, 技术点详解, 见解分析, 引导理解

CSDN

★★★★★

【大模型系列】指令微调

https://blog.csdn.net/hubojing/article/details/138067577

介绍了Self-Instruct和Evol-Instruct等数据构建方法,以及LoRA、AdaLoRA和QLoRA等参数高效微调策略

知乎

★★★★★

Instruction Finetune

https://zhuanlan.zhihu.com/p/631342824

概括了几篇比较有名的论文来探讨prompt engineering和Instruction Finetune,分析得也很易懂清晰

☆☆☆☆☆

打开模型Zero-Shot新范式:Instruction Tuning

https://zhuanlan.zhihu.com/p/558286175

通俗易懂的介绍了指令微调的概念和用法

★★★★★

一篇关于LLM指令微调的综述

https://zhuanlan.zhihu.com/p/654054370

非常全面的介绍,包括各种数据集,LLM,多模态大模型,微调技术等

8

Alpaca: A Strong, Replicable Instruction-Following Model

https://crfm.stanford.edu/2023/03/13/alpaca.html


Official Source Code

https://github.com/tatsu-lab/stanford_alpaca


构建指令数据集的核心是创建或收集包含指令(输入)与其对应回答(输出)的高质量数据。这类数据集对于微调大语言模型(LLM)非常重要,能够帮助模型更好地完成任务,尤其是针对指令执行类任务。


斯坦福 Alpaca 通过使用现有的LLM(e.g. GPT-3),生成指令-回答对数据集,并用该数据集对 LLaMA进行微调,从而将其转化为一个能够执行指令的模型

Fine-tuning Model

精读视频, 引导理解, 见解分析, 模型实战

Youtube

★★★★★

Investigating Alpaca 7B - Finetuned LLaMa LLM

https://www.youtube.com/watch?v=pcszoCYw3vc

带着读者read-through和理解每个部分,展示demo

How to make a custom dataset like Alpaca7B

https://www.youtube.com/watch?v=ivXcInXR5jo

使用制作 Alpaca dataset的方式制作自己的自定义数据集,并使用它来通过 GPT-3 生成合成数据

见解分析, 引导理解, 技术细节梳理, 论文开源项目教程, 知乎讨论

知乎

★★★★★

斯坦福大学 Alpaca 模型训练成本低,性能比肩 GPT-3.5,这是否能为大模型的研究提供新思路?

https://www.zhihu.com/question/590934914/answer/3051305936

有一些很有用的深入解读,运行教程和见解看法

技术细节梳理, 引导理解

CSDN

★★★★★

LLM之Alpaca:深入了解大模型Alpaca

https://blog.csdn.net/qq_17827079/article/details/136794725

比较全面的深入精读,对每个部分都进行了简要总结概括

技术细节梳理, 引导理解, 相关拓展, 见解分析, 技术点详解

Other

★★★★★

Stanford Alpaca, and the acceleration of on-device large language model development

https://simonwillison.net/2023/Mar/13/alpaca/

介绍了Alpaca model,同时指出这个model还不能作为commercial use的一些缺陷

技术细节梳理, 论文开源项目教程

LinkedIn

★★★★★

Stanford Alpaca: Leading the Way in Affordable LLM Fine-Tuning

https://www.linkedin.com/pulse/stanford-alpaca-leading-way-affordable-llm-rany-elhousieny-phd%E1%B4%AC%E1%B4%AE%E1%B4%B0-yz7qc/

逻辑清晰的解读总结以及开源代码教程

翻译式解读

CSDN

★★★☆☆

LLMs之Alpaca:《Alpaca: A Strong, Replicable Instruction-Following Model》翻译与解读

https://blog.csdn.net/qq_41185868/article/details/129775107

翻译解读

见解分析

知乎

★★★☆☆

Alpaca格式是否是一种桎梏?

https://www.zhihu.com/question/611965526/answer/3119474560

Alpaca格式指的是Instruct-Input-Response格式。这种格式在单轮指令方面方便、清晰、高效。然而在社区不乏在训练多轮对话模型时生搬硬套这种格式的现象(比如:Instruct是“请补全对话”,Input是上文的全部对话,Response是下一句回复)。这种方式相对于直接对话格式,多了弯弯绕绕,也在多轮对话展开时引入大量重复。是什么原因导致了这种现象?Alpaca格式在多轮对话任务上是不是一种桎梏?

9

Alpaca-like dataset


虽然 Alpaca 广受欢迎,但它不一定是每种用例的最佳选择。一些替代方案旨在解决特定限制或提供更广泛的多样性和质量。Alpaca-like dataset 指遵循 Alpaca 方法论创建的指令微调数据集,但可能使用不同的基础模型、数据源或生成方法。这些数据集的核心理念与 Alpaca 类似,目标是提高模型的指令执行能力。

Dataset

技术细节梳理, 模型实战, 引导理解

Other

★★★★★

How to Fine-Tune an LLM Part 1: Preparing a Dataset for Instruction Tuning

https://wandb.ai/capecape/alpaca_ft/reports/How-to-Fine-Tune-an-LLM-Part-1-Preparing-a-Dataset-for-Instruction-Tuning--Vmlldzo1NTcxNzE2

(强烈推荐)In this article, we will explore how to prepare your data to fine-tune your LLM on instructions (a.k.a. instruction tuning). We'll go step-by-step through how you need to format your data and apply the preprocessing techniques required to be able to fine-tune your model after. We'll do this as a tutorial and make every step simple to understand what is happening under the hood of those preprocessing pipelines.

问答讨论

Reddit

★★★★☆

Are there publicly available datasets other than Alpaca that we can use to fine-tune LLaMA?

https://www.reddit.com/r/LocalLLaMA/comments/11x9hzs/are_there_publicly_available_datasets_other_than/

有很多推荐相关的datasets给大家fine-tune自己的指令模型

引导理解, 模型实战

Other

★★★★★

How to create a custom Alpaca instruction dataset for fine-tuning LLMs

https://zackproser.com/blog/how-to-create-a-custom-alpaca-dataset

很细致的教程,创建一个类似Alpaca的指令数据集用来做指令微调

Dataset

GitHub

★★★★☆

Claude2-Alpaca: Instruction tuning datasets distilled from Claude2

https://github.com/Lichang-Chen/claude2-alpaca

This is the repo for the Claude2-Alpaca project, which aims to build and share an instruction-following LLaMA model. The repo contains 52k prompts and responses. The repo contains:


The 52k claude-2 data used for finetuning

The code for generating the data

The code for finetuning 7B and 13B models

2.2 Advanced techniques


Advanced techniques: Learn how to improve existing datasets with Evol-Instruct https://arxiv.org/abs/2304.12244 , how to generate high-quality synthetic data like in the Orca https://arxiv.org/abs/2306.02707   and phi-1 https://arxiv.org/abs/2306.11644 papers.


Name

Category

Article Category

Source

Rating

Resources

Note

10

WizardLM: Empowering Large Language Models to Follow Complex Instructions

https://arxiv.org/abs/2304.12244


Evol-Instruct - Source Code

https://github.com/nlpxucan/evol-instruct


指令进化:从一组初始指令开始,通过进化指令逐步将它们重写为更复杂的指令。然后,将生成的所有指令数据进行混合来微调LLaMA。

论文将生成的模型称为WizardLM。在复杂平衡测试平台和Vicuna测试集上的人类评估表明,来自evolution - instruct的指令优于人类创造的指令。

Paper

精读视频, 见解分析, 引导理解

Youtube

★★★★★

WizardLM: Enhancing Large Language Models to Follow Complex Instructions

https://www.youtube.com/watch?v=I6sER-qivYk

比较清楚的解释了论文的方法和原理

见解分析, 引导理解, 技术点详解, 代码解析

WizardLM: Evolving Instruction Datasets to Create a Better Model

https://www.youtube.com/watch?v=5IAxCL4dHWk

快速过了一遍论文,用colab展示了一个demo,非常清晰易懂

技术细节梳理, 引导理解

知乎

★★★☆☆

WizardLM:赋予大型语言模型遵循复杂指令的能力

https://zhuanlan.zhihu.com/p/643162614

精读文章,对论文重点部分进行了总结梳理

略读文章

知乎

★★☆☆☆

[论文笔记] WizardLM: Empowering Large Language Models to Follow Complex Instructions

https://zhuanlan.zhihu.com/p/664573419

比较简要的总结

模型实战

Other

★★★★★

Create an evol-instruct dataset

https://distilabel.argilla.io/0.6.0/tutorials/create-evol-instruct-dataset/

根据论文中的方法开发一个evol-instruct数据集

11

如何利用现有的大型语言模型(如 GPT-3.5 和 GPT-4)生成特定领域的指令数据集,并用于微调其他模型(如 Llama 2),以实现特定任务(如新闻分类)的能力提升

Tutorial

Medium

★★★★★

Generating a Clinical Instruction Dataset in Portuguese with Langchain and GPT-4

https://solano-todeschini.medium.com/generating-a-clinical-instruction-dataset-in-portuguese-with-langchain-and-gpt-4-6ee9abfa41ae

(强烈推荐)详细介绍了如何利用 OpenAI 的 GPT-4 模型和 LangChain 库,按照 Alpaca 数据集的方法,创建高质量的葡萄牙语临床指令数据集

How I created an instruction dataset using GPT 3.5 to fine-tune Llama 2 for news classification

https://medium.com/@kshitiz.sahay26/how-i-created-an-instruction-dataset-using-gpt-3-5-to-fine-tune-llama-2-for-news-classification-ed02fe41c81f

(强烈推荐)探讨了如何利用 OpenAI 的 GPT-3.5 模型,创建用于新闻分类任务的指令数据集,并计划将其用于微调 Meta 的 Llama 2 模型。

Colab

★★★★★

DataCamp Code-along - Dataset creation

https://colab.research.google.com/drive/1GH8PW9-zAe4cXEZyOIE-T9uHXblIldAg?usp=sharing

(强烈推荐)详细解读了创建数据集来finetune model的过程,图文结合,逻辑清晰

12

Orca: Progressive Learning from Complex Explanation Traces of GPT-4

https://arxiv.org/abs/2306.02707


Microsoft Orca Project

https://www.microsoft.com/en-us/research/project/orca/


微软的 Orca 是一种用于提升大型语言模型(LLMs)能力的研究框架和模型,其核心目标是通过 模仿更强大的模型(例如 GPT-4)和结合深层次推理信号,让较小的模型以更低的成本达到类似的性能。

Paper

精读视频, 引导理解

Youtube

★★★★☆

Orca: Progressive Learning from Complex Explanation Traces of GPT-4

https://www.youtube.com/watch?v=m63LLcXAKKE

带读paper的视频,讲的很清晰流畅

翻译式解读

CSDN

★★★☆☆

LLMs:《Orca: Progressive Learning from Complex Explanation Traces of GPT-4》翻译与解读

https://blog.csdn.net/qq_41185868/article/details/131137568

论文翻译

13

Textbooks Are All You Need

https://arxiv.org/abs/2306.11644


HuggingFace Model Card

https://huggingface.co/microsoft/phi-1


提出了一种通过高质量数据训练小型语言模型的方法。该研究展示了即使在计算资源有限的情况下,精心选择和生成的高质量数据也能使小型模型在特定任务上达到或超过更大模型的性能。

Paper

精读视频, 引导理解

Youtube

★★★★★

Textbooks Are All You Need

https://www.youtube.com/watch?v=ZW3dcu8H4gI

讲解了论文的key findings,以及这篇论文在当时的创新性

Textbooks Are All You Need

https://www.youtube.com/watch?v=24O1KcIO3FM

非常详细的背景介绍,技术解析和结果分析

技术细节梳理, 引导理解

CSDN

★★★★☆

高质量数据is all you need:Textbooks Are All You Need论文笔记

https://blog.csdn.net/u011426236/article/details/138195169

精读文章,分段总结

知乎

用教科书级别的代码数据训练一个代码LLM: Textbooks Are All You Need

https://zhuanlan.zhihu.com/p/647077134

引导理解, 技术点详解

知乎

★★★★☆

Textbooks Are All You Need:小型phi-1模型击败巨人,探索Textbooks之力!

https://zhuanlan.zhihu.com/p/654770504

通过十个问题回答的形式探索论文的技术细节

2.3 Filtering data


Traditional techniques involving regex, removing near-duplicates, focusing on answers with a high number of tokens, etc. 数据过滤是学习路径中不可忽视的重要步骤,因为模型的性能与数据质量直接相关。在创建和准备指令数据集时,过滤数据的过程可以显著提高数据的质量和一致性,从而影响微调的效果。


Name

Category

Article Category

Source

Rating

Resources

Note

14

关于数据过滤、正则表达式应用和数据清洗的相关博客

Lecture

精读视频, 引导理解, 技术点详解

Bilibili

★★★★★

【LLM大模型】如何整理训练数据以及微调优化建议

https://www.bilibili.com/video/BV1vrksYgEP9

讲解了大模型微调数据的整理方法、不同数据格式在训练中的应用、以及如何通过函数调用和优化数据集提升模型智能与业务适配能力

NLP数据预处理流程

https://www.bilibili.com/video/BV1WW4y1s79K

视频比较长,很全面清晰的讲解预处理的步骤流程

【机器学习 数据预处理】数据预处理与数据转换、数据清洗、数据压缩(附:代码 课件)

https://www.bilibili.com/video/BV1aCvae4E55

数据中重复值、缺失值、异常值处理

Tutorial

技术点详解

CSDN

★★★★☆

python数据清洗入门教程(完整版)

https://blog.csdn.net/liumengqi11/article/details/113174269

详细介绍了利用Python进行数据清洗的全过程,包括处理缺失值、重复值、异常值等内容,适合初学者系统学习

一文带你看懂数据清洗的六大问题!(附工具推荐)

https://blog.csdn.net/m0_59164520/article/details/142602189

概括了数据清洗过程中常见的六大问题,并提供了相应的解决方法和工具推荐

文本清洗正则表达式(持续更新)

https://blog.csdn.net/Yellow_python/article/details/99084214

持续更新了在文本清洗过程中常用的正则表达式技巧,对于处理文本数据非常有帮助

技术点详解, 模型实战

CSDN

★★★☆☆

MinHash-LSH 哈希模糊去重:如何解决医学大模型的大规模数据去重?

https://blog.csdn.net/qq_41739364/article/details/135054109

介绍了MinHash-LSH算法在大规模数据去重中的应用,特别是在医学大模型中的实践

2.4 Prompt templates


There's no true standard way of formatting instructions and answers, which is why it's important to know about the different chat templates, such as ChatML https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/chatgpt?tabs=python&pivots=programming-language-chat-ml , Alpaca https://crfm.stanford.edu/2023/03/13/alpaca.html , etc.


Name

Category

Article Category

Source

Rating

Resources

Note

15

Prompt Templates, Prompt Tuning, Prompt Engineering


在格式化指令和回答时,目前并没有统一的行业标准。因此,了解不同的对话模板(Prompt Templates)显得尤为重要。例如:

Tutorial

引导理解, 技术点详解

知乎

★★★★★

五万字综述!Prompt-Tuning:深度解读一种新的微调范式

https://zhuanlan.zhihu.com/p/618871247

最全面细致的Prompt Tuning技术综述之一,总结了prompt相比传统fine-tuning有什么优势,发展历程,prompt如何选择和设计和相关技术

Personal Blog

★★★★★

Prompt Engineering

https://lilianweng.github.io/posts/2023-03-15-prompt-engineering/

一篇通俗易懂的prompt engineering全面介绍

知乎

★★★★★

《大模型时代的科研》之2: Prompt Engineering (提示词工程)

https://zhuanlan.zhihu.com/p/631922240

从以下四个方面介绍prompt engineering: 什么是prompt、如何有效使用prompt、如何自动学习最优promopt、以及prompt的安全分析

HuggingFace

★★★★★

Chat Templates

https://huggingface.co/blog/zh/chat-templates

Huggingface的prompt engineering聊天模版介绍

Microsoft

★★★★★

Chat Markup Language ChatML (Preview)

https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/chat-markup-language

OpenAI 提出的格式,用于定义模型交互中的输入输出规则,包括如何组织系统提示、用户输入和模型生成的回答

知乎

★★★★★

Langchain:prompt template的使用

https://zhuanlan.zhihu.com/p/686967003

langchain一个很好的功能就是prompt template,可以帮助我们针对不同情况的同类型问题简化prompt设计。本文介绍了什么是 prompt template 以及为什么需要使用它,如何创建 prompt template,如何在 prompt template 中使用 few shot examples,以及chat特有的prompt template。

知乎

★★★★★

有没有调试prompt的好工具?

https://www.zhihu.com/question/598433330/answer/3364838240

对于不同的LLM在生产环境中好用的prompt调试工具

知乎

☆☆☆☆☆

[论文阅读] Prompt Engineering综述

https://zhuanlan.zhihu.com/p/682352630

论文A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications https://arxiv.org/abs/2402.07927 的精读

16

A Systematic Survey of Prompt Engineering in Large Language Models:

Techniques and Applications

https://arxiv.org/pdf/2402.07927

Paper

本文系统地分类了 29 种不同的提示工程技术,并根据其功能、应用、模型和数据集进行了分析,揭示了每种方法的优势和局限性

Prompt Design and Engineering: Introduction and Advanced Methods

https://arxiv.org/abs/2401.14423

本文介绍了提示设计与工程的核心概念,以及链式思维(Chain-of-Thought)和反思等高级技术,并提供了提示工程工具的概述

Unleashing the potential of prompt engineering in Large Language Models: a comprehensive review

https://arxiv.org/abs/2310.14735

深入探讨了提示工程在释放大型语言模型能力中的关键作用,阐述了提示工程的基础原理和高级方法

Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing

https://arxiv.org/abs/2107.13586

系统回顾了自然语言处理领域中的提示方法,包括零样本提示、少样本提示和多任务提示等。

3. Pre-training models


Pre-training is a very long and costly process, which is why this is not the focus of this course. It's good to have some level of understanding of what happens during pre-training, but hands-on experience is not required.

预训练是一个耗时且昂贵的过程,了解预训练的基本原理对深入理解大模型的工作机制是有益的,但不需要实际操作经验。

3.1 Data Pipeline


Pre-training requires huge datasets (e.g., Llama 2 https://arxiv.org/abs/2307.09288 was trained on 2 trillion tokens) that need to be filtered, tokenized, and collated with a pre-defined vocabulary.


Name

Category

Article Category

Source

Rating

Resources

Note

17

数据管道(Data Pipeline)

1. 数据过滤:从原始数据集中剔除低质量、不相关或重复的数据,以确保训练数据的有效性。

2. 分词(Tokenization):将文本转化为模型可处理的 token(如单词或子词)。分词过程通常基于一个预定义的词汇表(Vocabulary)。

3. 数据整理(Collation):将分词后的数据按照一定的规则进行整理,使其适配模型的输入需求,例如对齐数据长度或分批处理。

Tutorial

引导理解, 技术点详解, 代码解析

CSDN

★★★★★

AI大模型探索之路-训练篇5:大语言模型预训练数据准备-词元化

https://xundaomalu.blog.csdn.net/article/details/138225299

比较全面好理解的预训练数据处理新手教程;详细介绍了大语言模型训练中的数据准备过程,包括数据来源、质量过滤、去重过滤、敏感信息过滤,以及数据影响分析等内容

AI大模型探索之路-训练篇6:大语言模型预训练数据准备-预处理

https://blog.csdn.net/xiaobing259/article/details/138267915

知乎

★★★★★

大规模语言模型(LLMs)预训练:开源数据处理流程

https://zhuanlan.zhihu.com/p/643194407

介绍了RefinedWeb数据集的构建过程,详细描述了从Common Crawl获取网页数据、预处理、过滤、去重等步骤,为大规模语言模型的预训练提供了数据处理参考

数据为王:大模型预训练中的数据处理及思考—The RefinedWeb Dataset for Falcon LLM论文解读

https://zhuanlan.zhihu.com/p/641013454

解读了Falcon LLM的预训练数据集RefinedWeb的构建方法,探讨了大模型预训练中数据的重要性、数据清洗过滤的影响,以及如何突破模型训练的限制等问题

机器学习之构建Pipeline(一)

https://zhuanlan.zhihu.com/p/395777245

介绍了在Python的Scikit-learn中,如何使用Pipeline自动化常见的机器学习工作流程,以及构建自定义的流水线处理方法

3.2 Causal language modeling


Learn the difference between causal and masked language modeling, as well as the loss function used in this case. For efficient pre-training, learn more about Megatron-LM https://github.com/NVIDIA/Megatron-LM or gpt-neox https://github.com/EleutherAI/gpt-neox .


Name

Category

Article Category

Source

Rating

Resources

Note

18

因果语言建模(Causal Language Modeling, CLM)

因果语言建模是一种自回归模型训练方法,模型在生成每个词时,只能基于之前的词进行预测。例如,GPT 模型使用这种方法。


掩码语言建模(Masked Language Modeling, MLM)

掩码语言建模用于训练双向模型(如 BERT)。在这种方法中,输入序列中的部分单词被随机掩盖(mask),模型的任务是预测这些掩盖的单词。

Concept

技术点详解, 引导理解, 相关拓展

HuggingFace

★★★★★

Causal language modeling

https://huggingface.co/docs/transformers/tasks/language_modeling

Masked language modeling

https://huggingface.co/docs/transformers/tasks/masked_language_modeling

介绍了CLM,MLM的概念以及数据处理流程,图文结合,清晰易懂

deepchecks

★★★★★

Masked Language Models (MLM)

https://www.deepchecks.com/glossary/masked-language-models-mlm/

Causal Language Modeling (CLM)

https://www.deepchecks.com/glossary/causal-language-modeling-clm/

清晰易懂的技术博客,知识拓展

Other

★★★★★

What are masked language models (MLMs)?

https://www.techtarget.com/searchenterpriseai/definition/masked-language-models-MLMs

解释了掩码语言模型的概念,并将其与传统的因果 AI 模型进行对比,帮助理解两者的差异。

Medium

★★★★★

Understanding Causal LLM’s, Masked LLM’s, and Seq2Seq: A Guide to Language Model Training Approaches

https://medium.com/@tom_21755/understanding-causal-llms-masked-llm-s-and-seq2seq-a-guide-to-language-model-training-d4457bbd07fa

写的比较清晰,介绍并对比了这几种modeling方法,有点像GPT generated content

Tutorial

模型实战

HuggingFace

★★★★★

Training a causal language model from scratch

https://huggingface.co/learn/nlp-course/chapter7/6?fw=pt

Pre-train a GPT-2 model from scratch using the transformers library.

19

Exploration of Masked and Causal Language

Modelling for Text Generation

https://arxiv.org/pdf/2405.12630

Paper

作者在三个不同的数据集上预训练了规模相当的语言模型,通过定量指标和人工评估,分析生成文本的连贯性和语法正确性,以及在下游任务中评估生成文本的实用性。论文发现在所有数据集上,MLM 在文本生成方面的表现均优于 CLM

20

Megatron-LM: Training Multi-Billion Parameter Language Models Using

Model Parallelism

https://arxiv.org/pdf/1909.08053


- Source Code

https://github.com/NVIDIA/Megatron-LM

- Official Presentation slides

https://developer.download.nvidia.com/video/gputechconf/gtc/2020/presentations/s21496-megatron-lm-training-multi-billion-parameter-language-models-using-model-parallelism.pdf


由NVIDIA开发,用于高效预训练超大规模语言模型。

支持模型并行和数据并行,能够利用多个GPU和节点。

针对大模型的优化,显著提高训练效率。

Paper

精读视频, 见解分析, 引导理解

Bilibili

★★★★★

Megatron LM 论文精读【论文精读】

https://www.bilibili.com/video/BV1nB4y1R7Yz/

李沐老师逐段带读

技术细节梳理, 技术点详解

知乎

★★★★★

深入理解 Megatron-LM(1)基础知识

https://zhuanlan.zhihu.com/p/650234985

这是一个系列文章中的第一篇,后面几篇在文章结尾有链接,是更加深入的细节解读,非常干活

技术细节梳理, 技术点详解

CSDN

★★★★☆

详解MegatronLM Tensor模型并行训练(Tensor Parallel)

https://blog.csdn.net/qinduohao333/article/details/131617757

详细介绍了论文中用到的方法,论文比较硬核,稍微有点抽象

技术点详解

知乎

★★★★☆

读论文《Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism 》

https://zhuanlan.zhihu.com/p/460490943

对于技术的详解,没有梳理论文,主要关注了重点的技术创新点

模型使用教程

知乎

★★★★☆

如何使用 Megatron-LM 训练语言模型

https://zhuanlan.zhihu.com/p/633160974

分析了该模型与GPT2.0的不同之处,介绍如何使用 Megatron-LM框架训练

代码解析

Other

★★★★★

Megatron-LM源码系列(六):Distributed-Optimizer分布式优化器实现Part1

https://www.mltalks.com/posts/3749485165/

介绍了模型的实现和代码解读

21

GPT-NeoX-20B: An Open-Source Autoregressive Language Model

https://arxiv.org/abs/2204.06745


- Official Source Code

https://github.com/EleutherAI/gpt-neox


开源的 GPT 类模型实现,支持大规模预训练。

提供灵活的配置,适用于不同规模的模型。

集成优化工具(如 DeepSpeed),减少训练资源需求。

Paper

相关拓展, 技术点详解, 精读视频, 见解分析

Youtube

★★★★★

GPT-NeoX-20B - Open-Source huge language model by EleutherAI (Interview w/ co-founder Connor Leahy)

https://www.youtube.com/watch?v=AJwnbSP_rq8

EleutherAI 的联合创始人 Connor Leahy 介绍了 GPT-NeoX-20B,讨论了模型的开发过程、技术挑战以及开源对人工智能研究的重要性;Connor 还分享了对大型语言模型未来发展的见解

GPT-NeoX-20B | BigScience BLOOM | OPT-175B | Training Large Language Models | Papers Explained

https://www.youtube.com/watch?v=DK-QXsiycpk

详细介绍了三个大型语言模型的开发过程和相关论文,包括BigScience的BLOOM 模型,OPT-175B 模型以及EleutherAI的GPT-NeoX-20B 模型。讨论了模型的性质、训练方法以及在实际应用中的表现。

模型实战, 引导理解

Youtube

★★★★★

Running GPT-NeoX-20B With Hugging Face

https://www.youtube.com/watch?v=2o1_HVZr8Vs

This video goes over the code used to load and split these large language models over multiple devices in order to run them.

技术细节梳理, 代码解析

HuggingFace

★★★★★

GPT-NeoX

https://huggingface.co/docs/transformers/en/model_doc/gpt_neox

huggingface model card;介绍了模型特性以及用法

3.3 Scaling laws


The scaling laws https://arxiv.org/pdf/2001.08361 describe the expected model performance based on the model size, dataset size, and the amount of compute used for training.


Name

Category

Article Category

Source

Rating

Resources

Note

22

Scaling Laws for Neural Language Models

https://arxiv.org/pdf/2001.08361


- Source Code

https://github.com/shehper/scaling_laws


扩展法则(Scaling Laws)是研究大型机器学习模型性能随模型规模、数据集大小以及训练计算资源变化规律的理论框架。它提供了一种定量化方法,用于预测模型在特定规模下的性能表现。

Paper

技术细节梳理, 见解分析, 引导理解

CSDN

★★★★☆

LLM:Scaling Laws for Neural Language Models (上)

https://blog.csdn.net/lilai619/article/details/135535030

写的非常详细并且引导理解的系列解读,但是中和下需要付费会员

LLM:Scaling Laws for Neural Language Models (中)

https://blog.csdn.net/lilai619/article/details/135601415

LLM:Training Compute-Optimal Large Language Models(下)

https://blog.csdn.net/lilai619/article/details/135624041

技术细节梳理, 引导理解, 相关拓展, 技术点详解

Other

★★★★★

chinchilla's wild implications

https://www.lesswrong.com/posts/6Fpvch8RR29qLEWNH/chinchilla-s-wild-implications

探讨SL以及它对LLM的影响和意义;比较technically-heavy的文章,需要一些SL的基础知识

技术细节梳理, 见解分析, 引导理解

CSDN

★★★★★

OpenAI的Scaling Law论文笔记

https://blog.csdn.net/Rising_shit/article/details/141929975

博主自己的理解贯穿全文,通俗易懂

技术细节梳理, 见解分析, 引导理解

CSDN

★★★★★

【论文阅读】Scaling Laws for Neural Language Models(2020)- 大模型预训练参数量、数据集大小、计算资源之间的关系验证

https://blog.csdn.net/weixin_36488653/article/details/140120350

逻辑和讲解都很清晰,先说结论,然后详解定律

略读文章, 引导理解, 见解分析

知乎

★★★★☆

Scaling Laws for Neural Language Models

https://zhuanlan.zhihu.com/p/620479884

清晰易懂的总结,比较简要

见解分析

知乎

★★★☆☆

Comments | Scaling Laws for Neural Language Models

https://zhuanlan.zhihu.com/p/116105022

主要是对论文提出了一些自己的看法和见解

翻译式解读

知乎

★★★☆☆

【大模型】Scaling Laws for Neural Language Models

https://zhuanlan.zhihu.com/p/665810769

论文翻译

23

TinyLlama: An Open-Source Small Language Model

https://arxiv.org/abs/2401.02385


Official Source Code

https://github.com/jzhang38/TinyLlama


Check this project to get a good understanding of how a Llama model is trained from scratch.

Paper

精读视频, Demo视频, 见解分析, 引导理解

Youtube

★★★★★

TinyLlama: The Era of Small Language Models is Here

https://www.youtube.com/watch?v=Weprd1wKoQ4

前半部分带着读者读论文中的重点部分,然后demo了用法,评估模型的表现

模型实战

Fine-Tune Your Own Tiny-Llama on Custom Dataset

https://www.youtube.com/watch?v=OVqe6GTrDFM

详细演示了如何在自定义数据集上微调 Tiny-Llama 模型

技术细节梳理, 见解分析, 引导理解

Other

★★★★★

An Introduction to TinyLlama: A 1.1B Model Trained on 3 Trillion Tokens

https://www.e2enetworks.com/blog/an-introduction-to-tinyllama-a-1-1b-model-trained-on-3-trillion-tokens

详细阐述了 TinyLlama 的动机、模型架构和当前进展,并探讨了其挑战 Chinchilla Scaling Law 的潜力

引导理解, 技术点详解, 代码解析

Youtube

★★★★☆

TinyLlama 1.1B LLM RAG Research Chatbot llamaindex Colab Demo Small LLM Amazing performance

https://www.youtube.com/watch?v=x8fYuG62fWI

详细讲解了model的特性,提供了在 Colab 上的实际操作演示,展示了如何设置和运行模型,以及如何与 RAG 和 llamaindex 集成

翻译式解读

CSDN

★★★☆☆

《TinyLlama: An Open-Source Small Language Model》全文翻译

https://blog.csdn.net/m0_74172965/article/details/137793454

论文翻译

3.4 High-Performance Computing


Out of scope here, but more knowledge about HPC is fundamental if you're planning to create your own LLM from scratch (hardware, distributed workload, etc.).


Name

Category

Article Category

Source

Rating

Resources

Note

24

高性能计算(High-Performance Computing, HPC)

通过超级计算机或计算集群执行需要强大计算能力的复杂任务

Concept

引导理解

Other

★★★★★

What is high performance computing or HPC?

https://www.netapp.com/data-storage/high-performance-computing/what-is-hpc

总结介绍了HPC的基本概念和用例

Google

★★★★★

What is high performance computing?

https://cloud.google.com/discover/what-is-high-performance-computing?hl=en

课程

Youtube

★★★★★

2023 High Performance Computing Course

https://www.youtube.com/playlist?list=PLmJwSK7qduwUBwrFn3SY8vi4AYa2rVTWH

冰岛大学的High-Performance Computing系列课程;涵盖高性能计算(HPC)和计算流体力学(CFD)的理论与实践,结合16节大学讲座和动手练习,为科学计算领域的学习者提供全面的知识与技能提升

课程

Bilibili

★★★★★

高性能计算基础知识和应用背景介绍

https://www.bilibili.com/video/BV1sT4y1b7gK/

高性能计算基础知识和应用背景介绍;同系列的课程中有更多深入的技术细节课程讲解

4. Supervised Fine-Tuning


Pre-trained models are only trained on a next-token prediction task, which is why they're not helpful assistants. SFT allows you to tweak them to respond to instructions. Moreover, it allows you to fine-tune your model on any data (private, not seen by GPT-4, etc.) and use it without having to pay for an API like OpenAI's.

预训练模型只在下一词预测任务上进行训练,这使得它们在实际应用中无法成为理想的助手。监督微调(SFT)可以让模型学会根据指令做出响应。此外,它还支持在任何数据(如私人数据,GPT-4 未见过的数据)上微调模型,从而实现离线使用,无需依赖像 OpenAI 这样的 API。

4.1 Full fine-tuning


Full fine-tuning refers to training all the parameters in the model. It is not an efficient technique, but it produces slightly better results.


Name

Category

Article Category

Source

Rating

Resources

Note

25

Fine tuning


为一个已经经过预训练的模型进行额外训练,以使其更好的适应某些特定的任务或数据集。

Concept

引导理解, 技术点详解

Youtube

★★★★★

Fine-tuning Large Language Models (LLMs) | w/ Example Code

https://www.youtube.com/watch?v=eC6Hd1hFvos

对于LLM微调的入门级讲解,非常清晰,小白也能听懂并且理解

技术细节梳理, 引导理解, 知乎讨论

知乎

☆☆☆☆☆

Fine-tuning是什么意思?

https://www.zhihu.com/question/24458804/answer/3331547600

对于fine-tuning的理解,给出的回答都是非常通俗易懂的

26

Full fine-tuning

全量微调指对模型的所有参数进行训练调整

Concept

引导理解, 技术点详解

微信

★★★★★

通俗解读大模型微调(Fine Tuning)

https://mp.weixin.qq.com/s/PXTAhvUGzvOPLdBYNWb3xw

比较通俗的解读了为什么要微调,以及几种常见的微调方法

CSDN

★★★★★

【大模型开发 】 一文搞懂Fine-tuning(大模型微调)

https://blog.csdn.net/qq_39172059/article/details/136693607

从Fine-tuning的本质,原理和应用三个方面来详解大模型微调

引导理解, 技术点详解, 相关拓展

Bilibili

★★★★★

通俗易懂理解全量微调和LoRA微调

https://www.bilibili.com/video/BV1tthPeFEWb/

介绍了全量微调和LoRA微调,解释得非常通俗易懂,逻辑清晰

CSDN

★★★★★

大模型全量微调和 LoRA 微调:一看就懂

https://blog.csdn.net/xiangxueerfei/article/details/140278053

LinkedIn

★★★★☆

Full Fine-Tuning, PEFT, Prompt Engineering, and RAG: Which One Is Right for You?

https://www.linkedin.com/pulse/full-fine-tuning-peft-prompt-engineering-rag-which-one-right-you/

介绍对比了几种提高LLM性能的方法和应用范围

27

Full Parameter Fine-tuning for Large Language Models with Limited Resources

https://arxiv.org/abs/2306.09782

Paper

技术细节梳理, 引导理解

CSDN

★★★★★

复旦大学重磅发布低内存优化技术LOMO | 将大模型训练内存使用量降低到10.8%,大幅领先DeepSpeed!

https://blog.csdn.net/CVHub/article/details/131487910

精读文章,总结了论文中的核心思想和重要实验结果

略读文章

CSDN

★★★☆☆

LOMO:在受限资源上全参数微调

https://blog.csdn.net/qq_18555105/article/details/131366091


28

Other Model Fine Tuning Tutorials

Tutorial

相关拓展, 引导理解, 技术点详解, 模型实战

Other

★★★★★

The Novice's LLM Training Guide

https://rentry.org/llm-training

新手入门级的大模型调试教程,有很详细的背景知识和概念介绍

4.2 LoRA & QLoRA


LoRA is a parameter-efficient technique (PEFT) based on low-rank adapters. QLoRA is another PEFT based on LoRA, which also quantizes the weights of the model in 4 bits and introduce paged optimizers to manage memory spikes.


Name

Category

Article Category

Source

Rating

Resources

Note

29

LoRA: Low-Rank Adaptation of Large Language Model

https://arxiv.org/abs/2106.09685


Official Source Code

https://github.com/microsoft/LoRA


是一种轻量化的模型微调方法,旨在优化大型语言模型(LLM)的适应能力,同时减少计算和存储开销。LoRA通过在神经网络权重矩阵中引入低秩(low-rank)分解,学习一个小的权重调整矩阵,而不是直接更新模型的所有参数。LoRA的重要性在于它为大规模模型的定制提供了一种高效、灵活的方式,使得任务适应变得更经济、更可行。








Paper

技术细节梳理, 作者presentation

Youtube

★★★★★

What is Low-Rank Adaptation (LoRA) | explained by the inventor

https://www.youtube.com/watch?v=DhRoTONcyZE

论文作者关于LoRA的背景故事和理解,以及其技术优势

技术细节梳理, 引导理解, 模型实战

Youtube

★★★★★

LoRA: Low-Rank Adaptation of Large Language Models - Explained visually + PyTorch code from scratch

https://www.youtube.com/watch?v=PXWYUTMt-AU

详细解释了LoRA技术,并提供了从头开始的PyTorch代码讲解

见解分析, 相关拓展, 引导理解, 技术点详解

Youtube

★★★★★

LoRA explained (and a bit about precision and quantization)

https://www.youtube.com/watch?v=t509sv5MT0w

非常清晰的介绍了Low rank adaptation的概念,结合图片动画很容易理解

技术细节梳理, 引导理解, 技术点详解

CSDN

★★★★★

【论文分享】LORA: LOW-RANK ADAPTATION OF LARGE LANGUAGE MODELS

https://blog.csdn.net/m0_53162279/article/details/142883905

比较全面和中规中矩的精读文章,梳理文章各部分的重点介绍翻译

[论文精读]LoRA: Low-Rank Adaptation of Large Language Models

https://blog.csdn.net/m0_52911108/article/details/143391444

【NLP经典论文精读】LORA: LOW-RANK ADAPTATION OF LARGE LANGUAGE MODELS

https://blog.csdn.net/HERODING23/article/details/131272754

知乎

论文精读:LoRa: Low-Rank Adaptation of Large Language Models

https://zhuanlan.zhihu.com/p/673058387


见解分析, 技术点详解

CSDN

★★★★★

文献阅读:LoRA: Low-Rank Adaptation of Large Language Models

https://blog.csdn.net/codename_cys/article/details/135318389

重点分析了论文的方法和实验,同时结合了作者自己的见解和分析

代码解析

CSDN

★★★★★

LoRA: Low-Rank Adaptation of Large Language Models低秩自适应

https://blog.csdn.net/emphmeral/article/details/129184347

结合代码介绍LoRA的思想

代码复现, 引导理解, 代码解析

LightingAI

★★★★★

Code LoRA from Scratch

https://lightning.ai/lightning-ai/studios/code-lora-from-scratch?section=featured

通过从头编写代码的方式来介绍低秩自适应(LoRA),实验中作者对 DistilBERT 模型进行了微调,并用于分类任务

模型实战

CSDN

★★★★☆

大模型微调---Lora微调实战

https://blog.csdn.net/niulinbiao/article/details/144615747

步骤比较清晰的模型微调实战教程

技术细节梳理, 技术点详解

Bilibili

★★★★☆

[论文速览]LoRA: Low-Rank Adaptation of Large Language Models[2106.09685]

https://www.bilibili.com/video/BV1wX4y1s7an

快速了解LoRA技术本身,讲解非常清楚

见解分析, 模型实战, 技术点详解

Bilibili

★★★★☆

什么是 Low Rank Adapatation (Lora)? Huggingface lora手把手入门实操

https://www.bilibili.com/video/BV1iV411L7cg

讲解了low-rank分解的技术细节,带着大家用LoRA实操微调模型

模型实战, 引导理解

Bilibili

★★★★☆

如何使用lora微调llama模型,全网最简单上手的微调notebook

https://www.bilibili.com/video/BV1Vh4y1F7Wo

上手使用lora微调llama模型的教程

相关拓展, 引导理解

Other

★★★★★

Customizing LLMs: When to Choose LoRA or Full Fine-Tuning

https://gradientflow.com/lora-or-full-fine-tuning/

探讨了在选择低秩适应(LoRA)或全参数微调的权衡,指出全参数微调在复杂任务中通常表现更佳,而LoRA在小数据集的指令微调中更具优势

30

QLoRA: Efficient Finetuning of Quantized LLMs

https://arxiv.org/abs/2305.14314


Official Source Code

https://github.com/artidoro/qlora


QLoRA(Quantized Low-Rank Adaptation) 是一种结合了参数高效微调(LoRA)和量化技术的方法,用于优化大语言模型(LLM)的微调和推理效率。它在资源有限的环境中通过量化和低秩适配矩阵的结合,显著降低计算开销和存储需求,同时保持模型的高性能。

Paper

精读视频, 引导理解, 技术点详解

Youtube

★★★★★

QLoRA paper explained (Efficient Finetuning of Quantized LLMs)

https://www.youtube.com/watch?v=6l8GZDPbFn8

详细解释了 QLoRA 论文,介绍了如何通过量化和低秩适配技术在单个 GPU 上高效微调大型语言模型

QLORA: Efficient Finetuning of Quantized LLMs

https://www.youtube.com/watch?v=JwSaTpBRJNE

Tim Dettmers | QLoRA: Efficient Finetuning of Quantized Large Language Models

https://www.youtube.com/watch?v=y9PHWGOa8HA

论文作者的lecture,非常全面详细的讲解了每个技术点

Bilibili

QLoRA:训练更大的GPT【论文粗读·5】

https://www.bilibili.com/video/BV1AX4y1a7jY/

非常详细的论文精读视频,视频中的笔记也做的非常清晰有逻辑

技术细节梳理, 技术点详解, 见解分析, 引导理解

CSDN

★★★★★

【论文精读】QLORA: Efficient Finetuning of Quantized LLMs

https://blog.csdn.net/HERODING23/article/details/131584089

很细致的细节技术梳理精读,带有作者自己的理解和总结

知乎

详解 QLoRA 原理 (附源码剖析)

https://zhuanlan.zhihu.com/p/638927564

结合源码讲解原理,清晰易懂

论文精读:QLoRA: Efficient Finetuning of Quantized LLMs

https://zhuanlan.zhihu.com/p/673765062

特别详尽的精读解读文章,每个核心部分都有分析

见解分析, 引导理解, 知乎讨论, 技术点详解

知乎

★★★★☆

如何评价《QLoRA:Efficient Finetuning of Quantized LLMs》?

https://www.zhihu.com/question/630131398/answer/3372399396

回答中既有比较techincal的讲解也有直观一些的理解

模型实战

GitHub

★★★★☆

ChatGLM-6B-QLoRA

https://github.com/shuxueslpi/chatGLM-6B-QLoRA

本项目使用peft库,实现了ChatGLM-6B/chatGLM2-6B模型4bit的QLoRA高效微调,可以在一张RTX3060上完成全部微调过程

引导理解, 翻译式解读

CSDN

★★★☆☆

LLMs之Guanaco:《QLoRA:Efficient Finetuning of Quantized LLMs》翻译与解读

https://blog.csdn.net/qq_41185868/article/details/131467314

逐段翻译的精读

相关拓展, 引导理解, 技术点详解

Youtube

★★★★★

LoRA & QLoRA Fine-tuning Explained In-Depth

https://www.youtube.com/watch?v=t1caDsMzWBk

深入讲解了 LoRA 和 QLoRA 的微调方法,比较了它们与全参数微调的区别,并详细介绍了 LoRA 的超参数设置

相关拓展, 技术点详解, 模型实战, 代码解析

LightingAI

★★★★★

Finetuning LLMs with LoRA and QLoRA: Insights from Hundreds of Experiments

https://lightning.ai/pages/community/lora-insights/

作者通过大量实验,提供了关于选择基础模型、评估默认LoRA设置、利用QLoRA节省内存、学习率调度、优化LoRA超参数等方面的实用见解

4.3 Axolotl & DeepSpeed


Name

Category

Article Category

Source

Rating

Resources

Note

31

Axolotl

https://github.com/axolotl-ai-cloud/axolotl


Axolotl is a user-friendly and powerful fine-tuning tool that is used in a lot of state-of-the-art open-source models. It is designed to streamline the fine-tuning of various AI models, offering support for multiple configurations and architectures.

Tool

模型实战

Youtube

★★★★★

Axolotl: Fine Tuning for Beginners with Less Code

https://www.youtube.com/watch?v=OjwWoQcZN8g

介绍了 Axolotl 框架的功能及其支持的 AI 模型,展示了如何通过 Massed Compute 设置实例,使用低代码方式对 OpenLlama 3B 参数模型进行微调,并上传到 Hugging Face

Fine-Tuning with Axolotl

https://www.youtube.com/watch?v=mmsa4wDsiy0

本课程演示了使用 Axolotl 微调模型以理解特定领域查询语言的端到端示例。演讲嘉宾包括 Axolotl 的创建者 Wing Lian 和 HuggingFace Accelerate 的首席开发人员 Zach Mueller

How to debug Axolotl (for fine tuning LLMs)

https://www.youtube.com/watch?v=xUUB11yeMmc

有关调试 Axolotl 的详细指南,展示如何配置 VSCode 进行debugging

Tutorial

GitHub

★★★★★

Getting Started with Axolotl for Fine-Tuning LLMs

https://drchrislevy.github.io/posts/intro_fine_tune/intro_fine_tune.html?utm_source=substack&utm_medium=email

关于使用Axolotl的教程tutorial

Tutorial

superteams

★★★★★

A Definitive Guide to Fine-Tuning LLMs Using Axolotl and Llama-Factory

https://www.superteams.ai/blog/a-definitive-guide-to-fine-tuning-llms-using-axolotl-and-llama-factory

Course

Personal Blog

★★★★★

Fine-Tune Your Own Llama 2 Model in a Colab Notebook

https://mlabonne.github.io/blog/posts/Fine_Tune_Your_Own_Llama_2_Model_in_a_Colab_Notebook.html

(强烈推荐)调试Llama2的很详尽的教程,有很多不同的调试方法讲解

32

DeepSpeed (Long learning curve)

https://www.deepspeed.ai/


DeepSpeed is for efficient pre-training and fine-tuning of LLMs for multi-GPU and multi-node settings (implemented in Axolotl).

DeepSpeed 是一个用于加速和优化大规模深度学习模型训练的开源深度学习库,由 Microsoft 开发。它以 高效的分布式训练和推理 为核心,旨在帮助开发者在现有硬件上训练超大规模模型(例如 GPT、Turing-NLG)并优化推理效率。


DeepSpeed 的核心设计和技术通过以下论文进行介绍

Course

模型实战

Bilibili

★★★★★

DeepSpeed分布式训练框架 DeepSpeed-Chat Step-1-01 简介

https://www.bilibili.com/video/BV1KV41137tS

深入探索DeepSpeed和DeepSpeed-chat这两个重要的深度学习优化工具,揭示其背后的原理,特点以及如何有效地应用它们来提升深度学习项目效率

Platform

相关拓展, 技术点详解

动画理解Pytorch 大模型分布式训练技术 DP,DDP,DeepSpeed ZeRO技术

https://www.bilibili.com/video/BV1mm42137X8

模型分布式训练的原理,包括数据并行、模型并行和张量并行等,以及分布式训练可以解决的问题和常见的框架;讲解得很清晰

Course

引导理解, 技术点详解

分布式并行框架DeepSpeed介绍 #大模型 #分布式并行 #训练

https://www.bilibili.com/video/BV1tH4y1J7bm

讲解了DeepSpeed以及其特性ZeRO优化器背后的原理,很清晰用心的视频

Tutorial

相关拓展, 引导理解, 技术点详解, 模型实战

Youtube

★★★★★

DeepSpeed: All the tricks to scale to gigantic models

https://www.youtube.com/watch?v=pDGI668pNg0

简单介绍了DeepSpeed,讲解了DeepSpeed的各种技术和应用

Lecture

引导理解

Youtube

★★★★★

Microsoft DeepSpeed introduction at KAUST

https://www.youtube.com/watch?v=wbG2ZEDPIyw&t=246s

介绍DeepSpeed的一个lecture talk,很清晰全面

33

ZeRO: Memory Optimizations Toward Training Trillion

Parameter Models

https://arxiv.org/pdf/1910.02054

描述了 ZeRO 优化器的设计和实现,以及如何支持大规模模型的高效训练。

Paper

技术细节梳理

Milestone papers

★★★★★

Milestone LLM Papers

https://www.xiaogeedu.net/sys-nd/360.html

Sheet中的ZeRO: Memory Optimizations Toward Training Trillion

Parameter Models论文解读:ZeRO通过减少显存冗余,分散模型状态(如权重、梯度和优化器状态)到多块 GPU 上,大幅提高训练效率

34

ZeRO-Offload: Democratizing Billion-Scale Model Training

https://arxiv.org/abs/2101.06840

介绍了 ZeRO-Offload 技术,结合 CPU 和 GPU 内存优化来进一步降低显存需求。

Paper

作者presentation, 引导理解, 技术细节梳理

Youtube

★★★★☆

ZeRO-Infinity: Breaking the GPU Memory Wall for Extreme Scale Deep Learning

https://www.youtube.com/watch?v=YEdtLCjSZFY

论文作者的walkthrough

技术点详解, 引导理解

知乎

★★★★☆

ZeRO-Offload 和 ZeRO-Infinity 流程解读

https://zhuanlan.zhihu.com/p/657946200

关于ZeRO-Offload和ZeRO-Infinity的技术详解

技术细节梳理, 见解分析

★★☆☆☆

论文阅读: ZeRO-Offload: Democratizing Billion-Scale Model Training

https://zhuanlan.zhihu.com/p/666243844

论文精读文章

35

ZeRO-Infinity: Breaking the GPU Memory Wall for Extreme Scale Deep Learning

https://arxiv.org/abs/2104.07857

提出了 ZeRO-Infinity,通过分布式存储和计算将支持扩展到超大规模深度学习模型。

Paper

作者presentation, 引导理解, 技术细节梳理

Youtube

★★★★☆

ZeRO-Infinity: Breaking the GPU Memory Wall for Extreme Scale Deep Learning

https://www.youtube.com/watch?v=YEdtLCjSZFY&t=19s

论文作者的walkthrough

技术点详解, 引导理解, 技术细节梳理

知乎

★★★★☆

论文阅读: ZeRO-Infinity: Breaking the GPU Memory Wall for Extreme Scale Deep Learning

https://zhuanlan.zhihu.com/p/666244126

两篇比较全面细节的论文精读

★★★★☆

ZeRO-Infinity: Breaking the GPU Memory Wall for Extreme Scale Deep Learning-打破GPU内存墙的极端规模深度学习

https://zhuanlan.zhihu.com/p/682835920

技术点详解, 引导理解, 技术细节梳理, 相关拓展

知乎

★★★★★

DeepSpeed之ZeRO系列:将显存优化进行到底

https://zhuanlan.zhihu.com/p/513571706?utm_id=0

很详细讲了ZeRO技术的三个阶段

5. Preference Alignment (RLHF)


After supervised fine-tuning, RLHF is a step used to align the LLM's answers with human expectations. The idea is to learn preferences from human (or artificial) feedback, which can be used to reduce biases, censor models, or make them act in a more useful way. It is more complex than SFT and often seen as optional.


通过人类反馈(或人工反馈),优化LLM的回答,使其更符合人类期望。偏好对齐的应用可以减少偏见、过滤不当内容或提升模型实用性。相比监督微调(SFT),偏好对齐更复杂,但通常被视为可选步骤。


Name

Category

Article Category

Source

Rating

Resources

Note

36

Preference datasets

偏好对齐需要偏好数据集,这种数据集通常包含多个答案的排序信息,制作起来比指令数据集更难。

Dataset

Tutorial

Other

★★★★★

Preference dataset: our ultimate guide to improving language models

https://en.innovatiana.com/post/preference-dataset-for-llm

讲解了preference datasets的概念,如何收集和应用

HuggingFace

★★★★★

HuggingFace Datasets

http://preference/

HuggingFace对于各种各样datasets的讲解和对比

Dataset

HuggingFace

★★★★★

Preference Datasets for DPO

https://huggingface.co/collections/argilla/preference-datasets-for-dpo-656f0ce6a00ad2dc33069478

This collection contains a list of curated preference datasets for DPO fine-tuning for intent alignment of LLMs

Dataset

HuggingFace

★★★★☆

Anthropic/hh-rlhf

https://huggingface.co/datasets/Anthropic/hh-rlhf/viewer/default/train

一个很popular的preference datasets

37

强化学习(RLHF,Reinforcement Learning with Human Feedback)https://arxiv.org/abs/1707.06347

使用强化学习的方法来训练模型,具体包括:

1. 奖励模型(Reward Model):预测某段文本是否符合人类的偏好。

2. 算法:近端策略优化(Proximal Policy Optimization, PPO):利用奖励模型输出的得分优化微调模型;添加 KL 散度惩罚项以避免生成分布与参考模型偏离过远。

Paper, Concept

Tutorial

Youtube

★★★★★

Reinforcement Learning from Human Feedback (RLHF) Explained

https://www.youtube.com/watch?v=T_X4XFwKX8k

入门级的概念讲解,分解了 RLHF 的组成部分,包括强化学习、状态空间、动作空间、奖励函数和策略优化。了解 RLHF 如何通过使其输出与人类价值观和偏好保持一致来增强 AI,同时解决其局限性和未来改进的潜力,例如从 AI 反馈中进行强化学习

Reinforcement Learning through Human Feedback - EXPLAINED! | RLHF

https://www.youtube.com/watch?v=dCelRItdGfc

个人很喜欢的youtube channel;这个作者的讲解非常清楚通俗

RLHF & DPO Explained (In Simple Terms!)

https://www.youtube.com/watch?v=nSrj1J6ODoM&t=1s

从high-level一步步深入解析了RLHF的各个技术

Reinforcement Learning with Human Feedback - How to train and fine-tune Transformer Models

https://www.youtube.com/watch?v=Z_JUqJBpVOk

用生动易懂的类比/动画讲解原理

Lecture

Reinforcement Learning from Human Feedback: From Zero to chatGPT

https://www.youtube.com/watch?v=2MBJOuVq380

一个HuggingFace的直播课;介绍了RLHF的基础知识,以及如何使用这项技术来实现 ChatGPT 等最先进的 ML 工具。演讲的大部分内容将概述互连的 ML 模型,并介绍自然语言处理和 RL 的基础知识,以便了解如何在大型语言模型上使用 RLHF

Tutorial

HuggingFace

★★★★★

ChatGPT 背后的“功臣”——RLHF 技术详解

https://huggingface.co/blog/zh/rlhf

(强烈推荐)RLHF技术分解

SuperAnnotate

★★★★★

Reinforcement learning with human feedback (RLHF) for LLMs

https://www.superannotate.com/blog/rlhf-for-llm#rlhf-in-superannotate

比较全面的RLHF介绍以及与其他相关技术的对比

Other

★★★★★

LLM Training: RLHF and Its Alternatives

https://magazine.sebastianraschka.com/p/llm-training-rlhf-and-its-alternatives

(强烈推荐)深入探讨了大型语言模型(LLM)的训练流程,特别是通过人类反馈的强化学习(RLHF)在对齐阶段的重要性,并比较了 ChatGPT 和 Llama 2 的 RLHF 实施方式,同时介绍了 RLHF 的替代方法

LabelBox

★★★★★

How to Implement Reinforcement Learning from Human Feedback (RLHF)

https://labelbox.com/guides/how-to-implement-reinforcement-learning-from-human-feedback-rlhf/#the-rlhf-process-a-step-by-step-guide

很清晰的step-by-step process讲解

CSDN

★★★★★

搞懂大模型的智能基因,RLHF系统设计关键问答

https://blog.csdn.net/m0_64336780/article/details/132360175

通过问答的形式讲解了RLHF设计的原理

CSDN

★★★★★

【LLM】大模型之RLHF和替代方法(DPO、RAILF、ReST等)

https://blog.csdn.net/qq_35812205/article/details/133563158

非常全面的讲解,包括了各种方法和在模型里的应用

38

Proximal Policy Optimization Algorithms

https://arxiv.org/abs/1707.06347


近端策略优化(Proximal Policy Optimization, PPO)

使用一个奖励模型,评估文本是否符合人类偏好(即是否高质量)。

根据奖励值优化模型,同时加入 KL 散度惩罚,防止模型过度偏离初始微调的行为。

Paper, Concept

Tutorial

Youtube

★★★★★

Proximal Policy Optimization | ChatGPT uses this

https://www.youtube.com/watch?v=MVXdncpCbYE

从overview到深入了解到讲解,结合动画非常好理解

An introduction to Policy Gradient methods - Deep Reinforcement Learning

https://www.youtube.com/watch?v=5P7I-xPq8u8

很清晰有逻辑的讲解,比较technical,需要一些ML和Reinforcement learning的基础

精读视频, 引导理解

Bilibili

★★★★★

深度强化学习经典论文PPO (Proximal Policy Optimization) 解读

https://www.bilibili.com/video/BV13v411h7dS

对于PPO算法论文的精读视频,讲的很清楚;论文涉及到的数学和RL比较多

精读视频, 引导理解, 代码解析

强化学习策略梯度之proximal policy optimization PPO理论与代码(上)

https://www.bilibili.com/video/BV1f34y1x795

强化学习策略梯度之Proximal Policy Optimization PPO理论与代码(二)

https://www.bilibili.com/video/BV1hY4y1q78m

很用心细致的讲解视频,包括了公式的推导以及一个Demo的代码讲解

引导理解

Bilibili

★★★★★

李宏毅深度强化学习(国语)课程(2018)

https://www.bilibili.com/video/av24724071

李宏毅老师的深度学习课程,讲解了PPO算法,讲解很清楚,很值得看

代码复现, 技术细节梳理

Youtube

★★★★★

Proximal Policy Optimization (PPO) is Easy With PyTorch | Full PPO Tutorial

https://www.youtube.com/watch?v=hlv79rcHws0

介绍 ppo 算法背后的基本概念,以及 pytorch 框架中的完整实现

代码复现, 技术点详解

CSDN

★★★★★

PPO(Proximal Policy Optimization)算法原理及实现,详解近端策略优化

https://blog.csdn.net/weixin_41106546/article/details/137359690

非常详尽的公式推导和算法详解,以及tensorflow实现

相关拓展, 引导理解, 技术点详解

知乎

★★★★★

深度解读:Policy Gradient,PPO及PPG

https://zhuanlan.zhihu.com/p/342150033

结合多篇最新的分析性paper及开源代码从Policy Gradient谈起,重点分析PPO的算法细节,并进一步讨论大规模深度强化学习的算法优化

引导理解, 代码解析

简书

★★★★★

Proximal Policy Optimization(PPO)算法原理及实现!

https://www.jianshu.com/p/9f113adc0c50

解析了算法原理和代码

39

Direct Preference Optimization: Your Language Model is Secretly a Reward Model

https://arxiv.org/abs/2305.18290


直接偏好优化(Direct Preference Optimization, DPO)

不需要单独训练奖励模型,而是将偏好对齐问题转换为分类任务。

通过比较参考模型(通常是微调后的模型)的回答质量,对不同答案进行优化。

Paper, Concept

引导理解, 技术点详解

Bilibili

★★★★★

DPO (Direct Preference Optimization) 算法讲解

https://www.bilibili.com/video/BV1GF4m1L7Nt

非常清晰易懂的DPO算法讲解

精读视频, 引导理解

Youtube

★★★★★

Direct Preference Optimization (DPO) - How to fine-tune LLMs directly without reinforcement learning

https://www.youtube.com/results?search_query=Direct+Preference+Optimization

用比较生动的类比讲解了DPO的原理

技术细节梳理, 相关拓展, 引导理解, 模型使用教程

Youtube

★★★★★

Direct Preference Optimization (DPO) explained: Bradley-Terry model, log probabilities, math

https://www.youtube.com/watch?v=hvGa5Mba4c8

首先介绍语言模型及其如何用于文本生成,然后介绍 AI alignment,回顾强化学习 (RL),逐步推导了 Bradley-Terry 偏好模型下的奖励模型的损失函数,构建了 DPO 算法的损失,解释了数学推导,直观地说明了工作原理;展示如何在 Hugging Face 库中实现它,描述了如何实际使用损失,即如何使用 Transformer 模型计算对数概率

精读视频, 引导理解

Youtube

★★★★★

Direct Preference Optimization (DPO): Your Language Model is Secretly a Reward Model Explained

https://www.youtube.com/watch?v=HCFTXTn1PHA&t=448s

带着读者边读论文边理解的paper explanation

引导理解, 技术点详解

HuggingFace

★★★★★

Preference Tuning LLMs with Direct Preference Optimization Methods

https://huggingface.co/blog/pref-tuning

强调了在DPO时选择正确的超参数集的重要性;通过经验证明,DPO 和 IPO 可以实现可比的结果,在配对偏好设置中表现优于 KTO

引导理解, 技术点详解, 见解分析

CSDN

★★★★★

【基础知识】DPO(Direct Preference Optimization)的原理以及公式是怎样的?

https://blog.csdn.net/u014386899/article/details/136633074

总结了论文的基本原理和具体实现的数学公式详解

Direct Preference Optimization (DPO)原理详解及公式推导

https://blog.csdn.net/qq_36803941/article/details/142251643

比上一篇更全面详尽

知乎

Direct Preference Optimization(DPO)学习笔记

https://zhuanlan.zhihu.com/p/676371444

条理清晰的overview精读

知乎

DPO 是如何简化 RLHF 的

https://zhuanlan.zhihu.com/p/671780768

大家都评论这篇解读非常清晰,看完就理解了DPO的思想

模型实战

Personal Blog

★★★★★

Fine-tune Mistral-7b with Direct Preference Optimization

https://mlabonne.github.io/blog/posts/Fine_tune_Mistral_7b_with_DPO.html

Tutorial to fine-tune a Mistral-7b model with DPO and reproduce NeuralHermes-2.5.

https://huggingface.co/mlabonne/NeuralHermes-2.5-Mistral-7B

Youtube

★★★★★

Fast Fine Tuning and DPO Training of LLMs using Unsloth

https://www.youtube.com/watch?v=blSQov4DYO8

深入探讨了DPO,演示了如何通过集成 QLoRA 和 LoRA 技术,实现 2-5 倍的微调速度和显着 70% 的内存使用量减少

6. Evaluation


Reliably evaluating LLMs is a complex but essential task guiding data generation and training. It provides invaluable feedback about areas of improvement, which can be leveraged to modify the data mixture, quality, and training parameters. However, it's always good to remember Goodhart's law: "When a measure becomes a target, it ceases to be a good measure."


Name

Category

Article Category

Source

Rating

Resources

Note

40

自动化基准测试 Automated benchmarks:用标准数据集和指标评估具体任务,易受数据污染,难测抽象能力(e.g., creativity)。

人工评估 Human Evaluation:人类评分主观任务(如创造力),但不可靠于事实性验证。

基于模型的评估 Model-based evaluation:用奖励模型评价,与人类偏好一致,但有偏差和不稳定问题。

反馈信号 Feedback Signal:分析错误模式,优化数据和训练参数改善模型弱点。

Evaluation

Tutorial

GitHub

★★★★★

The LLM Evaluation guidebook

https://github.com/huggingface/evaluation-guidebook?tab=readme-ov-file

(超级推荐)适合初学者和进阶者的超完整版LLM evaluation指南

Framework

GitHub

★★★★★

Language Model Evaluation Harness

https://github.com/EleutherAI/lm-evaluation-harness

该项目提供了一个统一的框架,用于在大量不同的评估任务中测试生成式语言模型

Framework

GitHub

★★★★★

Unlock the Power of LLM Evaluation with Lighteval

https://github.com/huggingface/lighteval

Lighteval 是一款多合一的工具包,可用于在多个后端中评估LLM

Tutorial

HuggingFace

★★★★★

Let's talk about LLM evaluation

https://huggingface.co/blog/clefourrier/llm-evaluation

比较了自动化基准测试、人工评估和模型作为评估者的优缺点,强调了每种方法在不同应用场景中的适用性和局限性

Leaderboard

HuggingFace

★★★★★

Open LLM Leaderboard

https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard#/

用于评估和比较开源LLM,通过标准化的测试指标和公开的基准测试,为开源 LLM 提供了透明的性能排名

Leaderboard

LMSYS

★★★★★

Chatbot Arena (formerly LMSYS): Free AI Chat to Compare & Test Best AI Chatbots

https://lmarena.ai/

通用型大型语言模型的 Elo 评分基于人类评估 (human evaluation).

Tutorial

Youtube

★★★★★

7 Popular LLM Benchmarks Explained [OpenLLM Leaderboard & Chatbot Arena]

https://www.youtube.com/watch?v=aOjgPJ94-aM&t=15s

简单直观的讲解了常见的LLM评估方法

Tutorial

CSDN

★★★★★

LLM评估(一)| 大模型评估的四种方法

https://blog.csdn.net/wshzd/article/details/135689899

探讨生成人工智能的评估方法,包括文本生成和大型语言模型。

7. Quantization


Quantization is the process of converting the parameters and activations of a model using a lower precision. For example, weights stored using 16 bits can be converted into a 4-bit representation. This technique has become increasingly important to reduce the computational and memory costs associated with LLMs.


Name

Category

Article Category

Source

Rating

Resources

Note

41

量化(Quantization) 是一种将模型的参数和激活值转化为低精度表示的技术。例如,将原本以 16 位(float16)存储的权重转换为 4 位表示。通过这种方法,可以显著降低大型语言模型(LLM)的计算和内存需求,是优化模型效率的重要手段。

Concept

Tutorial

Youtube

★★★★★

What is LLM quantization?

https://www.youtube.com/watch?v=qqN63hbziaI

非常清晰易懂的介绍

Youtube

★★★★★

Optimize Your AI - Quantization Explained

https://www.youtube.com/watch?v=K75j8MkwgJ0&t=120s

生动的类比来介绍,非常通俗

Other

★★★★★

Basics of Quantization in Machine Learning (ML) for Beginners

https://iq.opengenus.org/basics-of-quantization-in-ml/

入门级tutorial,很容易理解

Datacamp

★★★★★

Quantization for Large Language Models (LLMs): Reduce AI Model Sizes Efficiently

https://www.datacamp.com/tutorial/quantization-for-large-language-models

结合代码的介绍

42

基础技术


学习不同的精度级别(如 FP32、FP16、INT8 等)。

使用简单的量化方法,如 absmax(绝对最大值缩放)和 zero-point(零点偏移)。

Personal Blog

★★★★★

Introduction to Weight Quantization

https://mlabonne.github.io/blog/posts/Introduction_to_Weight_Quantization.html

Overview of quantization, absmax and zero-point quantization, and LLM.int8() with code.

Bilibili

★★★★☆

大语言模型量化简介

https://www.bilibili.com/video/BV1zm4y1u72W

很详尽的介绍,思路很清晰,比较technical

Course

Bilibili

★★★★☆

大模型量化一网打尽(一)理论基础

https://www.bilibili.com/video/BV17m411f7Cm

非常深入细节的课程

43

GGUF https://huggingface.co/docs/hub/en/gguf 和 llama.cpp https://github.com/ggerganov/llama.cpp


llama.cpp 是一种专为在 CPU 上运行模型而设计的工具,与 GGUF 格式(用于存储模型权重)配合使用,成为在消费级硬件上运行 LLM 的热门工具。

Concept

相关拓展

知乎

★★★★★

LLaMA 的GGML和GGUF区别是什么?

https://www.zhihu.com/question/622339524/answer/4422944154

讲解了GGUF格式

Tool

Tutorial

Personal Blog

Quantize Llama models with GGUF and llama.cpp

https://mlabonne.github.io/blog/posts/Quantize_Llama_2_models_using_ggml.html

很清楚细致的概念解释;Tutorial on how to quantize a Llama 2 model using llama.cpp and the GGUF format.

Youtube

Quantize any LLM with GGUF and Llama.cpp

https://www.youtube.com/watch?v=wxQgGK5K0rE

带着读者一步一步实现代码的tutorial,讲解很清晰

Youtube

Running LLMs on a Mac with llama.cpp

https://www.youtube.com/watch?v=YDj_ScvBpKU

在 Mac 上使用 brew 安装 llama.cpp的教程

Bilibili

【大模型量化】llama.cpp轻量化模型部署及量化

https://www.bilibili.com/video/BV1et421N7TK/

非常详细的讲解,从技术背景到安装,再到实战

CSDN

大模型使用llama.cpp转换gguf格式并量化 | 新手炼丹记录(2)

https://blog.csdn.net/m0_73365120/article/details/141901884

Windows新手教程

44

GPTQ https://huggingface.co/docs/transformers/en/quantization/gptq 和 AWQ https://huggingface.co/docs/transformers/en/quantization/awq


GPTQ(EXL2) 和 AWQ 是先进的量化技术,通过逐层校准在极低比特宽度下保持模型性能。

动态缩放参数,减少量化过程中发生的严重异常值。

有选择地跳过或重新调整重要参数,降低性能损失。

Technique

Tutorial

Personal Blog

★★★★★

A Visual Guide to Quantization

https://www.maartengrootendorst.com/blog/quantization/

非常全面的量化教程,从概念到技术逐步深入

Personal Blog

★★★☆☆

4-bit LLM Quantization with GPTQ

https://mlabonne.github.io/blog/posts/4_bit_Quantization_with_GPTQ.html

Tutorial on how to quantize an LLM using the GPTQ algorithm with AutoGPTQ.

Medium

★★★★★

Understanding Activation-Aware Weight Quantization (AWQ): Boosting Inference Serving Efficiency in LLMs

https://medium.com/friendliai/understanding-activation-aware-weight-quantization-awq-boosting-inference-serving-efficiency-in-10bb0faf63a8

AWQ简介和benefits概述

Youtube

★★★★★

Which Quantization Method is Right for You? (GPTQ vs. GGUF vs. AWQ)

https://www.youtube.com/watch?v=mNE_d-C82lI&t=205s

结合图和代码解析了量化常见的三种方法,清晰易懂

Course

Bilibili

★★★★☆

[LLMs inference] quantization 量化整体介绍(bitsandbytes、GPTQ、GGUF、AWQ)

https://www.bilibili.com/video/BV1FH4y1c73W

从概念到应用逐步深入到讲解

Tutorial

Youtube

★★★★★

Quantize LLMs with AWQ: Faster and Smaller Llama 3

https://www.youtube.com/watch?v=OMkyocVyEpQ

演示了如何应用 AWQ 来量化 Llama 3,从而实现一个不仅比非量化模型更快而且更小的模型,深入了解该过程的细节并实时查看其优势

CSDN

★★★★★

从加载到对话:使用 Transformers 本地运行量化 LLM 大模型(GPTQ & AWQ)

https://blog.csdn.net/weixin_42426841/article/details/142834780

详细介绍了如何使用 Transformers 框架在本地加载和运行量化后的LLM,通过 GPTQ 和 AWQ 等量化技术,提供了从模型下载、环境配置到推理测试的完整步骤

相关拓展

CSDN

★★★☆☆

模型量化之AWQ和GPTQ

https://blog.csdn.net/qiaotl/article/details/135204667

量化技术的简介

8. New Trends


Here are notable topics that didn't fit into other categories. Some are established (model merging, multimodal) techniques, but others are more experimental (interpretability, test-time compute scaling) and the focus of numerous research papers.


Name

Category

Article Category

Source

Rating

Resources

Note

45

模型合并(Model Merging)将多个训练好的模型合并,以创建无需额外微调的高性能模型。

Technique

Course

Youtube

★★★★★

Deep dive: model merging (part 1)

https://www.youtube.com/watch?v=cvOpX75Kz4M

Deep dive: model merging, part 2

https://www.youtube.com/watch?v=qbAvOgGmFuE

介绍model merging的概念,以及比较popular的model merging算法讲解

Tutorial

NVIDIA

★★★★☆

An Introduction to Model Merging for LLMs

https://developer.nvidia.com/blog/an-introduction-to-model-merging-for-llms/

介绍了模型合并技术,并探讨了不同的合并方法及其演进

Tutorial

Personal Blog

★★★★★

Merge Large Language Models with MergeKit

https://mlabonne.github.io/blog/posts/2024-01-08_Merge_LLMs_with_mergekit.html

回顾四种合并方法并提供配置示例;使用mergekit https://github.com/arcee-ai/mergekit创建自己的模型Marcoro14-7B-slerp

Tool

GitHub

★★★☆☆

mergekit

https://github.com/arcee-ai/mergekit

mergekit is a toolkit for merging pre-trained language models.

46

多模态模型(Multimodal Models)能够处理多种输入类型(如文本、图像、音频等),并在统一的嵌入空间中表示这些输入。

Technique

Tutorial

Youtube

★★★★★

How do Multimodal AI models work? Simple explanation

https://www.youtube.com/watch?v=WkoytlA3MoQ

用简单的语言介绍了多模态在 AI 中的工作原理,以及多模态模型和多模态界面之间的区别

Tutorial

Personal Blog

★★★★★

Multimodality and Large Multimodal Models (LMMs)

https://huyenchip.com/2023/10/10/multimodal.html

概述了多模态系统的背景、训练基础和研究方向,详细介绍了 CLIP 和 Flamingo 等模型

Course

Youtube

★★★★★

Lecture 1.1 - Introduction (CMU Multimodal Machine Learning, Fall 2023)

https://www.youtube.com/watch?v=DPkwjgaRvyI&list=PL-Fhd_vrvisMYs8A5j7sj8YW1wHhoJSmW

CMU的11-777 Multimodal ML

Paper

Milestone papers

★★★★★

LLaVA: Large Language and Vision Assistant

https://llava-vl.github.io/

LLaVA:扩展语言模型支持多模态输入

Tool

Model

Stability AI

★★★★★

Stable Diffusion

https://stability.ai/stable-image

Stable Diffusion:实现文本到图像的生成

Tool

Model

OpenAI

★★★★★

CLIP: Connecting text and images

https://openai.com/index/clip/

CLIP:连接文本和图像的嵌入表示

47

模型可解释性(Interpretability)通过解析模型的内部机制,深入理解 LLM 的工作原理。

Concept

Tutorial

HuggingFace

★★★★★

Uncensor any LLM with abliteration

https://huggingface.co/blog/mlabonne/abliteration

介绍了Abliteration技术,通过识别并移除LLM中负责拒绝有害请求的特定方向,无需重新训练即可解除模型的内置拒绝机制,使其对所有类型的提示做出响应

Tutorial

Youtube

★★★★★

Interpretable Machine Learning Models

https://www.youtube.com/watch?v=34yBgah8Uyg

讨论可解释的机器学习模型的重要性以及在解释和解释模型时应该考虑的一些问题

Tutorial

Youtube

★★★★★

Interpretable vs Explainable Machine Learning

https://www.youtube.com/watch?v=VY7SCl_DFho&t=31s

解释了可解释性(Explainability)和可解释性(Interpretability)在机器学习中的区别

Tutorial

Personal Blog

★★★★★

An Intuitive Explanation of Sparse Autoencoders for LLM Interpretability

https://adamkarvonen.github.io/machine_learning/2024/06/11/sae-intuitions.html

直观地解释了稀疏自编码器(SAE)如何用于大型语言模型(LLM)的可解释性,通过引入稀疏性约束,将模型的复杂计算分解为更易理解的组件,从而揭示模型内部的工作机制

48

Mixture of Experts (MoE) 是一种动态神经网络架构,旨在提高模型的计算效率和性能。MoE通过在不同的子模型(称为“专家”)之间分配任务,仅激活其中的一部分来处理输入,从而减少整体计算需求。这种架构能够在大规模模型中实现参数和计算资源的高效利用

Technique

Tutorial

Youtube

★★★★★

What is Mixture of Experts?

https://www.youtube.com/watch?v=sYDlVVyJYn4

解释了专家混合(MoE)模型的概念

Youtube

★★★★★

A Visual Guide to Mixture of Experts (MoE) in LLMs

https://www.youtube.com/watch?v=sOPDGQjFcuM

通过可视化方式,深入讲解了MoE架构

Personal Blog

A Visual Guide to Mixture of Experts (MoE)

https://newsletter.maartengrootendorst.com/p/a-visual-guide-to-mixture-of-experts

HuggingFace

★★★★★

Mixture of Experts Explained

https://huggingface.co/blog/moe

深入解析了MoE的结构、训练方法,以及在推理时的权衡

Paper

精读视频, 引导理解

Youtube

★★★★★

Mixtral of Experts (Paper Explained)

https://www.youtube.com/watch?v=mwO6v4BlgZQ

详细解释了论文《Mixtral of Experts》https://arxiv.org/abs/2401.04088 ,介绍了专家混合模型的概念、经典 Transformer 模块、专家路由以及稀疏专家的实现



DIY吧 除非你...
若你有信心 我建议CS申硕申博求职DIY~ 若你想找专家伴你成长 我建议寻找做啥成啥的人 他们能力强 资源多 能解决你一切CS申硕申博求职身份生活的挑战~
先找其他机构?
肯定有其他靠谱机构 但如果你感觉他们干不过我、或你走投无路了 你再来找我吧hhh 但如果我没名额了 希望你别难过 我不是针对你 而是我每年名额都会满
就想加肖哥微信
我的微信被我藏在我荡气回肠的人生经历里 xiaogeedu.tech/col.jsp?id=253 辛苦你去找下hhh 我是美西时区 但每年9月中-12月中是申请季/招聘季 作息是乱的
不考虑商业合作
不商业合作 因为我不知谁靠谱 不合作能杜绝狗血 因噎废食能保护我自己 且我不缺流量还要赶走流量 找我合作您巨亏hh 我与任何商家或申硕申博求职中介都无关
用电脑访问本站
不建议用手机端访问本站,看着贼挤,在电脑端看着舒服hh