subtitles/en/31_navigating-the-model-hub.srt (266 lines of code) (raw):
1
00:00:00,468 --> 00:00:03,051
(upbeat music)
2
00:00:04,050 --> 00:00:05,910
- [Instructor] In this
video, we're going to go over
3
00:00:05,910 --> 00:00:08,013
the HuggingFace Model Hub navigation.
4
00:00:10,140 --> 00:00:13,260
This is the huggingface.co landing page.
5
00:00:13,260 --> 00:00:16,020
To access the model hub,
click on the models tab
6
00:00:16,020 --> 00:00:17,463
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
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
The first category is the tasks.
12
00:00:32,970 --> 00:00:36,660
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
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
The second category is the libraries.
20
00:00:57,870 --> 00:01:00,990
Models on the hub usually
share one of three backbones,
21
00:01:00,990 --> 00:01:03,900
PyTorch, TensorFlow, or JAX.
22
00:01:03,900 --> 00:01:07,503
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
This includes Transformers,
but it isn't limited to it.
26
00:01:19,260 --> 00:01:21,060
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
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
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
with which the model is shared.
39
00:01:56,700 --> 00:01:58,770
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
On the right of the model
card is the inference API.
55
00:02:39,540 --> 00:02:41,040
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
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
The files & 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
You'll see all usual
features of a Git repository:
66
00:03:13,650 --> 00:03:15,093
the branches available,
67
00:03:17,160 --> 00:03:18,520
the commit history
68
00:03:20,760 --> 00:03:22,683
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
the inference API programmatically.
73
00:03:35,910 --> 00:03:38,913
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
For BERT, this is transformers.
77
00:03:50,208 --> 00:03:52,791
(upbeat music)