Skip to Content
图解大模型 : 生成式AI 原理与实战
book

图解大模型 : 生成式AI 原理与实战

by Jay Alammar, Maarten Grootendorst
May 2025
Intermediate to advanced
382 pages
10h 33m
Chinese
Posts & Telecom Press
Content preview from 图解大模型 : 生成式AI 原理与实战
文本分类
113
precision recall f1-score support
Negative review 0.87 0.97 0.92 533
Positive review 0.96 0.86 0.91 533
accuracy 0.91 1066
macro avg 0.92 0.91 0.91 1066
weighted avg 0.92 0.91 0.91 1066
0.91
F1
分数让我们得以看到
GPT-3.5
模型性能的冰山一角。就是这个模型让生成式
AI
走向了大众。然而,由于我们不知道模型是用什么数据训练的,因此无法轻易使用这类指
标来评估模型。就我们所知,它可能在我们所用的数据集上训练过!
在第
12
章中,我们将探索如何在更通用的任务上评估开源模型和专有模型。
4.7
 小结
在本章中,我们讨论了执行各种分类任务的技术:从对整个模型进行微调,到完全不进行
微调。对文本数据进行分类并不像表面上看起来那么简单,且有大量创新的技术可以应用。
在本章中,我们探索了使用生成模型和表示模型进行文本分类。我们的目标是根据输入文
本分配标签或类别,用于对评论的情感进行分类。
我们探索了两种类型的表示模型:特定任务模型和嵌入模型。特定任务模型是在大型数据
集上专门针对情感分析进行预训练的,它表明预训练模型对文档分类而言是一种很好的技
术。嵌入模型用于生成通用嵌入向量,我们将其作为训练分类器的输入。
同样,我们探索了两种类型的生成模型:开源的编码器
-
解码器模型(
FLAN-T5
)和专有
的仅解码器模型( ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

大模型应用开发极简入门 : 基于GPT-4 和ChatGPT(第2版)

大模型应用开发极简入门 : 基于GPT-4 和ChatGPT(第2版)

Olivier Caelen, Marie-Alice Blete
生成式人工智能可视化

生成式人工智能可视化

Priyanka Vergadia, Valliappa Lakshmanan

Publisher Resources

ISBN: 9787115670830