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
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1022.4
And this is where we get our question.
1,022.4
1,044.16
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1039.52
Then once we're here, we need to do something slightly different,
1,039.52
1,047.92
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1044.72
which is this plausible answers.
1,044.72
1,048.72
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1047.92
Okay.
1,047.92
1,054.72
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1048.72
And then we use this access variable in order to define what we're going to loop through next.
1,048.72
1,059.52
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1057.28
So here we go for answers.
1,057.28
1,067.92
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1060.88
Answer, sorry, in QA access, because this will switch to implausible answers or answers.
1,060.88
1,076.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1067.92
And then within this for loop, this is where we can begin adding this context, question, and answer
1,067.92
1,083.12
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1076.4
to a list of questions, contexts, and answers that we still need to define up here.
1,076.4
1,089.04
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1085.52
So each one of these is just going to be an empty list.
1,085.52
1,094.64
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1089.04
And then all we do is copy this across,
1,089.04
1,101.44
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1097.04
and we just append everything that we've extracted in this loop.
1,097.04
1,106.32
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1105.44
And the context.
1,105.44
1,111.36
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1109.84
And then we just add the context.
1,109.84
1,114.96
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1113.36
And then we just add the context.
1,113.36
1,125.92
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1114.96
And the context, question, and answer.
1,114.96
1,131.68
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1130.72
And that should work.
1,130.72
1,141.52
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1136.88
So now let's take a look at a few of our contexts.
1,136.88
1,146.32
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1141.52
Okay, and we can see we have this and because we have multiple question and answers for each context,
1,141.52
1,148.88
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1146.32
the context just repeat over and over again.
1,146.32
1,155.84
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1152.4
But then we should see something slightly different when we go with answers.
1,152.4
1,160.08
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1158.16
And questions.
1,158.16
1,163.28
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1162.0
Okay, so that's great.
1,162
1,166.56
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1163.28
We have our data in a reasonable format now.
1,163.28
1,171.12
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1166.56
But we want to do this for both the training set and the validation set.
1,166.56
1,179.84
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1172.08
So what we're going to do is just going to put this into a function like we were going to do before.
1,172.08
1,184.32
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1182.8799999999999
Just read squad.
1,182.88
1,191.04
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1184.32
So here we're going to read in our data, and then we run through it and transform it into our three lists.
1,184.32
1,194.08
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1191.04
All we need to do now is actually return those three lists.
1,191.04
1,203.84
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1202.8799999999999
And answers.
1,202.88
1,206.88
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1203.84
So now what we're going to do is just go back to our training set.
1,203.84
1,211.6
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1206.8799999999999
And we're going to do this for both the training set and the validation set.
1,206.88
1,220.48
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1211.6
And answers. So now what we can do is execute this function for both our training and validation sets.
1,211.6
1,240
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1220.48
So we're going to train context, questions and answers.
1,220.48
1,252
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1250.56
Okay, so that is one of them.
1,250.56
1,254
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1252.0
And we can just copy that.
1,252
1,270
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1258.24
And we just want this to be our validation set.
1,258.24
1,274.24
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1273.68
Like so.
1,273.68
1,279.52
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1278.56
Okay, so that's great.
1,278.56
1,288.48
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1279.52
We now have the training context and the validation context, which we can see right here.
1,279.52
1,297.6
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1291.28
So here let's hope that there is a slight difference in what we see between both.
1,291.28
1,305.84
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1304.96
Okay, great.
1,304.96
1,307.12
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1305.84
That's what we would expect.
1,305.84
1,311.76
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1307.12
Okay, so now we have our data almost in the right format.
1,307.12
1,315.44
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1311.76
We just need to add the ending position.
1,311.76
1,321.44
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1316.8799999999999
So we already have the start position if we take a look in our train answers.
1,316.88
1,327.36
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1323.4399999999998
Okay, we have the answer start, but we also need the answer end.
1,323.44
1,331.36
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1328.7199999999998
And that's not included within the data.
1,328.72
1,338.08
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1331.36
So what we need to do here is actually define a function that will go through each one of our
1,331.36
1,344.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1338.8799999999999
answers and context and figure out where that ending character actually is.
1,338.88
1,350.24
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1345.9199999999998
And of course, we could just say, okay, it's the length of the text.
1,345.92
1,353.76
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1350.24
We add that onto the answer start and we have our answer end.
1,350.24
1,359.84
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1354.56
However, that unfortunately won't work because some of the
1,354.56
1,365.6
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1359.84
answer starts are actually incorrect and they're usually off by one or two characters.
1,359.84
1,373.2
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1366.3999999999999
So we actually need to go through and one, fix that and two, add our end indices.
1,366.4
1,378
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1375.1999999999998
So to do that, we're just going to define a new function.
1,375.2
1,384.96
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1380.9599999999998
It's going to be add end index.
1,380.96
1,389.52
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1384.96
And here we will have our answers and the context.
1,384.96
1,392.16
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1390.08
And then we're going to just feed these in.
1,390.08
1,414.88
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1392.16
So first thing we do is loop through each answer and context pair.
1,392.16
1,421.04
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1415.68
And then we extract something which is called the gold text, which is essentially the
1,415.68
1,423.68
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1421.04
answer that we are looking for.
1,421.04
1,426.32
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1423.68
It's called the golden text or gold text.
1,423.68
1,435.44
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1427.92
So simply our answer and within that the text.
1,427.92
1,438.24
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1436.48
So we are pulling this out here.
1,436.48
1,442.32
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1439.44
So we should already know the starting index.
1,439.44
1,451.12
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1442.32
So what we do here is simply pull that out as well.
1,442.32
1,466.16
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1454.32
And then the end index ideally will be the start plus the length of the gold text.
1,454.32
1,471.68
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1466.16
However, that's not always the case because like I said before, they can be off by one or two characters.
1,466.16
1,476.72
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1473.68
So we need to add in some logic just to deal with that.
1,473.68
1,482.48
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1477.76
So in our first case, let's assume that the characters are not off.
1,477.76
1,491.36
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1483.76
So if context start to end.
1,483.76
1,503.76
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1491.36
Start to end equals the gold text.
1,491.36
1,509.6
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1505.12
This means everything is good and we don't need to worry about it.
1,505.12
1,517.68
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1509.6
So we can modify the original dictionary and we can add answer end into there.
1,509.6
1,522.8
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1517.68
And we made that equal to our end index.
1,517.68
1,528.24
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1522.8
However, if that's not the case, that means we have a problem.
1,522.8
1,530.88
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1528.24
It's one of those dodgy question answer pairs.
1,528.24
1,539.04
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1532.16
And so this time what we can do is we'll add a else statement.
1,532.16
1,545.04
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1540.0800000000002
So we're just going to go through when the position is off by one or two characters because
1,540.08
1,548.48
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1545.04
it is not off by any more than that in the squad data set.
1,545.04
1,554.4
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1550.8
Loop through each of those and we'll say, OK, if the context.
1,550.8
1,561.6
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1556.32
And then in here, we need to add the start index and this again.
1,556.32
1,563.28
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1561.6
So let's just copy and paste that across.
1,561.6
1,563.84
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1563.28
Be easier.
1,563.28
1,570.08
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1565.76
But this time we're checking to see if it is off by one or two characters.
1,565.76
1,571.92
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1570.08
So just minus N.
1,570.08
1,575.68
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1571.92
And it's always minus and it isn't shifted.
1,571.92
1,578.72
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1575.68
It's always shifted to the left rather than shifted to the right.
1,575.68
1,580.32
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1578.72
So that's this is fine.
1,578.72
1,587.44
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1582.72
So in this case, the answer is off by end tokens.
1,582.72
1,601.04
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1587.44
And so we need to update our answer start value and also add our answer end value.
1,587.44
1,618.64
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1601.04
So start index minus N and we also have the end.
1,601.04
1,624
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1622.6399999999999
So that's great.
1,622.64
1,628.88
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1624.0
We can take that and we can apply it to our train and validation sets.
1,624
1,635.76
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1628.88
So all we do here is call the function.
1,628.88
1,642.08
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1635.7600000000002
And we just see train answers and train context.
1,635.76
1,659.04
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1642.08
And of course, we can just copy this and do the same for our validation set.
1,642.08
1,660.24
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1659.04
OK, perfect.
1,659.04
1,665.36
How to Build Custom Q&A Transformer Models in Python
2021-02-12 13:30:03 UTC
https://youtu.be/ZIRmXkHp0-c
ZIRmXkHp0-c
UCv83tO5cePwHMt1952IVVHw
ZIRmXkHp0-c-t1660.24
So now if we have a quick look, we should be able to see that we have
1,660.24
1,671.6