-
Notifications
You must be signed in to change notification settings - Fork 770
/
Copy path31_navigating-the-model-hub.srt
385 lines (308 loc) · 8.76 KB
/
31_navigating-the-model-hub.srt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
1
00:00:00,468 --> 00:00:03,051
(欢快的音乐)
(upbeat music)
2
00:00:04,050 --> 00:00:05,910
- [Instructor] 在本视频中,我们将回顾
- [Instructor] In this video, we're going to go over
3
00:00:05,910 --> 00:00:08,013
HuggingFace Model Hub 导航。
the HuggingFace Model Hub navigation.
4
00:00:10,140 --> 00:00:13,260
这是 huggingface.co 登陆页面。
This is the huggingface.co landing page.
5
00:00:13,260 --> 00:00:16,020
要访问 Model Hub,请在右上角
To access the Model Hub, click on the Models tab
6
00:00:16,020 --> 00:00:17,463
单击 Models 选项卡。
in the upper right corner.
7
00:00:18,960 --> 00:00:21,030
你会看到这个网页界面,
You should be facing this web interface,
8
00:00:21,030 --> 00:00:23,193
它被分为几个部分。
which can be split into several parts.
9
00:00:24,480 --> 00:00:26,790
在左侧,你会找到类别 (category),
On the left, you'll find categories,
10
00:00:26,790 --> 00:00:29,090
你可以使用它来自定义模型搜索。
which you can use to tailor your model search.
11
00:00:29,970 --> 00:00:32,970
第一类是任务 (tasks)。
The first category is the tasks.
12
00:00:32,970 --> 00:00:36,660
hub 上的模型可用于各种各样的任务。
Models on the hub may be used for a wide variety of tasks.
13
00:00:36,660 --> 00:00:39,030
这些包括自然语言处理任务,
These include natural language processing tasks,
14
00:00:39,030 --> 00:00:41,670
比如问答或者文本分类,
such as question answering or text classification,
15
00:00:41,670 --> 00:00:43,773
但它不仅限于 NLP。
but it isn't only limited to NLP.
16
00:00:44,850 --> 00:00:47,790
其他领域的其他任务也可用,
Other tasks from other fields are also available,
17
00:00:47,790 --> 00:00:50,340
例如计算机视觉的图像分类,
such as image classification for computer vision,
18
00:00:50,340 --> 00:00:52,683
或语音的自动语音识别。
or automatic speech recognition for speech.
19
00:00:54,840 --> 00:00:57,870
第二类是库 (Library)。
The second category is the libraries.
20
00:00:57,870 --> 00:01:00,990
hub 上的模型通常共享三个主要框架之一,
Models on the hub usually share one of three backbones,
21
00:01:00,990 --> 00:01:03,900
PyTorch、TensorFlow 或 JAX。
PyTorch, TensorFlow, or JAX.
22
00:01:03,900 --> 00:01:07,503
但是,也存在其他主干,例如 rust 或 ONNX。
However, other backbones, such as rust or ONNX also exist.
23
00:01:09,540 --> 00:01:11,850
最后,这个选项卡也可以
Finally, this tab can also be used
24
00:01:11,850 --> 00:01:15,123
指定模型来自哪个高级框架。
to specify from which high-level framework the models comes.
25
00:01:16,140 --> 00:01:19,260
这包括 Transformers ,但也不仅仅是这些。
This includes Transformers, but it isn't limited to it.
26
00:01:19,260 --> 00:01:21,060
Model Hub 用于托管
The Model Hub is used to host
27
00:01:21,060 --> 00:01:22,920
许多不同的框架模型,
a lot of different frameworks models,
28
00:01:22,920 --> 00:01:24,600
我们正在积极寻求
and we're actively looking to host
29
00:01:24,600 --> 00:01:25,893
支持其他框架模型。
other frameworks models.
30
00:01:28,530 --> 00:01:31,890
第三类是数据集 (Datasets) 选项卡。
The third category is the datasets tab.
31
00:01:31,890 --> 00:01:35,070
从此选项卡中选择数据集
Selecting a dataset from this tab means filtering the models
32
00:01:35,070 --> 00:01:37,683
意味筛选在特定数据集上训练的模型。
so that they were trained on that specific dataset.
33
00:01:39,180 --> 00:01:42,300
第四类是语言 (Language) 选项卡。
The fourth category is the languages tab.
34
00:01:42,300 --> 00:01:43,800
从此选项卡中选择一种语言
Selecting a language from this tab
35
00:01:43,800 --> 00:01:45,990
意味着筛选模型以便它们适配
means filtering the models so that they handle
36
00:01:45,990 --> 00:01:47,090
所选的语言。
the language selected.
37
00:01:48,600 --> 00:01:51,750
最后,最后一个类别允许选择模型之间
Finally, the last category allows to choose the license
38
00:01:51,750 --> 00:01:53,313
共享的许可证 (license)。
with which the model is shared.
39
00:01:56,700 --> 00:01:58,770
在右侧,你可以在 Model Hub
On the right, you'll find the models available
40
00:01:58,770 --> 00:02:00,480
找到可用的模型。
on the Model Hub.
41
00:02:00,480 --> 00:02:03,750
默认情况下,模型按下载排序。
The models are ordered by downloads by default.
42
00:02:03,750 --> 00:02:04,890
单击模型时,
When clicking on a model,
43
00:02:04,890 --> 00:02:07,230
你可以看到它的模型卡。
you should be facing its model card.
44
00:02:07,230 --> 00:02:09,990
模型卡包含有关模型的信息,
The model card contains information about the model,
45
00:02:09,990 --> 00:02:13,263
它的描述、预期用途、限制和偏差。
its description, intended use, limitations and biases.
46
00:02:14,310 --> 00:02:17,580
它还可以展示与如何使用模型相关的代码片段,
It can also show code snippets on how to use the model,
47
00:02:17,580 --> 00:02:20,070
以及任何相关信息;
as well as any relevant information;
48
00:02:20,070 --> 00:02:22,080
训练过程,数据处理,
training procedure, data processing,
49
00:02:22,080 --> 00:02:24,213
评估结果或版权。
evaluation results or copyrights.
50
00:02:25,710 --> 00:02:28,350
此信息对于要使用的模型至关重要。
This information is crucial for the model to be used.
51
00:02:28,350 --> 00:02:30,360
制作得越好的模型卡,
The better crafted a model card is,
52
00:02:30,360 --> 00:02:33,270
越方便其他用户在他们的应用程序中
the easier it will be for other users to leverage your model
53
00:02:33,270 --> 00:02:34,443
利用你的模型。
in their applications.
54
00:02:35,820 --> 00:02:38,553
模型卡右侧是 inference API。
On the right of the model card is the inference API.
55
00:02:39,540 --> 00:02:41,040
可以使用此 interence API
This inference API can be used
56
00:02:41,040 --> 00:02:43,290
直接玩模型。
to play with the model directly.
57
00:02:43,290 --> 00:02:45,690
随意修改文字,点击 compute
Feel free to modify the text and click on compute
58
00:02:45,690 --> 00:02:48,140
看看模型对你的输入有何反应。
to see how would the model behave to your inputs.
59
00:02:50,370 --> 00:02:53,013
屏幕顶部是模型标签。
At the top of your screen lies the model tags.
60
00:02:53,850 --> 00:02:56,550
这些包括模型任务,以及任何其他标签
These include the model task, as well as any other tag
61
00:02:56,550 --> 00:02:59,200
这与我们刚才看到的类别相关。
that is relevant to the categories we have just seen.
62
00:03:01,320 --> 00:03:04,410
Files and versions 选项卡显示
The Files and versions tab displays the architecture
63
00:03:04,410 --> 00:03:06,213
模型仓库的架构。
of the repository of that model.
64
00:03:07,230 --> 00:03:10,920
在这里,我们可以看到定义此模型的所有文件。
Here, we can see all the files that define this model.
65
00:03:10,920 --> 00:03:13,650
你将看到 Git repository 的所有常用功能:
You'll see all usual features of a Git repository:
66
00:03:13,650 --> 00:03:15,093
可用的 branch,
the branches available,
67
00:03:17,160 --> 00:03:18,520
commit 历史
the commit history
68
00:03:20,760 --> 00:03:22,683
以及 commit diff。
as well as the commit diff.
69
00:03:25,740 --> 00:03:27,510
在模型卡的顶部
Three different buttons are available
70
00:03:27,510 --> 00:03:29,760
有三个不同的按钮可用。
at the top of the model card.
71
00:03:29,760 --> 00:03:31,170
第一个显示如何在代码中
The first one shows how to use
72
00:03:31,170 --> 00:03:33,093
使用 inference API。
the inference API programmatically.
73
00:03:35,910 --> 00:03:38,913
第二个展示了如何在 SageMaker 中训练这个模型。
The second one shows how to train this model in SageMaker.
74
00:03:42,870 --> 00:03:44,820
最后一个显示了如何在适当的库中
And the last one shows how to load that model
75
00:03:44,820 --> 00:03:46,860
加载该模型。
within the appropriate library.
76
00:03:46,860 --> 00:03:48,783
对于 BERT,这是 transformers。
For BERT, this is transformers.
77
00:03:50,208 --> 00:03:52,791
(欢快的音乐)
(upbeat music)