title
stringlengths
12
112
published
stringlengths
19
23
url
stringlengths
28
28
video_id
stringlengths
11
11
channel_id
stringclasses
5 values
id
stringlengths
16
31
text
stringlengths
0
596
start
float64
0
37.8k
end
float64
2.18
37.8k
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t628.96
the sentence transformers people have actually trained sentence transformers that can use all
628.96
642.64
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t635.92
more than 50 languages at once. And the performance is good. It's not just that they, you know,
635.92
650.16
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t642.64
managed to get a few phrases correct. The performance is actually quite good. So I think,
642.64
655.76
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t650.16
you know, it's pretty impressive. And, you know, the training time for these is super quick,
650.16
664.8
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t656.56
as we'll see. And like I said, it's using just translation data, parallel data, which is reasonably
656.56
673.76
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t664.8
easy to get for almost every language. So I think that's pretty useful. Now, well, let's have a look
664.8
680.72
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t673.76
at what that multi-lingual knowledge distillation training process actually looks like. So it's what
673.76
687.2
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t680.7199999999999
we have here. So same example as before. I've got, I like plants this time and mi piaccia
680.72
694.8
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t687.2
no le piante, which is again, the same thing in Italian. Now we have both of those. We have a
687.2
702.08
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t694.8000000000001
teacher model and a student model. Now, when we say knowledge distillation, that means where you
694.8
708.96
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t702.08
basically take one model and you distill the knowledge from that one model into another model
702.08
714.72
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t708.96
here. The model that already knows some of the stuff that we want, that we want to distill
708.96
722.48
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t714.72
knowledge from is called the teacher model. Okay. Now the teacher model in this case is going to be
714.72
726.96
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t722.48
a monolingual model. So it's probably going to be a sentence transformer. That's very good
722.48
736.4
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t727.52
at English tests only. And what we do is we take the student model, which is going to be,
727.52
742.32
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t736.4
it doesn't have to be a sentence transformer. It's just a pre-trained transform model. We'll be using
736.4
751.52
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t742.32
XLM Roberta later on, and it needs to be capable of understanding multiple languages. Okay. So
742.32
757.6
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t752.24
in this case, we feed the English sentence into both our teacher model and student model. And
752.24
763.44
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t757.6
then we optimize the student model to reduce the difference between the two vectors output
757.6
771.12
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t764.08
by those two models. And that makes the student model almost mimic the monolingual aspect of the
764.08
777.76
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t771.12
teacher model. But then we take it a little further and we process the Italian or the target language
771.12
783.68
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t777.76
through the student model. And then we do the same thing. So we try to reduce the difference
777.76
789.52
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t783.68
between the Italian vector and the teacher's English vector. And what we're doing there is
783.68
796.48
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t789.52
making the student model mimic the teacher for a different language. Okay. So through that process,
789.52
804
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t796.48
you can add more and more languages to a student model, which mimics your teacher model, which,
796.48
813.92
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t805.04
yeah, I mean, it seems at least really simple just to think of it like that in my opinion anyway,
805.04
824.72
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t815.2
but it works really well. So it's a very cool technique in my opinion. I do like it. So just
815.2
831.36
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t824.72
a more visual way of going through that. We have these different circles, they represent different
824.72
837.2
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t831.36
language tasks or different languages, but pretty similar or the same task in each one of those.
831.36
844.56
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t837.9200000000001
We have our monolingual teacher model and that can perform on one of these languages, but fails
837.92
851.6
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t844.5600000000001
on the others. We take that monolingual model or our teacher model, and then we also take a pre-trained
844.56
857.2
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t851.6
multilingual model. So the important thing here is that it can handle new languages. Like I said,
851.6
863.28
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t857.2
with Excel learning Roberta, this is our student. We perform multilingual knowledge distillation,
857.2
868.32
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t863.28
meaning the student learns how the teacher performs well on the single task by mimicking
863.28
874.16
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t868.32
its sentence vector outputs. The student then performs this mimicry across multiple languages.
868.32
881.28
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t874.16
And then hopefully the student model can now perform across all of the languages that we are
874.16
889.04
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t881.28
wanting to train on. That's how the multilingual knowledge distillation works. Let's have a look
881.28
895.92
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t889.04
at that in code. Okay. So we're in our code here. And the first thing I'm going to do is actually
889.04
904
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t895.92
get our data. So in the paper that introduced the multilingual knowledge distillation,
895.92
914.72
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t904.0
Reimers and Guravich use the focus partly on this TED subtitles data. So we know TED talks,
904
919.92
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t914.7199999999999
they're just low talks where people present on a particular topic, usually pretty interesting.
914.72
928.8
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t919.92
And those TED talks have subtitles in loads of different languages. So they scraped that subtitle
919.92
936.24
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t928.8
data and use that as sentence pairs for the different languages. Okay. So that's the parallel
928.8
944.24
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t936.24
data. Now, what I'm going to do is use Hug and Face Transformers to download that. So we just
936.24
950.08
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t944.24
import datasets here. Sorry, I said Hug and Face Transformers actually Hug and Face datasets here.
944.24
957.84
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t951.36
So import datasets and I'm going to load that dataset and just have a look at what the structure
951.36
964.48
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t957.84
of that dataset is. So it's the TEDMortar and I'm just getting the training data here. You see in
957.84
971.6
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t964.48
here we have this features, translations and talk name. Now it's not really very clear.
964.48
978.72
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t971.6
But inside the translations data, we have the language tag. So these are language codes,
971.6
983.28
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t978.72
ISO language codes. If you type that into Google, they'll pop up. If you don't know which one,
978.72
993.52
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t983.9200000000001
which are which. And below we also have in here, it's not very clear again. So if I come here,
983.92
998.32
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t993.52
we have translations and each one of those corresponds to the language code up here.
993.52
1,007.28
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t998.32
Okay. So if we came here, we see EN English and we find it here. Okay. And then we also have
998.32
1,015.04
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1007.2800000000001
talk name. It's not really important for us. So we can get the index of our English text. We need
1,007.28
1,022
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1015.0400000000001
to extract that for our source language. So we extract that, we get a number four. So we're
1,015.04
1,028.24
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1022.0
going into those language pairs, finding EN. And then we use that index to get the corresponding
1,022
1,035.76
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1028.24
translation, which is here. And then we'd use that to create all of our pairs. Now here,
1,028.24
1,041.68
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1035.76
I've just created loads of pairs. This first one, so this is English to Arabic. But if we have a
1,035.76
1,046.56
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1041.68
load, there's actually loads of pairs here. So we have 27 in total, which is obviously quite a lot.
1,041.68
1,054.24
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1046.56
We're probably not going to use all of those. I mean, you could do if you wanted, it depends on
1,046.56
1,059.04
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1054.24
what you're trying to build. But I think most of us are probably not going to be trying to build
1,054.24
1,065.92
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1060.48
some model that crosses all these different languages. So what I'm going to do is just
1,060.48
1,075.44
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1065.9199999999998
initialize a list of languages that we would like to train on. So we're going to be feeding all of
1,065.92
1,083.36
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1075.44
this into a sentence transformer class called parallel sentences dataset. And that requires
1,075.44
1,092.24
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1084.24
that we one, separate our pairs using a tab character. And two, keep all those pairs separated
1,084.24
1,100.48
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1092.24
in different GZIP files. So that's why I'm using this particular structure. So data pre-processing
1,092.24
1,103.92
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1100.48
steps here, I'm just running through them quickly because I want to focus more on the actual
1,100.48
1,110.8
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1103.92
sentence transformer training part. So run that, we can, well, it's actually going to take a moment.
1,103.92
1,118.48
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1110.8000000000002
So let me skip forwards. Okay. And then we want to see how many pairs, well, I just want to see,
1,110.8
1,122.16
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1118.48
we don't have to do this. I want to see how many pairs we have for each language.
1,118.48
1,129.52
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1122.88
And you see here we have about 200,000 for each of them. The German one is slightly less.
1,122.88
1,134.56
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1129.52
Okay. And then let's have a look at what those source and translations look like. So here we
1,129.52
1,144.16
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1134.56
have applause and applause. Now I think that's Italian, it seems so. But here we can see, okay,
1,134.56
1,151.6
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1144.16
the end of the talk ends in applause. Obviously the subtitles say applause, or hopefully it ends
1,144.16
1,157.28
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1151.6
in applause. And then we just have the tab character and that separates the source language,
1,151.6
1,166.72
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1157.28
English in this case, from the translated language. Now, okay. Now what we want to do is save that
1,157.28
1,173.04
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1166.72
data. So we sort all that in these dictionaries. Okay. So initialize dictionary here and access
1,166.72
1,184.08
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1173.04
them here. So we have enit, es, ar, fr, and de. And now I'm just going to save them. So run this.
1,173.04
1,190.48
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1184.08
That will save. And what I'll do is, sorry, OSLister. So we can see what is in there.
1,184.08
1,201.44
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1191.76
Where is it? It's data. Just data. Is that right? Okay. And then we have these five files. Okay.
1,191.76
1,210.32
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1202.24
Now let's continue. So now what we want to do is, okay, we have, that's our training data. It's
1,202.24
1,217.92
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1210.32
ready or mostly ready before we feed it into the Sentence Transformer's parallel sentences
1,210.32
1,224.56
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1217.9199999999998
dataset object later on. So, okay, let's leave that for now and move on to the next step, which is
1,217.92
1,232.08
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1224.56
choosing our teacher and student models. So, you know, I already mentioned before, we want our
1,224.56
1,238.8
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1232.08
student model to be capable of multilingual comprehension. So what I mean by that, or
1,232.08
1,245.52
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1238.8
not just what I mean, but one big component of that is, can the Transformer tokenizer deal with
1,238.8
1,253.36
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1245.52
different languages? In some cases they really can't. So let me show you what the Debert tokenizer
1,245.52
1,259.52
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1253.36
does with these four different sentences. So we'll just loop through each one. So four text in
1,253.36
1,266.64
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1260.08
sentences. And what I'm going to do is just print. I'm going to print the output of Debert
1,260.08
1,277.36
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1266.64
tokenizer. And if I tokenize that text, now what does it give me? Okay. So what we have here, okay,
1,266.64
1,285.68
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1277.3600000000001
English, of course, is fine. But the tokenizer or the vocabulary of the tokenizer is, I think,
1,277.36
1,294.64
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1285.68
roughly 30,000 tokens. Okay. And most of those are English based. Okay. Some, like you can see here,
1,285.68
1,298.72
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1294.64
that it has picked up some Chinese characters because it does, you know, other languages do
1,294.64
1,303.36
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1298.72
feed into it a little bit because it's just, you know, all the data is pulled from the internet,
1,298.72
1,310.08
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1303.92
other bits do get in there, but it's mostly English. So that's why we see, okay, we have these
1,303.92
1,316.88
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1310.08
unknown characters. Now, as soon as we have an unknown character in our sentence, the tokenizer,
1,310.08
1,322.8
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1316.8799999999999
or no, sorry, the transformer is read against the wood to understand, you know, what is in that
1,316.88
1,329.44
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1322.8
position? What is that unknown token supposed to represent? In the case of, you know, I think of it
1,322.8
1,336.64
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1329.4399999999998
as it's like, you know, when you're a kid in school and they had those, you know, had like a
1,329.44
1,341.76
All You Need to Know on Multilingual Sentence Vectors (1 Model, 50+ Languages)
2021-11-04 13:00:10 UTC
https://youtu.be/NNS5pOpjvAQ
NNS5pOpjvAQ
UCv83tO5cePwHMt1952IVVHw
NNS5pOpjvAQ-t1336.64
paragraph and you had to fill in the blanks, right? So you had a paragraph and occasionally
1,336.64
1,346.56