distillation from the teacher no labels and the students are all in parallel as


[Live Machine Learning Research] Plain Self-Ensembles (I actually DISCOVER SOMETHING) - Part 1

well so they don't see different data or even different data augmentations it's


the exact same order of the exact same data points going through all of the


students the exact same learning rate schedule there's no noise and so on so


the first thought that came to my mind like something fishy is going on here


right like this this is this seems like to like come on there's no new


information here so I thought hey I the teacher the teacher model I've just


grabbed them from this from this repo from this pre-trained checkpoints and


these pre-trained checkpoints they are you know the checkpoints that have


performed best on the validation set so this is sort of a sneaky way of how we


could train on the validation set right because we annotate each data point in


the training data set with this checkpoint and the checkpoint has been


selected for performing especially well on the validation data set it could


explain why we get a gain on the validation data set so what I did is I


retrained all of the teacher models such that I just retrained them for these


100 epochs and I just took the last checkpoint the all everything's the same


the hyper parameters learning rate schedule and so on this is not tuned for


any particular model and it's pretty like it's pretty standard it's like it's


not like 0.12589 it's like 0.01 and 100 epochs or so fairly standard parameters


and I took just took the last checkpoint to make it didn't even look at its


performance to make sure that I didn't you know select something that was


especially good on the validation data set and the results here you'll see are


actually already the results of that run which the previous run it was almost the


same like I was astounded how well it works and then I thought hey maybe I'm


kind of you know cheating here so I redid it with the teachers that are not


specifically selected and this is already the results so that's pretty


cool right so then I wondered what happens if I now if I increase my


training amount so I just let this run for more like what if I let the students


run for more than the teacher has run again there's no new information here so


you can see that the now the okay the green is now the teacher the blue is a


hundred epochs and the orange is 250 epochs and you can see with that even


one student will outperform the teacher but many students will outperform even


more so if you give more compute there's lots of lots of headroom here to


improve you'll see this here I think this last one with the blue line is just


a bit of a weird a weird configuration I guess if you were to rerun that that


would you know fall in line so this is pretty pretty weird right so I have a


bunch of questions so first of all I've searched the literature a bit more and I


came up with a number of papers that do things like this now usually when you do


distillation you people stress the importance of like how to introduce


noise like in the noisy student paper or that you really need these data


augmentations or you know sim clear v2 uses the self distillation in order to


do in in order to label more data so they say it's important that we bring


more unlabeled data into the process and so on so all of this really doesn't


match right here and especially this focus on we need noise during the


distillation process to build these ensembles this is also you know if you


know mean teacher things like this I also found a paper called born again


neural networks that does something quite similar but not very simple not


like the same where they distill a teacher to the student with the same


architecture and then they distill the student again into another student and


then that into another student and so on and then at the end they say oh we can


also build an ensemble but sometimes their ensembles outperform their you


know chain of distillation sometimes they don't they don't really focus on


that part a lot and it's way more complicated like you distill one student


after another and I also think they they have some introduction of variability in


the students like like noise or different augmentations and so on so


this here seems you know really really really simple now I want to know this


ensemble effect it seems pretty pretty weird right so what gives so the first


thing we could do is we could say what what does how does this compare to an


ensemble of teacher models like if you actually were to build an ensemble like


train five teacher models on you know five five different teacher models


it's still the same data but reasonably they might be able to learn something


more from the data if we have five teacher models they might learn


different things from the data and therefore if we combine them they might


kind of overlap their knowledge and sort of catch where if one doesn't


generalize in one data point the other four can overrule it whereas with these


student with these cell phone samples there's not really a way where we can


learn more from data because we can only learn from the teacher and the teacher


is fixed and has seen that much data right so how does this compare so wrote


some rewrote some code is it's just plumbing and I release the code it's


linked but it's just plumbing don't worry don't worry there is no great


thoughts in there it's just plumbing such that my students don't are not all


in parallel so the ensembles are not trained in parallel anymore I train each


model individually which means that at maximum I have to have two models on the


same GPU one teacher and one student so I make sure that the teachers they are


trained from scratch and the students they're always trained from the same


teacher right so the student ensembles will be exactly the same as we have them


here that means one teacher is responsible for all the students but


yeah so okay I'll just show you the results right here so if we look at


those results you can see that and I've done it for a bunch of models right here


the blue line is the ensemble of teachers and here on the x-axis you see


the number of models and now since I'm not training everything on the same GPU


but I recombine later that that basically means that I have doubt the


ability to train up to ten models are actually however many I want and the


only real trick in the code is that when I evaluate one of these ensembles what I


do is I load a mini batch and then I basically load the first checkpoint run


the forward pass load the second checkpoint run the forward pass load the


third checkpoint run a forward pass I do this for all the checkpoints until I go


to the next mini batch but that's just for evaluating right it just seemed


easiest with the code that I had so you can see right here that the there is a


significant like this is almost overlapping right here for most models


there sometimes the student wins sometimes the teacher wins so the


teacher ensemble wins now remember the teachers are trained on you know ten


times as much data right here but it's always the same data but still they have


the opportunity to learn ten times as much information from the data whereas


the students they're all distilled from that same teacher without any noise any


augmentate any augmentations except for the augmentations that you use during


training anyway and I've done this for a hundred epochs and I've done this for


two hundred and fifty is this already 250 I think that was a hundred I just


put that there nope okay yeah that was a hundred epochs but you'll see the 250


epoch plots they look very much the same okay they're just a bit better if you


train for 250 epochs now interestingly okay here's the interesting part about


the 250 epochs the student is still distilled from a teacher model that has


been trained for a hundred epochs so all of this all of this makes no sense to me


right the student is still distilled from the hundred epoch teacher model yet


if you train the student for 250 epochs in self distillation and then build an


ensemble of these students from that same teacher model and you compare that


to an ensemble of teachers that have all been trained for longer for 250 epochs


which you know should out it the 250 epochs generally outperforms the


hundred epochs models still they are the same this is this is pretty crazy


results I I think and sort of my conclusion from this is that the


ensemble effect right here is not a function of learning of extracting more


information from the data the ensemble effect might actually be have something


to do with the function landscape itself and kind of exploring different minima


of the of the same function not of the same function but exploring different


functions to describe the same phenomena and I've also found a paper that


explains the lost landscape of deep ensembles and I will make a video on


that maybe it's out already maybe it will be out after you see this one I I


haven't decided yet which which order I'm going to release things but this


here I it's it's pretty interesting and we need like a name so self self


ensembles are already a thing but they are always with noise and stuff like


this so let's call them something like plain self ensembles like that that


that sounds like a good name plain self ensembles the act of self distillation a


single model into multiple models without any noise any augmentations


anything just you run as if you were to train the model itself and then you


build an ensemble of these models by simply averaging the logits plain self


ensembles alright so the plan from here is to check on like at least one other


data set you know these these models I appreciate that I could get them


pre-trained but they're just the image net models and then kind of let run on


c410 so there's no kind of guarantee that these have been you know tuned or


anything that the learning rates or whatnot so I want to take like an image


net model still make sure that I don't use any like hidden information where I


could cheat on the validation set but try this on at least one thing and see


if that works as well if we can sort of push image net performance simply by


doing this trick so that's the plan for now and I have some other ideas but


I just wanted to let you know and this is sort of how research works I guess


you have a dumb idea and it turns out to work and then you go on and still


probably probably there is not maybe too much interesting things here maybe it


doesn't work on image net because these models are just under trained and this


somehow made them better somehow or regularize them somehow that usually


doesn't work there's so much that can go wrong still so but yeah that was it and


I invite you to like check out other papers in this space if you want it's a


pretty interesting space and with that I don't have much more to say yeah I hope


you enjoyed this let me know what you think of like research implementation or


research process videos like this I'm not sure what people expect like I can't


make this into five-minute video of like whoo I discovered something because then


you know there's no clue of what's what's happening but maybe like an hour


or so is also too long I'm not sure yeah let me know what you think and I'll see


[ML Olds] Meta Research Supercluster | OpenAI GPT-Instruct | Google LaMDA | Drones fight Pigeons

Meta builds a humongous computer, OpenAI teaches their language models to follow instructions,


and we battle pigeons with drones.


Welcome to ML News.


Now I have to say these aren't exactly news.


This is stuff that we've somehow missed or skipped or anything like this from the last


two to three weeks, let's say.


So consider this more ML old.


But if you're interested, stick around.


If you actually do enjoy new ML news, be sure to be subscribed to the channel, leave a like


and always always tell me what you think in the comments.


Very happy to take your feedback.


First story, Meta AI has released a blog post introducing the AI research supercluster Meta's


cutting edge AI supercomputer for AI research.


Now this, this is a big computer.


Like look at that, the RSC, the research supercluster that is ginormous.


I mean, look at this.


Does anyone get the vibes of psych?


So this is where your box would go.


In any case, this is a huge thing.


It consists of 760 DGX A100 boxes.


That is a total of 6080 GPUs.


And all of them are A100s.


But did you wonder why you can't get your hands on any GPU anywhere on the planet for


the last one and a half years or so?


Yeah, they're all right here.


Now obviously, obviously, all of this is connected with super duper Infini band, it has 175 petabytes


of storage, it has 175 petabytes of flash array storage as 46 petabytes of cache storage.


And it has 10 petabytes of flash blade storage.


I have no clue what these things mean, but it's a lot.


So the blog post goes a little bit into the history of how it was built a bit more what


it contains, how they make it secure, how they handle the difficulties of the last two


years and so on.


This cluster is supposed to support meta AI's production and research workloads and is already


operational, but is planned to finish to its full scale up to the mid 2022.


Look here's the box.


Here's the box.


Where does the box go?


Where does your box go?


The box goes there.


Really nice.


This is where your box would go.


Check out blog posts if you want to learn more.


OpenAI has released a blog post in paper titled aligning language models to follow instructions,


where they've fine tuned GPT-3 to follow human instructions.


They give an example right here, where if you ask GPT-3 something like explain the moon


landing to a six year old in a few sentences, it would sort of continue the pattern as GPT-3


does, it would say, explain the theory of gravity, explain the theory of relativity.


So it would it would sort of treat this as a regular language modeling prompt.


If you actually want to make GPT-3 answer the question, you have to give it a few examples


of question answer, question answer beforehand.


OpenAI went and fine tuned their language models to obey instructions more clearly.


So the model that results is instruct GPT, which in this case would output people went


to the moon, they took pictures of what they saw and sent them back to Earth so we could


all see them supposedly.


Like Yeah, like that ever happened.


So the main challenge here is the data collection part.


Fine tuning a big language model that requires a bit of data.


And they largely followed earlier work called learning from human preferences.


So this is a multi step process.


First they collect a small labeled data set.


After that they let humans sort of rank answers of the model and they train a reward model


from that.


And in the end, they use reinforcement learning against that learned reward model.


Now in their own words, this is nothing new, they say.


However, the smaller instruct GPT model are preferred by humans to the larger GPT-3 models,


which is interesting.


There's a paper to go along with it, give it a read if you're interested.


Data AI writes that they are releasing a series of multilingual autoregressive language models


up to 7.5 billion parameters, which significantly outperform English centric language models


in few shot learning on 20 plus languages.


Again there is a paper to go along with it.


And the code and models are available on the repository.


These are multilingual models and most of the models are trained on 30 different languages.


As you can see, they do scale up in partially layers, also model dimensions.


And there's even one model that's trained on over 134 languages.


So if you're interested in multilingual models, give this model a try.


Google releases a paper called Lambda language models for dialogue applications along with


a blog post where they detail a new foray into dialogue models using large language


models.


What's interesting here is that they're not only interested in generating the most likely


data, they do pre train on pure language modeling.


But then when it comes to fine tuning on dialogue data, they have various metrics.


And for each of these metrics, they have classifiers that classifies the outputs of the language


model, which is trying to optimize.


So some of these outputs are safety, sensibility, specificity, interestingness, and so on.


The model is also capable of doing factual grounding as it is augmented by a retrieval


stage during the generation process.


So technically, it can look up something on Wikipedia before it answers you, which is


pretty cool.


If you're interested in dialogue models, definitely give this blog post and paper a read.


Alright, some helpful stuff for this week.


Evolution gym is a large scale benchmark for evolving soft robots.


So contrary to classic reinforcement learning, where your agent is kind of fixed and static


and has a bunch of actions available in soft robots, you can also choose how to compose


your robot.


So here's a bunch of examples of soft robots.


Now as you can see, the policy isn't the hard part, it's actually the hard part, how you


even construct your robots from the individual building blocks.


So here you can see a walker, there is object manipulation, climbing, I believe they do


have some some other examples right here.


There's climbing.


That looks pretty cool.


So even though it's still a reinforcement learning, this is a cool domain.


I like it.


There's a paper to go along with the release if you're interested in soft robotics and


reinforcement learning, give it a read.


Stable baselines three is in the hugging face hub stable baselines three is a reinforcement


learning library that provides kind of baseline implementations of our algorithms such as


proximal policy optimization, Q learning and more.


So now these are on the hugging face hub and you can just kind of download the strategies,


maybe not entirely sure but if you're into reinforcement learning, give this a try.


I've seen that centdex has already made a video using stable baselines three but as


far as I could see he has not used the hugging face hub.


So sorry Harrison, you actually did like a lot of work for nothing.


You like pip installed the actual package.


Why in related news on a highlight this repository right here by Leandro von Vera who released


this repository to perform reinforcement learning with transformers.


It's a library slash example code repository of training transformers using proximal policy


optimization.


If you don't know proximal policy optimization is a reinforcement learning algorithm that


tries to maximize the reward but at the same time stay close to some known state like a


baseline implementation, a baseline model or a previous version of the model that you're


training.


This prevents fatal steps like single steps that bring you into really bad local minima.


I was going to say if you're into the combination of language and reinforcement learning, check


this out but I mean transformers have gone way beyond language by this point.


So if you're into RL and transformers, this might be the repo for you.


Okay, this was it for our helpful stuff this week.


I hope you were helped.


Our next news is Google AI releasing a blog post called accurate alpha matting for portrait


mode selfies on pixel six.


Yes, it is a bit of an ad for their pixel phones.


But also it details quite extensively how they went about training a system that would


generate the alpha mat for the types of portrait pictures.


So the goal here is to get a mask on top of a picture that separates foreground meaning


if it's a portrait the person from background so that you can swap out the background.


This is challenging because as you can see right here, hair is often a problem.


There are very fine details, the lighting can come from any place and that might not


match up with the background and so on.


So they detail what kind of model architecture they did.


It consists of progressive upsampling which we've seen a couple of times so far.


And the most interesting part is the data generation process.


They have this giant studio with like surround array of cameras and lights so they can activate


different lights at different times and get kind of a 3d impression of the subject that


is at the center.


They're also able to capture different lighting effects on the subject which is also really


helpful because the second thing they do is they place that subject into various kind


of fake backgrounds.


And these fake backgrounds are not just any picture.


They are sort of 360 pictures of scenes.


So what they can do is they can dynamically relight the subject so that it actually fits


into the background.


And from that they generate the training data to the alpha matte classifier.


Now give this a read if you want to learn more.


I was just impressed how deep one can go in like a single task like how much there is


if you really want to solve something to the level of where you can build it into a product


and it performs well.


So that's pretty cool.


I saw this article on IEEE explorer called autonomous detection and deterrence of pigeons


on buildings by drones.


And this is the most metal thing ever.


I mean poor drones.


So there's this camera on roofs and it locates pigeons and when it sees a flock of them pigeons


would destroy their things with their what they call it excrement spot.


It's poop.


So they poop and it destroys the buildings so they want to shoo them away to prevent


damage and difficult and dangerous cleaning procedures.


So the camera spots the pigeons and it sends in the drone.


And here you can see like a first person view of the drone is like it waits and is like


activate it just goes after the pigeons.


I'm so sorry pigeons machines one nature zero your move pigeons.


Alright, our last news Bloomberg writes IBM sells some Watson health assets for more than


$1 billion.


So apparently the whole Watson project hasn't really panned out for IBM the way they wanted


it to after the initial successes of winning jeopardy.


It just kind of got nowhere it seemed like I've heard from a lot of people that it was


just not doing the things they promised it to do when they actually deployed it in let's


say health settings or or the finance world.


I don't know exactly what they tried.


But the uniform feedback I've heard is that it just underwhelmed in practice.


Now there are some customers using it and IBM says it's still committed to the project.


Note that it is only selling some parts and only of Watson health that is not the entire


Watson project is just that health sub projects which might come with its own difficulties,


let's say regulatory and whatnot.


Also IBM says that it is going to focus more on being a cloud provider for AI applications.


Well I guess that's where the big money is right now.


I guess if you're a cloud provider now you can just you can just print money.


So good on IBM instead of losing money.


They're now printing it.


Excellent.


This was already it for ML news.


If you have any comments, anything to say, please leave it in the comments.


Merch still available and I'll see you next time.


Flask Tutorial Web Development with Python 1 - Intro

Hello everybody and welcome to a practical Python with Flask tutorial series.


In this video and in this series what we're going to be talking about is building this


website you see here basically from scratch to where it is now.


So pythonprogramming.net is my website.


That's where we host a bunch of Python programming tutorials.


Basically all the tutorials you see on my channel are also on this website, also in


written form.


So we're going to be using Flask which is a Python web framework and I actually already


have a basic series on Flask which is right here.


So you can go through those if you want to get the basics but this series is going to


be more practical and pragmatic approach and we're actually going to build a website.


So depending on your learning style one of these two series will probably be more interesting


to you.


So what we're going to be using is actually this website is fairly basic and fairly easy


to build so it shouldn't be too difficult actually if this is your first entrance into


even web development in general.


Although I would suggest you know at least the basics of HTML just so you can kind of


follow what's happening.


Most web developers that I know don't tend to write the majority of their own HTML and


CSS and even like JavaScript.


They copy and paste from examples and they edit and kind of manipulate to their liking.


So in staying with the reality of things that is actually what we'll be doing here.


The Flask will be all handwritten.


There shouldn't be at least that I can think of any copy and paste there but a lot of Bootstrap


and stuff like that I'll show you exactly the process I go through.


So Bootstrap has a website and you go there and you can kind of look at their examples


of things that you can do with Bootstrap and then you just basically copy and paste and


kind of edit and change.


So it's actually a lot easier than it might seem.


So with that let's go ahead and get started.


So we're just going to jump in and just go so there won't be really too much other explanation.


I'll try to explain things as I go as far as the first time around what's happening


but other than that it's going to be a pretty practical approach.


The first thing we need obviously is some sort of server.


You can host it locally if you want.


The only thing I'll say before we go this route is one I'm going to put it on a live


server so it will be accessible via the internet.


Do not have the same live server or production server as your development server.


So basically do not develop on your live website.


It's a bad idea for a couple of reasons or at least a couple major reasons.


First is it's bad for your users right they're going to have a lot of downtime and disruption


and bugs and all this kind of stuff but even more importantly it's a security risk.


If you're developing you're going to introduce bugs and even if they're for a short live


time or whatever someone can get in, build up a back door or whatever and or even just


get in and don't even need a back door if maybe one of your security measures is bugged


out because of some update you've made.


Something like that.


Just a bad idea.


Do not develop on a live server.


That's all I'm going to say on the matter.


We are going to be developing on a server that's accessible via the internet for a couple


of reasons.


We want to have a server that as I code I can at least tell you about things that happen


so when you take Python from the local little sandbox mode on your computer and you put


it on a web server all of a sudden the poop hits the fan and things just don't work the


same as you expect them to.


All of a sudden for example Python's garbage collection I don't know they just stop collecting


garbage so there's a lot of like little things that come when you push to production so I'd


like to kind of talk about them in line as we code.


So with that let's get started because I'm doing a tutorial series and because I want


it to be a live server I'm going to be using DigitalOcean and the main reason why I will


use them is because they have a $5 a month option.


My preferred host is actually linode.com but their cheapest option is $10 a month so I'm


going to DigitalOcean.


I have links to both in the description they are referral links and it gets me discounts


on my hosting so if you use them thank you.


Anyway so I'll be using DigitalOcean as far as the rest of the tutorial goes you actually


it does not matter which host you use and you can even host locally if you want it's


totally fine but we will be using MySQL so if you're hosting locally especially on Windows


you are going to have a headache but anyway.


So I'm going to choose this $5 a month thing I would type in I've already created the server


but the name ours is going to be Flask Tuts so you'll choose this size Flask Tuts you


can always resize later don't worry about it.


You can pick your region this is kind of it doesn't really matter much nowadays but if


you're expecting your website to be mostly used let's say in London you would pick a


London based server mostly in the United States pick one of the United States you've got West


Coast East Coast all around the world you know you might want to pick one of these other


websites or server locations.


Settings here I would this one's the only major one you will pay extra for enabling


backups but you will not regret it.


Everybody thinks they won't need backups or everybody thinks that they're going to make


their own backups some people do congratulations if that's you I used to think I would I did


it every now and then but not enough I've never regretted paying for backups.


Distributions we're going to be doing this series you can you can use 14.04 Ubuntu if


you want but we're going to do it with 14.10 so it's the newest version if there's a newer


version as you're watching feel free to use it should be totally fine and then scrolling


down you can add SSH keys if you're familiar with doing that we're not going to cover that


here and when you're all done you'll click create a droplet.


Once you create the droplet it usually takes about a minute but once you've done it you


should it'll be done and you'll come after basically on DigitalOcean even to get here


I didn't really say much but you create an account obviously login and click create a


droplet and then once you've done that you'd click on droplets and you'd come here I just


don't really want to show all my other droplets and their IPs so I just want to show this


one so once you come in here you've got Flasktoots and this is our droplet it's powered on but


you don't know the password if you use DigitalOcean if you use lino you actually you'll go into


like settings and you'll set the password yourself and that's it if you use DigitalOcean


it will send you an email I've got it up on my phone and you'll need to the first time


you log in you'll change the password so being that this is a pragmatic practical series


I'm just going to show literally everything I do so now I need to go change my password


there's a couple of methods for logging in for now I'm just going to use the console


I promise we will not be using this console in the rest of the series I'm just going to


use it because it's here and we're going to use it so anyway I'll click on console access


it'll connect if it is just a black screen hit like the enter key or something and you'll


see here it says something and it's connected but I don't see a login I hit enter there's


my login the initial username is root and so I'm going to use root for the login and


the password they sent to you it's probably a jumbled up list of letters I'm going to


enter mine okay so I logged in and now it says basically since this is the first time


we've logged in I have to change my password again so here I go to change it well first


you have to enter the current one so enter that same password they sent you again okay


now you enter a new password this will be the password you better remember okay and


just for the record obviously again if this is a live server for your password you want


to obviously pick something that's a decent password that someone isn't going to be able


to guess or it can't be a dictionary word although I'm pretty sure Linux will actually


decline you if you attempt to enter a dictionary word it'll be like no that's not good enough


pick something better so anyway so we're in and now I want to talk about we're not going


to use this console I think it's just kind of silly to use it but so we're going to leave


and that's basically it the only other thing just remember what your password is or I mean


not your password your IP address and your password remember that that's a good idea


and because you're going to use this IP address now how are we going to actually connect to


our website there's tons of options out there my choices may not be your choices and that's


totally fine it really doesn't matter in the end you just need to get files to and from


and be able to issue commands I tend to like SCP and I use win SCP I'm gonna bring it down


here in just a second let me get this let's see this over here good enough okay so this


is win SCP and I've connected as my root user so it's stuff to me in this route but this


is we can go back whoops we can go back here and this is this is all like the fuck the


directories and files of our server right now there's not too much here for us I can't


really show you too much because this is just a clean server but basically all the files


that are required so this is win SCP and win for Windows SCP for secure copy and paste


so it's a lot like an FTP client like filezilla if you're familiar you can also use filezilla


for exactly the same reasons why I'm using SCP I like SCP it's a little faster generally


but this will actually fall back on SFTP which is secure file transfer protocol which is


what filezilla is although filezilla is FTP or SFTP it doesn't it does you kind of choose


and so anyway this is what how I will transfer files to and from I'll talk a little bit more


about that once we actually have some files and I'll talk about the editors and stuff


like that and how to change them so that's win SCP if you're not on Windows use another


SCP client or use you know you can use filezilla if you're on Windows I know macOS supports


filezilla not really sure what program I would use if I was on Linux but I guarantee you


there's some some program or you can also SCP via the command line so lots of options


there I don't I'm not going to go through everyone's options but at least I'll show


you on Windows how it was done finally the other one that is pretty much a must need


if must need it must have is some sort of SSH which is secure shell and SSH is so we


can connect to our server and it's the same thing that we see here with this console right


it's the command line of your server and so this is where you issue all kinds of basically


commands to your server and we're going to use it a lot of times at least for setting


up installing packages getting them starting and restarting stopping services and stuff


from running this is where you'll do it so you'll want to have some sort of shell I use


putty and that works on Windows pretty sure that works on macOS although I think you can


actually SSH you can SSH both on Mac and on Linux without a program basically you need


it for Windows so anyway again this is how I do it on Windows if you have a different


operating system you just basically you need to figure out how to do SCP or some sort of


file transferring thing because it makes development a lot easier and then also some form of SSH


now anyway I'm going to log in make sure that worked good once you're logged in you need


to do a couple of things first thing I'm going to go ahead and do is change some settings


here we're going to come down to appearance change my font size for you fellas it's a


little easier to see and then also colors default foreground you don't really have to


do this I'm just doing it to make it easier for you guys to see apply good full screen


is bad boy and now basically the first thing you should always do when you first get a


server is the following sudo apt-get update and this basically updates apt-get because


you'll find that sometimes you'll try to install things and it'll be like oh that doesn't exist


it exists just apt-get is not updated and then sudo apt-get upgrade and then it asks


you hey do you want to do this we'll just hit yes if you're not familiar with the terminal


basically I do have some tutorials on the terminal as well just like a basics on flask


I got basics on the terminal although just like you'll be able to learn flask through


this series you'll probably learn quite a bit about the terminal just following along


I'll try to explain as I go and just like with all of my videos and basically anything


with flask and all that if we do anything in these videos that you don't understand


or you're not really sure what it did or whatever or you're having a problem leave a comment


below and I will help you out we'll figure out what's going on so don't really worry


about that don't feel stupid or anything like that it's kind of confusing and daunting the


first few times that you deal with these command lines anyway upgrade is taking a while so


I'm gonna go ahead and cut off the video here that's kind of where I wanted to stop anyways


so it doesn't matter this shouldn't take you know about a few minutes usually but anyway


unless it's been a long time so that's it if you have any questions or comments please


feel free to leave them below otherwise as always thanks for watching thanks for all


Machine Learning Holiday Live Stream

you


Machine Learning Holiday Live Stream

it


Machine Learning Holiday Live Stream

How's that?


Machine Learning Holiday Live Stream

Anyone hear me now?


Machine Learning Holiday Live Stream

Yeah, it wasn't an error.


Machine Learning Holiday Live Stream

It was just me being stupid.


Machine Learning Holiday Live Stream

Because I made a new scene in OBS and I just didn't add an audio source.


Machine Learning Holiday Live Stream

So that's that.


Machine Learning Holiday Live Stream

There's not much more to it, honestly.


Machine Learning Holiday Live Stream

Cool.


Machine Learning Holiday Live Stream

So I have actually no idea what we're going to do today.


Machine Learning Holiday Live Stream

I just thought maybe people are sitting somewhere at home and yeah.


Machine Learning Holiday Live Stream

So cool.


Machine Learning Holiday Live Stream

Yeah, I might not get all of chat.


Machine Learning Holiday Live Stream

So I'm sorry for that.


Machine Learning Holiday Live Stream

As we're coding at the same time, this might not be super possible.


Machine Learning Holiday Live Stream

But okay, my sort of goal today was to get a little bit of a hugging face, tuning something


Machine Learning Holiday Live Stream

going.


Machine Learning Holiday Live Stream

So the idea is to do question answering training, maybe make that into a little video later.


Machine Learning Holiday Live Stream

But I have no clue how this is going to go.


Machine Learning Holiday Live Stream

Also got my trusty Weights and Biases cup here with warm tea.


Machine Learning Holiday Live Stream

The stream is not sponsored.


Machine Learning Holiday Live Stream

It is an awesome beaker.


Machine Learning Holiday Live Stream

I genuinely don't like tea in these tiny cups that only hold like two or three deciliters.


Machine Learning Holiday Live Stream

It just sucks.


Machine Learning Holiday Live Stream

Okay.


Machine Learning Holiday Live Stream

What was the first machine learning algorithm I implemented?


Machine Learning Holiday Live Stream

I have no idea, honestly.


Machine Learning Holiday Live Stream

Probably we had to implement like support vector machines by hand at some point.


Machine Learning Holiday Live Stream

Yeah, that was it.


Machine Learning Holiday Live Stream

Okay so wait, if I click on this, the other thing is going away.


Machine Learning Holiday Live Stream

Okay, maybe I can pop out chat here.


Machine Learning Holiday Live Stream

I'm trying to follow the chat as closely as I can.


Machine Learning Holiday Live Stream

Forgive me for getting...


Machine Learning Holiday Live Stream

Not tea, you need coffee.


Machine Learning Holiday Live Stream

Oh yes, there's one other thing we need to do.


Machine Learning Holiday Live Stream

There's one other thing and that is, one second, that is obviously we need to do a chroma key


Machine Learning Holiday Live Stream

on the video right here.


Machine Learning Holiday Live Stream

So yeah.


Machine Learning Holiday Live Stream

Is this even...


Machine Learning Holiday Live Stream

Not too bad.


Machine Learning Holiday Live Stream

I can't see it in the previewer.


Machine Learning Holiday Live Stream

I don't know if you see it or not, but OBS is screwing up, so I can't really see it.


Machine Learning Holiday Live Stream

But this seems fine, right?


Machine Learning Holiday Live Stream

You can see sort of through me.


Machine Learning Holiday Live Stream

All right, so prediction, someday at the Alex Friedman podcast.


Machine Learning Holiday Live Stream

What's the story behind the sunglasses?


Machine Learning Holiday Live Stream

I just put them on randomly and then sort of that became my brand.


Machine Learning Holiday Live Stream

No, I guess I'm not sure.


Machine Learning Holiday Live Stream

I'm not sure that that was a wise choice, but it is what it is.


Machine Learning Holiday Live Stream

So okay, the goal, let's say the goal, the current goal is train question answering.


Machine Learning Holiday Live Stream

Let's do that.


Machine Learning Holiday Live Stream

And I have not prepared this, so the previous was nicer.


Machine Learning Holiday Live Stream

You mean this screen, but now you can see the screen behind me.


Machine Learning Holiday Live Stream

So if something is here, you'll be able to see it.


Machine Learning Holiday Live Stream

Yeah, but the settings might not be super good.


Machine Learning Holiday Live Stream

One second.


Machine Learning Holiday Live Stream

Well these are polarized, so I don't see exactly too much.


Machine Learning Holiday Live Stream

Which route do you suggest?


Machine Learning Holiday Live Stream

Passionate product management or ordinary ML engineer?


Machine Learning Holiday Live Stream

Chat product manager and beta ML engineer.


Machine Learning Holiday Live Stream

Well, do whatever you have fun doing.


Machine Learning Holiday Live Stream

I feel people make too much fuzz about career choices and I don't know.


Machine Learning Holiday Live Stream

It seems like you should just do whatever you want to do.


Machine Learning Holiday Live Stream

And as long as you have fun doing that, there's really nothing that can go wrong.


Machine Learning Holiday Live Stream

So just do that.


Machine Learning Holiday Live Stream

That seems like the most logical thing.


Machine Learning Holiday Live Stream

Okay, so what we're going to do is a little bit, let's say we're in a hogging phase and


Machine Learning Holiday Live Stream

I have not trained a hogging phase model in a while and this API keeps changing and progressing.


Machine Learning Holiday Live Stream

So my first question is, I know there's this pipeline thing.


Machine Learning Holiday Live Stream

What about training an answer question instead?


Machine Learning Holiday Live Stream

That's actually what we're going to do.


Machine Learning Holiday Live Stream

So one of the techniques for getting better question answering is to produce questions


Machine Learning Holiday Live Stream

from the answer, which I hope is what we might be able to do this now.


Machine Learning Holiday Live Stream

So best way to get started with machine learning, I don't know, do some tutorials.


Machine Learning Holiday Live Stream

I think just whatever you like.


Machine Learning Holiday Live Stream

There's enough information out there, especially for beginners.


Machine Learning Holiday Live Stream

Oh no, wait.


Machine Learning Holiday Live Stream

Proper product placement.


Machine Learning Holiday Live Stream

I need to hold it like this into the camera.


Machine Learning Holiday Live Stream

So refreshing.


Machine Learning Holiday Live Stream

So I know there's this pipeline thing, right?


Machine Learning Holiday Live Stream

The question is, can I fine tune a pipeline?


Machine Learning Holiday Live Stream

Can I fine tune a pipeline?


Machine Learning Holiday Live Stream

Or essentially, can I train a pipeline?


Machine Learning Holiday Live Stream

What or is this only for inference?


Machine Learning Holiday Live Stream

So I don't know.


Machine Learning Holiday Live Stream

Here under fine tuning a pre trained model.


Machine Learning Holiday Live Stream

Can you train hogging phase model with CPU?


Machine Learning Holiday Live Stream

Sure.


Machine Learning Holiday Live Stream

But do you have Omicron?


Machine Learning Holiday Live Stream

I have no idea.


Machine Learning Holiday Live Stream

You can fine tune the model, right?


Machine Learning Holiday Live Stream

With this trainer, however, the model would be sort of, you know, like a model like this.


Machine Learning Holiday Live Stream

So where do they get the model from?


Machine Learning Holiday Live Stream

The model is like a auto model for sequence classification.


Machine Learning Holiday Live Stream

It is not a pipeline.


Machine Learning Holiday Live Stream

And the good thing about the pipeline, obviously, is that it makes, you know, things like loading


Machine Learning Holiday Live Stream

data sets and and stuff like this pretty, pretty easy.


Machine Learning Holiday Live Stream

My question is, where does the tokenizer come in right here?


Machine Learning Holiday Live Stream

So you see pre process your data, input function, tokenized data sets.


Machine Learning Holiday Live Stream

So you need to set up, you need to set up the tokenizer at the data sets, and then input


Machine Learning Holiday Live Stream

the model as this model right here.


Machine Learning Holiday Live Stream

But it seems like fine tuning a pipeline might not be a thing.


Machine Learning Holiday Live Stream

What hardware do you plan on using?


Machine Learning Holiday Live Stream

I'll just do a Colab for now.


Machine Learning Holiday Live Stream

I guess that's my that's gonna be my thing or even fully, fully locally.


Machine Learning Holiday Live Stream

Yeah.


Machine Learning Holiday Live Stream

All right.


Machine Learning Holiday Live Stream

Test trainer evaluation strategy.


Machine Learning Holiday Live Stream

Fine tuning in native PyTorch.


Machine Learning Holiday Live Stream

I don't want to do that.


Machine Learning Holiday Live Stream

I just want to do it with the trainer with the trainer API.


Machine Learning Holiday Live Stream

That seems fine.


Machine Learning Holiday Live Stream

Let me quickly pull out a Colab or open a Colab.


Machine Learning Holiday Live Stream

And I'm sorry, sometimes I'm going to pull stuff to the side right here because I have


Machine Learning Holiday Live Stream

no clue what's going to pop up.


Machine Learning Holiday Live Stream

All right, we have one with the absolute awesome name of Untitled2.


Machine Learning Holiday Live Stream

And we're going to change that to hogging face question answering.


Machine Learning Holiday Live Stream

So how much GPU size do you have?


Machine Learning Holiday Live Stream

Only none.


Machine Learning Holiday Live Stream

What do you mean by fine tuning a pipeline?


Machine Learning Holiday Live Stream

You can fine tune a model only.


Machine Learning Holiday Live Stream

Yeah, exactly.


Machine Learning Holiday Live Stream

You can fine tune a model, but there's this pipeline abstraction that sort of so if I


Machine Learning Holiday Live Stream

maybe I can I can show you so let's place this in here again, right there is this pipeline.


Machine Learning Holiday Live Stream

And it takes care of a lot of stuff.


Machine Learning Holiday Live Stream

So if you did question answering, right, you can just load a model and the tokenizer.


Machine Learning Holiday Live Stream

And what it would do, what it would do is essentially it would it would handle all of


Machine Learning Holiday Live Stream

the sort of plumbing around question answering.


Machine Learning Holiday Live Stream

But we don't we're just going to do it by ourselves.


Machine Learning Holiday Live Stream

I think that's pipeline batching.


Machine Learning Holiday Live Stream

Yeah.


Machine Learning Holiday Live Stream

Pipeline custom code.


Machine Learning Holiday Live Stream

Implementing a new pipeline.


Machine Learning Holiday Live Stream

So then we have just to use models for inference.


Machine Learning Holiday Live Stream

OK, now the question has been answered.


Machine Learning Holiday Live Stream

All right.


Machine Learning Holiday Live Stream

Let's see whether we can answering fine tune example.


Machine Learning Holiday Live Stream

Because we're not gonna because we're not gonna do anything ourselves.


Machine Learning Holiday Live Stream

We're just gonna use stuff.


Machine Learning Holiday Live Stream

OK.


Machine Learning Holiday Live Stream

I mean, there must be there you go learn how to fine tune a model for question answering


Machine Learning Holiday Live Stream

squad.


Machine Learning Holiday Live Stream

So this is going to be our first thing.


Machine Learning Holiday Live Stream

We're going to fine tune model for question answering.


Machine Learning Holiday Live Stream

Then we're going to try to use when I try to use the model that we've we've trained


Machine Learning Holiday Live Stream

as a baseline and we're going to try to train another model that will generate questions


Machine Learning Holiday Live Stream

given some answers.


Machine Learning Holiday Live Stream

And then we're going to augment our data set using those pairs.


Machine Learning Holiday Live Stream

And then hopefully that will lead to a better data set.


Machine Learning Holiday Live Stream

I've seen papers that do this and in question answering, especially in natural questions.


Machine Learning Holiday Live Stream

And this has been really has been sort of improved, but or has been improving state


Machine Learning Holiday Live Stream

of the art.


Machine Learning Holiday Live Stream

But who knows?


Machine Learning Holiday Live Stream

I'm a student in need of compute for a project.


Machine Learning Holiday Live Stream

Any advice for compute and in general?


Machine Learning Holiday Live Stream

Not really.


Machine Learning Holiday Live Stream

I mean, there's there's Colab.


Machine Learning Holiday Live Stream

There's there's quite cheap cloud compute.


Machine Learning Holiday Live Stream

And if you are a student, your university might have your university might have some


Machine Learning Holiday Live Stream

resources or sometimes the big companies, they give sort of credits to university students.


Machine Learning Holiday Live Stream

So I don't know, it might it might take a bit of politics, but you can usually get stuff.


Machine Learning Holiday Live Stream

All right.


Machine Learning Holiday Live Stream

Let's see.


Machine Learning Holiday Live Stream

I've as I said, I haven't done this in a long time.


Machine Learning Holiday Live Stream

So yeah, so we go out.


Machine Learning Holiday Live Stream

We have a tokenizer.


Machine Learning Holiday Live Stream

We need the distilbert.


Machine Learning Holiday Live Stream

Okay.


Machine Learning Holiday Live Stream

But at the time, but at the time, but at the time.


Machine Learning Holiday Live Stream

And to now we don't want TensorFlow.


Machine Learning Holiday Live Stream

Okay, this seems okay enough.


Machine Learning Holiday Live Stream

Sequence classification, token classification question answering.


Machine Learning Holiday Live Stream

Pytorch notebook, but there is already one.


Machine Learning Holiday Live Stream

Why do we open?


Machine Learning Holiday Live Stream

Why do we open a new one?


Machine Learning Holiday Live Stream

To be able to share your model with the community.


Machine Learning Holiday Live Stream

Now we don't want that.


Machine Learning Holiday Live Stream

So let's start.


Machine Learning Holiday Live Stream

Yeah.


Machine Learning Holiday Live Stream

Okay, no need to log in.


Machine Learning Holiday Live Stream

But what we want to do is we also want to install one DB.


Machine Learning Holiday Live Stream

Because how do we do that exactly?


Machine Learning Holiday Live Stream

Let's check.


Machine Learning Holiday Live Stream

Yep.


Machine Learning Holiday Live Stream

Got it.


Machine Learning Holiday Live Stream

And code.


Machine Learning Holiday Live Stream

And this is just logging.


Machine Learning Holiday Live Stream

Okay.


Machine Learning Holiday Live Stream

I thought we had it.


Machine Learning Holiday Live Stream

All right.


Machine Learning Holiday Live Stream

Thank you.


Machine Learning Holiday Live Stream

What's wrong?


Machine Learning Holiday Live Stream

Ah, very smart, very smart.


Machine Learning Holiday Live Stream

Should have made it quiet.


Machine Learning Holiday Live Stream

Anyway, okay.


Machine Learning Holiday Live Stream

So we need to install git LFS.


Machine Learning Holiday Live Stream

So what do we go here?


Machine Learning Holiday Live Stream

We're going to for squad v1 or v2.


Machine Learning Holiday Live Stream

Going to use distal-berth batch size of 16.


Machine Learning Holiday Live Stream

And use the datasets library, which is pretty good.


Machine Learning Holiday Live Stream

Then, okay, we're going to show some random elements.


Machine Learning Holiday Live Stream

Just fine tune evaluation.


Machine Learning Holiday Live Stream

Seems easy enough.


Machine Learning Holiday Live Stream

We'll do that and we'll figure out in the meantime what we need to do in order to go


Machine Learning Holiday Live Stream

further.


Machine Learning Holiday Live Stream

Yep, yep, yep.


Machine Learning Holiday Live Stream

Uncomment the first slide.


Machine Learning Holiday Live Stream

Yes.


Machine Learning Holiday Live Stream

I was absolutely able.


Machine Learning Holiday Live Stream

Okay, appending.


Machine Learning Holiday Live Stream

Okay, good.


Machine Learning Holiday Live Stream

So we're logged in.


Machine Learning Holiday Live Stream

Nice.


Machine Learning Holiday Live Stream

Let me open.


Machine Learning Holiday Live Stream

Let me open the 1DB.


Machine Learning Holiday Live Stream

We'll figure it out once we log something, right?


Machine Learning Holiday Live Stream

I guess we can just run all now.


Machine Learning Holiday Live Stream

All right, this looks good so far.


Machine Learning Holiday Live Stream

We got probably the same random examples.


Machine Learning Holiday Live Stream

And so here you see how this dataset is built.


Machine Learning Holiday Live Stream

This is made from Wikipedia articles.


Machine Learning Holiday Live Stream

So the dataset creators, they always sort of grabbed a paragraph from Wikipedia.


Machine Learning Holiday Live Stream

I think it's always kind of the first one.


Machine Learning Holiday Live Stream

Not sure.


Machine Learning Holiday Live Stream

So I don't know, carrot.


Machine Learning Holiday Live Stream

I think it's always this one, but I'm not entirely sure.


Machine Learning Holiday Live Stream

It might be any one, but I think I'm also not sure of the exact differences between


Machine Learning Holiday Live Stream

squad V1 and V2.


Machine Learning Holiday Live Stream

However, that's kind of...


Machine Learning Holiday Live Stream

Do you have your own GPU workstation or university?


Machine Learning Holiday Live Stream

So our university had a cluster.


Machine Learning Holiday Live Stream

They built it up during my PhD, which is fairly big.


Machine Learning Holiday Live Stream

But our group also had sort of our own GPUs.


Machine Learning Holiday Live Stream

Yep.


Machine Learning Holiday Live Stream

Where were we?


Machine Learning Holiday Live Stream

So yeah, this is sort of a paragraph.


Machine Learning Holiday Live Stream

This is, I guess, the ID or the title of the article in Wikipedia.


Machine Learning Holiday Live Stream

And then there's a question like what was proclaimed the state religion under Theodosius


Machine Learning Holiday Live Stream

I?


Machine Learning Holiday Live Stream

And then there is an answer.


Machine Learning Holiday Live Stream

And the answer is somewhere in the text.


Machine Learning Holiday Live Stream

So it's extractive question answering.


Machine Learning Holiday Live Stream

And you can see here Christianity or sorry, Nessene Christianity is the correct answer.


Machine Learning Holiday Live Stream

Now the answer might actually be multiple times, mentioned multiple times in the paragraph.


Machine Learning Holiday Live Stream

And it is important that you not only get the answer correct, but you get the correct


Machine Learning Holiday Live Stream

index.


Machine Learning Holiday Live Stream

So you also need to decide which, if it's mentioned multiple times, which of the mentions


Machine Learning Holiday Live Stream

is the correct one.


Machine Learning Holiday Live Stream

And that would be sort of the one that directly answers the question.


Machine Learning Holiday Live Stream

So it's pretty strict.


Machine Learning Holiday Live Stream

So this is closed domain extractive question answering.


Machine Learning Holiday Live Stream

It has sort of a reputation of being a lot about kind of keyword finding and sort of


Machine Learning Holiday Live Stream

comparing the model doesn't need to understand that much about.


Machine Learning Holiday Live Stream

The question is out of frame.


Machine Learning Holiday Live Stream

What?


Machine Learning Holiday Live Stream

Oh, why does this keep happening?


Machine Learning Holiday Live Stream

Thank you.


Machine Learning Holiday Live Stream

No, wait.


Machine Learning Holiday Live Stream

Huh?


Machine Learning Holiday Live Stream

OK.


Machine Learning Holiday Live Stream

I'm out of frame, too.


Machine Learning Holiday Live Stream

Look at that.


Machine Learning Holiday Live Stream

All right.


Machine Learning Holiday Live Stream

How do I fix this?


Machine Learning Holiday Live Stream

I'm out of frame.


Machine Learning Holiday Live Stream

OK, so.


Machine Learning Holiday Live Stream

Hmm.


Machine Learning Holiday Live Stream

So.


Machine Learning Holiday Live Stream

Isn't YouTube 16 by nine because I'm streaming 16 by nine.


Machine Learning Holiday Live Stream

If you see like here and OBS.


Machine Learning Holiday Live Stream

Right.


Machine Learning Holiday Live Stream

You can see.


Machine Learning Holiday Live Stream

Oh, no.


Machine Learning Holiday Live Stream

It's the side of it's the side of the screen here.


Machine Learning Holiday Live Stream

okay we might be able to fix this


Machine Learning Holiday Live Stream

there's probably a crop somewhere going on


Machine Learning Holiday Live Stream

you see


Machine Learning Holiday Live Stream

there's nothing here OBS is screwing


Machine Learning Holiday Live Stream

this up. Crop right


Machine Learning Holiday Live Stream

there's no crop right none so


Machine Learning Holiday Live Stream

I don't know what's what's going on


Machine Learning Holiday Live Stream

alright we'll just have to live with it I think this is OBS not


Machine Learning Holiday Live Stream

not handling the screen


Machine Learning Holiday Live Stream

resolutions well in any case


Machine Learning Holiday Live Stream

oh yeah you can see me totally fine


Machine Learning Holiday Live Stream

I was confused about that alright sorry


Machine Learning Holiday Live Stream

so the answers if you're able to see them


Machine Learning Holiday Live Stream

I'll try to make it a little bit more inside


Machine Learning Holiday Live Stream

the answer right here is


Machine Learning Holiday Live Stream

a string and also an index into the text 169 and I'm gonna guess that


Machine Learning Holiday Live Stream

points to sort of this piece right here alright


Machine Learning Holiday Live Stream

so this is the data set and


Machine Learning Holiday Live Stream

pre-processing the training data consists of what


Machine Learning Holiday Live Stream

consists of instantiating the tokenizer


Machine Learning Holiday Live Stream

then you can see that we


Machine Learning Holiday Live Stream

tokenize on two sentences one for the answer one for the context


Machine Learning Holiday Live Stream

okay and depending on your model


Machine Learning Holiday Live Stream

we'll see different keys yeah okay so


Machine Learning Holiday Live Stream

what's this


Machine Learning Holiday Live Stream

what is your no this is beginning of sentence


Machine Learning Holiday Live Stream

right 102 what's 102


Machine Learning Holiday Live Stream

what is your name is maybe this run right here


Machine Learning Holiday Live Stream

then it's sort of the end of sentence and then it's another


Machine Learning Holiday Live Stream

my name is Sylvan and then it's another end of sentence


Machine Learning Holiday Live Stream

that's this tokenization the attention mask is there


Machine Learning Holiday Live Stream

okay so we can feed


Machine Learning Holiday Live Stream

things to this tokenizer with a max length


Machine Learning Holiday Live Stream

then what we do is we go


Machine Learning Holiday Live Stream

through the data set


Machine Learning Holiday Live Stream

let's find a long example


Machine Learning Holiday Live Stream

this is just exploring if we just truncate we'll lose information so


Machine Learning Holiday Live Stream

we need to go sort of in a stride


Machine Learning Holiday Live Stream

over the data set but the tokenizer is doing this for us


Machine Learning Holiday Live Stream

now we have a list of


Machine Learning Holiday Live Stream

input IDs okay so we split up the context if it's too long


Machine Learning Holiday Live Stream

into these different things into these different


Machine Learning Holiday Live Stream

chunks and we iterate


Machine Learning Holiday Live Stream

over the data set you can see that


Machine Learning Holiday Live Stream

the question is always the same but


Machine Learning Holiday Live Stream

for the context


Machine Learning Holiday Live Stream

for the context will truncate


Machine Learning Holiday Live Stream

the second or will stride over the second thing so here is


Machine Learning Holiday Live Stream

the men's basketball team has over yada yada yada yada yada


Machine Learning Holiday Live Stream

and if you're at the end here well that is a long context


Machine Learning Holiday Live Stream

you see that 32 wins were


Machine Learning Holiday Live Stream

that is the end and that is not the beginning here


Machine Learning Holiday Live Stream

the beginning is championship so if


Machine Learning Holiday Live Stream

I am going to guess if you go on here you're gonna see the 32 wins


Machine Learning Holiday Live Stream

somewhere in yeah you see here the 32 wins


Machine Learning Holiday Live Stream

were the most so this kind of striding


Machine Learning Holiday Live Stream

over this document


Machine Learning Holiday Live Stream

any new machine learning street talk episode coming


Machine Learning Holiday Live Stream

yes yes there's one coming


Machine Learning Holiday Live Stream

we're working on it


Machine Learning Holiday Live Stream

when do you release a Udemy course?


Machine Learning Holiday Live Stream

I don't have the stamina to create


Machine Learning Holiday Live Stream

a course


Machine Learning Holiday Live Stream

and I think other people are


Machine Learning Holiday Live Stream

are better at that but who knows


Machine Learning Holiday Live Stream

I don't know


Machine Learning Holiday Live Stream

not yet not yet


Machine Learning Holiday Live Stream

okay


Machine Learning Holiday Live Stream

this will give us we need to find which of those features the answer is


Machine Learning Holiday Live Stream

where exactly the models will you require to start and end position


Machine Learning Holiday Live Stream

to map parts of the original context to some tokens


Machine Learning Holiday Live Stream

thankfully the tokenizer can help us by returning an offset mapping


Machine Learning Holiday Live Stream

this gives for each index of our input IDs the corresponding start and


Machine Learning Holiday Live Stream

end character in the original text that gave our token that's pretty useful


Machine Learning Holiday Live Stream

is this how new is this because I remember having to do this myself


Machine Learning Holiday Live Stream

which was awful


Machine Learning Holiday Live Stream

or I just didn't know about this the very first token has 0,0 because it


Machine Learning Holiday Live Stream

doesn't correspond to


Machine Learning Holiday Live Stream

any part of the question answer the second token is the same as the


Machine Learning Holiday Live Stream

characters 0 to 3 of the question


Machine Learning Holiday Live Stream

the how here that is one token


Machine Learning Holiday Live Stream

and so that goes from 0 to 3 and then the next token goes from 4 to 8


Machine Learning Holiday Live Stream

4 would be many to 8 you can see that the white space is sort of


Machine Learning Holiday Live Stream

falling away so not every character is covered by an ID


Machine Learning Holiday Live Stream

this is pretty useful


Machine Learning Holiday Live Stream

yep


Machine Learning Holiday Live Stream

oh that's what they do right here so


Machine Learning Holiday Live Stream

first token ID, input IDs, okay we get


Machine Learning Holiday Live Stream

this, offsets, we get this


Machine Learning Holiday Live Stream

then we


Machine Learning Holiday Live Stream

get the token


Machine Learning Holiday Live Stream

and we also get it from the question you can see that it's almost the same but


Machine Learning Holiday Live Stream

it has been


Machine Learning Holiday Live Stream

lower case


Machine Learning Holiday Live Stream

yeah to anyone who's new will train question answering but will also just


Machine Learning Holiday Live Stream

I've not prepared also


Machine Learning Holiday Live Stream

chatting let's do that


Machine Learning Holiday Live Stream

up


Machine Learning Holiday Live Stream

mmm


Machine Learning Holiday Live Stream

okay


Machine Learning Holiday Live Stream

yeah I'll kick the bot


Machine Learning Holiday Live Stream

or hit it


Machine Learning Holiday Live Stream

cool alright so


Machine Learning Holiday Live Stream

so we can use this mapping to find a position of start and end tokens


Machine Learning Holiday Live Stream

have to distinguish which part of the offset correspond to the question which


Machine Learning Holiday Live Stream

correspond to the context


Machine Learning Holiday Live Stream

sequence IDs okay the sequence ID says 0


Machine Learning Holiday Live Stream

and 1 for the question and the context respectively


Machine Learning Holiday Live Stream

it returns none for the special tokens okay


Machine Learning Holiday Live Stream

so if we now have an answer


Machine Learning Holiday Live Stream

say we have an answer and the answer start which is the index


Machine Learning Holiday Live Stream

right into into the


Machine Learning Holiday Live Stream

which is the index into the text


Machine Learning Holiday Live Stream

the end character we can figure out by simply taking the length


Machine Learning Holiday Live Stream

of this answer and adding it to the start and what we're gonna do now


Machine Learning Holiday Live Stream

start token index of the current


Machine Learning Holiday Live Stream

span in the text


Machine Learning Holiday Live Stream

so we're simply going to loop over the entire thing


Machine Learning Holiday Live Stream

until we reach the second thing so


Machine Learning Holiday Live Stream

here is the question and here is the context so we're going to loop until


Machine Learning Holiday Live Stream

we hit one which is the first token


Machine Learning Holiday Live Stream

and then


Machine Learning Holiday Live Stream

we're going to also to find the end index of that


Machine Learning Holiday Live Stream

we're going to the end here and we're going from the end we're subtracting


Machine Learning Holiday Live Stream

negative one


Machine Learning Holiday Live Stream

until we reach okay that's


Machine Learning Holiday Live Stream

that's cool then we're going to


Machine Learning Holiday Live Stream

um detect if the answer is out of the span


Machine Learning Holiday Live Stream

in which case this feature is labeled with the CLS


Machine Learning Holiday Live Stream

index there's a lot of


Machine Learning Holiday Live Stream

like plumbing to do right if the offsets


Machine Learning Holiday Live Stream

of the start token in


Machine Learning Holiday Live Stream

of the token start index so now we're going to look at these


Machine Learning Holiday Live Stream

offsets so where in the original text


Machine Learning Holiday Live Stream

is a given token if that's outside


Machine Learning Holiday Live Stream

of the um starting


Machine Learning Holiday Live Stream

character which we have right here so if that is


Machine Learning Holiday Live Stream

smaller


Machine Learning Holiday Live Stream

okay


Machine Learning Holiday Live Stream

so if the answer is somewhere


Machine Learning Holiday Live Stream

after the start index so


Machine Learning Holiday Live Stream

the answer is somewhere after this one and somewhere before the last one


Machine Learning Holiday Live Stream

right over here then we have the answer in this context


Machine Learning Holiday Live Stream

otherwise we don't and this code here is to figure out


Machine Learning Holiday Live Stream

where exactly the answer is in that we can double check that it's indeed


Machine Learning Holiday Live Stream

the theoretical answer so


Machine Learning Holiday Live Stream

what we're going to do is we're going to look at the answer


Machine Learning Holiday Live Stream

that's given from the data set and then we're also going to tell the tokenizer


Machine Learning Holiday Live Stream

to decode


Machine Learning Holiday Live Stream

from the start position to the end position


Machine Learning Holiday Live Stream

in the input IDs and we got it


Machine Learning Holiday Live Stream

cool


Machine Learning Holiday Live Stream

okay so we also tell it to pad right


Machine Learning Holiday Live Stream

let's put everything together in one function we will apply to our training


Machine Learning Holiday Live Stream

set


Machine Learning Holiday Live Stream

in the case of impossible answer the answer another feature being another


Machine Learning Holiday Live Stream

context we set


Machine Learning Holiday Live Stream

the CLS index for both the start and the end position we could also simply


Machine Learning Holiday Live Stream

discard those examples from the training set


Machine Learning Holiday Live Stream

if the flag allow impossible answers is false okay


Machine Learning Holiday Live Stream

alright so this is prepare train features we're going to


Machine Learning Holiday Live Stream

we'll explain how to handle long texts


Machine Learning Holiday Live Stream

for train and inference yeah that's what they do


Machine Learning Holiday Live Stream

right here right they simply set this stride


Machine Learning Holiday Live Stream

right here and so they stride


Machine Learning Holiday Live Stream

over the context that's what they do in the tokenizer so the tokenizer is going


Machine Learning Holiday Live Stream

to


Machine Learning Holiday Live Stream

emit always the question and then a part


Machine Learning Holiday Live Stream

of the document and this part is strided over the document


Machine Learning Holiday Live Stream

and then for each one you're trying to figure out


Machine Learning Holiday Live Stream

where the answer is in the context


Machine Learning Holiday Live Stream

and if the answer is inside you try to figure out where if the answer is


Machine Learning Holiday Live Stream

outside


Machine Learning Holiday Live Stream

you you'd simply say this the answer is nowhere in here


Machine Learning Holiday Live Stream

which you dummy encode as saying the CLS token


Machine Learning Holiday Live Stream

is the correct answer so


Machine Learning Holiday Live Stream

I'm which gives you also an indication


Machine Learning Holiday Live Stream

of whether or not the question is unanswerable which is going to be


Machine Learning Holiday Live Stream

important


Machine Learning Holiday Live Stream

in later data sets for example natural questions


Machine Learning Holiday Live Stream

has questions that are sort of unanswerable


Machine Learning Holiday Live Stream

and having sort of a this this gives you like an immediate classifier


Machine Learning Holiday Live Stream

so that's how


Machine Learning Holiday Live Stream

I guess how you do it what's the best way to de-tokenize text I don't know


Machine Learning Holiday Live Stream

give it to the tokenizer


Machine Learning Holiday Live Stream

and say say decode


Machine Learning Holiday Live Stream

right here


Machine Learning Holiday Live Stream

okay so here we put everything together


Machine Learning Holiday Live Stream

I'm okay this


Machine Learning Holiday Live Stream

pad on right yeah


Machine Learning Holiday Live Stream

max length stride return overflowing tokens true


Machine Learning Holiday Live Stream

offset mapping is true are this is what you need to put to get these mappings


Machine Learning Holiday Live Stream

padding with pad to the max length


Machine Learning Holiday Live Stream

okay


Machine Learning Holiday Live Stream

and now for each now we look


Machine Learning Holiday Live Stream

offset mapping


Machine Learning Holiday Live Stream

here we get a dictionary


Machine Learning Holiday Live Stream

and we're going to get the offset mappings out of it


Machine Learning Holiday Live Stream

I'm going to feel


Machine Learning Holiday Live Stream

other in entries here calling start positions and end positions


Machine Learning Holiday Live Stream

okay I guess we can skip over that but at the end we're going to end up with


Machine Learning Holiday Live Stream

sort of a a dictionary that I guess we can look at it right here


Machine Learning Holiday Live Stream

no


Machine Learning Holiday Live Stream

okay this is a we can't we can't this is not a global variable


Machine Learning Holiday Live Stream

alright but in any case we have


Machine Learning Holiday Live Stream

up this one here features features


Machine Learning Holiday Live Stream

is a dictionary no batch encoding but they should be


Machine Learning Holiday Live Stream

the same ish as a dictionary does this work


Machine Learning Holiday Live Stream

yeah exactly so we have input IDs which is


Machine Learning Holiday Live Stream

or the samples I'm what T do you have


Machine Learning Holiday Live Stream

weights and biases T obviously


Machine Learning Holiday Live Stream

it's a some kind of berry


Machine Learning Holiday Live Stream

T you can activate vim on colab


Machine Learning Holiday Live Stream

mmm


Machine Learning Holiday Live Stream

let me figure that out


Machine Learning Holiday Live Stream

and I've knew I've known this but I somehow don't like


Machine Learning Holiday Live Stream

I don't like I'm not too much too much of a fan


Machine Learning Holiday Live Stream

of in bindings in other things


Machine Learning Holiday Live Stream

I'll try


Machine Learning Holiday Live Stream

where you tools


Machine Learning Holiday Live Stream

settings there we go yes


Machine Learning Holiday Live Stream

that done


Machine Learning Holiday Live Stream

arm


Machine Learning Holiday Live Stream

okay


Machine Learning Holiday Live Stream

good we have


Machine Learning Holiday Live Stream

we have been bindings


Machine Learning Holiday Live Stream

alright not too big of a fan because


Machine Learning Holiday Live Stream

I I don't have all my key bindings


Machine Learning Holiday Live Stream

like my been mercy thought the same


Machine Learning Holiday Live Stream

alright and finally finally will have a tokenized


Machine Learning Holiday Live Stream

data set by applying the map function to


Machine Learning Holiday Live Stream

data sets


Machine Learning Holiday Live Stream

alright


Machine Learning Holiday Live Stream

and then we instantiate the model from the checkpoint where's this


Machine Learning Holiday Live Stream

where does this come from see now search for it and I don't know


Machine Learning Holiday Live Stream

I don't know where it is right


Machine Learning Holiday Live Stream

so I need to search like this


Machine Learning Holiday Live Stream

and


Machine Learning Holiday Live Stream

where is it


Machine Learning Holiday Live Stream

it's on top here it's just not


Machine Learning Holiday Live Stream

not too pleasant of an experience in bindings


Machine Learning Holiday Live Stream

but continue


Machine Learning Holiday Live Stream

so will load up the model like this from the checkpoint right


Machine Learning Holiday Live Stream

then arm will have some training arguments right here


Machine Learning Holiday Live Stream

yada yada yada push to hub no


Machine Learning Holiday Live Stream

arm yeah exactly


Machine Learning Holiday Live Stream

so


Machine Learning Holiday Live Stream

okay we've instantiated our trainer and now we can just say train


Machine Learning Holiday Live Stream

if this is


Machine Learning Holiday Live Stream

working out all we should be able


Machine Learning Holiday Live Stream

to see this in our 1DB


Machine Learning Holiday Live Stream

um


Machine Learning Holiday Live Stream

dashboard


Machine Learning Holiday Live Stream

there we go


Machine Learning Holiday Live Stream

wait


Machine Learning Holiday Live Stream

break out the tab here


Machine Learning Holiday Live Stream

do we have an accelerator even


Machine Learning Holiday Live Stream

um runtime


Machine Learning Holiday Live Stream

type


Machine Learning Holiday Live Stream

we do not


Machine Learning Holiday Live Stream

alright let's try again


Machine Learning Holiday Live Stream

runtime


Machine Learning Holiday Live Stream

restart and run all


Machine Learning Holiday Live Stream

so in the meantime we can think of what do we do in order to actually


Machine Learning Holiday Live Stream

uh do what we came here to do namely


Machine Learning Holiday Live Stream

um wait


Machine Learning Holiday Live Stream

is this on a custom data set no it's on squad squad is a question answering


Machine Learning Holiday Live Stream

data set


Machine Learning Holiday Live Stream

so what we want to do is we want to actually take


Machine Learning Holiday Live Stream

the squad data set and generate more questions from it


Machine Learning Holiday Live Stream

so what we need to do is need to train a model to take in


Machine Learning Holiday Live Stream

a um a context


Machine Learning Holiday Live Stream

and an an answer and


Machine Learning Holiday Live Stream

give us the question right this


Machine Learning Holiday Live Stream

is is different so


Machine Learning Holiday Live Stream

it's a bit like um we actually need to do


Machine Learning Holiday Live Stream

generation of text


Machine Learning Holiday Live Stream

and not just question answering and we can take that data set and feed it back


Machine Learning Holiday Live Stream

into the question answering


Machine Learning Holiday Live Stream

so how do we do that um


Machine Learning Holiday Live Stream

we need some sort of a text generation


Machine Learning Holiday Live Stream

model so we go onto the


Machine Learning Holiday Live Stream

hub let's say here we have examples


Machine Learning Holiday Live Stream

fine-tuning with custom data sets


Machine Learning Holiday Live Stream

um sequence what's this


Machine Learning Holiday Live Stream

sequence classification token classification question answering


Machine Learning Holiday Live Stream

it's all along the along the same lines but what we need to do is a text


Machine Learning Holiday Live Stream

generation right so um


Machine Learning Holiday Live Stream

train and what do we want


Machine Learning Holiday Live Stream

maybe a t5 or so or or maybe a gpt2


Machine Learning Holiday Live Stream

some some model like this we could we could generate so maybe


Machine Learning Holiday Live Stream

we'll start real small with like a distil gpt or something


Machine Learning Holiday Live Stream

and we'll fine tune it


Machine Learning Holiday Live Stream

okay so let's take that can we fine tune the distil


Machine Learning Holiday Live Stream

gpt probably


Machine Learning Holiday Live Stream

or do we have to fine tune gpt and then


Machine Learning Holiday Live Stream

um


Machine Learning Holiday Live Stream

that's we already have this


Machine Learning Holiday Live Stream

how to fine tune a model on


Machine Learning Holiday Live Stream

yeah okay translation


Machine Learning Holiday Live Stream

summarization


Machine Learning Holiday Live Stream

speech recognition audio classification


Machine Learning Holiday Live Stream

language modeling


Machine Learning Holiday Live Stream

which one I guess the translation


Machine Learning Holiday Live Stream

might be most appropriate to us no since


Machine Learning Holiday Live Stream

since um what we want to do is we have like an input like it's a sequence to


Machine Learning Holiday Live Stream

sequence task


Machine Learning Holiday Live Stream

and can we already see anything


Machine Learning Holiday Live Stream

no


Machine Learning Holiday Live Stream

we're training we don't see anything yet


Machine Learning Holiday Live Stream

let's see


Machine Learning Holiday Live Stream

there we go


Machine Learning Holiday Live Stream

where are my charts


Machine Learning Holiday Live Stream

we only have that yet we didn't actually log anything yet


Machine Learning Holiday Live Stream

okay but okay we have a GPU now


Machine Learning Holiday Live Stream

that's good


Machine Learning Holiday Live Stream

yeah see there's no no epoch yet


Machine Learning Holiday Live Stream

I mean this is gonna take a while


Machine Learning Holiday Live Stream

I have a feeling it's gonna take a while right


Machine Learning Holiday Live Stream

it's just five hours


Machine Learning Holiday Live Stream

look at that okay in the meantime we need to


Machine Learning Holiday Live Stream

we need to figure out what to do so where do we need to hook in


Machine Learning Holiday Live Stream

um where do we need to hook in


Machine Learning Holiday Live Stream

why not question answering we're doing question answering we're just doing it a little bit weird


Machine Learning Holiday Live Stream

where do we hook in in order to find


Machine Learning Holiday Live Stream

so I feel the


Machine Learning Holiday Live Stream

I feel the data set here is just fine


Machine Learning Holiday Live Stream

right we get input ids which contains


Machine Learning Holiday Live Stream

this contains the this contains the


Machine Learning Holiday Live Stream

but do we really need


Machine Learning Holiday Live Stream

to point if we give it


Machine Learning Holiday Live Stream

if we give it start and end positions


Machine Learning Holiday Live Stream

those are the labels


Machine Learning Holiday Live Stream

input ids


Machine Learning Holiday Live Stream

the point with these transformers is you can always you can give them right


Machine Learning Holiday Live Stream

you can you can give them a part


Machine Learning Holiday Live Stream

of the input as labels like what we had as the sequence ids before


Machine Learning Holiday Live Stream

these are zeros and ones and usually you do


Machine Learning Holiday Live Stream

zeros for like the


Machine Learning Holiday Live Stream

for the first sentence and ones for the second sentence or here you do zeros for the question and


Machine Learning Holiday Live Stream

ones for the context can we somehow abuse this to mark the answer probably not


Machine Learning Holiday Live Stream

maybe what we need to do is


Machine Learning Holiday Live Stream

we need to give it the context the answer and then produce the question but in an order aggressive way


Machine Learning Holiday Live Stream

I'm late can someone shortly explain what we're trying to achieve so we're just we've just analyzed this notebook here that fine tunes


Machine Learning Holiday Live Stream

question answering and we're seeing now that's just going to take way too long


Machine Learning Holiday Live Stream

but the goal is to take this and actually produce questions new questions so we're going to train a date this a model that takes in the context then the answer and then gives us


Machine Learning Holiday Live Stream

a question


Machine Learning Holiday Live Stream

so that is that is the goal right here and for that we are looking at fine tuning fine tuning a translation model


Machine Learning Holiday Live Stream

fine tuning a pre trained model common downstream tasks here we're going to fine tune a translation model


Machine Learning Holiday Live Stream

but the tokenizer


Machine Learning Holiday Live Stream

this is very very much into this is another sentence can we fine tune a T5


Machine Learning Holiday Live Stream

is that too big of a model


Machine Learning Holiday Live Stream

T5 see people have done this before


Machine Learning Holiday Live Stream

huh


Machine Learning Holiday Live Stream

are they used they used


Machine Learning Holiday Live Stream

this is an old version


Machine Learning Holiday Live Stream

classification sentiment span extraction


Machine Learning Holiday Live Stream

mmm summarization OK so we could potentially use this right here


Machine Learning Holiday Live Stream

is full stack advantage


Machine Learning Holiday Live Stream

OK


Machine Learning Holiday Live Stream

attractive summer


Machine Learning Holiday Live Stream

yep so this and that we got a GPU what are they doing here


Machine Learning Holiday Live Stream

custom data set


Machine Learning Holiday Live Stream

so we're outputting said he's target IDs


Machine Learning Holiday Live Stream

does this still run I wonder let's just sort of


Machine Learning Holiday Live Stream

let's just sort of stop this right here interrupt


Machine Learning Holiday Live Stream

and let's give this a try


Machine Learning Holiday Live Stream

too many sessions yeah just


Machine Learning Holiday Live Stream

OK good stuff


Machine Learning Holiday Live Stream

well this is


Machine Learning Holiday Live Stream

this is training by hand


Machine Learning Holiday Live Stream

so essentially all we need to do is we need to get the squad data set and we need to replace the summary


Machine Learning Holiday Live Stream

we need to explain it replace the summary source with the context and answer and then the summary target with the question


Machine Learning Holiday Live Stream

this should be OK ish


Machine Learning Holiday Live Stream

I have done this already no


Machine Learning Holiday Live Stream

sorry I need to log in briefly into one DB


Machine Learning Holiday Live Stream

just putting someone something else in my control C in my clipboard


Machine Learning Holiday Live Stream

OK


Machine Learning Holiday Live Stream

so we got an error this might be an old an old thing


Machine Learning Holiday Live Stream

sentence piece library


Machine Learning Holiday Live Stream

we can do that


Machine Learning Holiday Live Stream

yep


Machine Learning Holiday Live Stream

done


Machine Learning Holiday Live Stream

so now we just splice the two together


Machine Learning Holiday Live Stream

first loader train OK


Machine Learning Holiday Live Stream

this goes from a data frame


Machine Learning Holiday Live Stream

probably easier if we do if we did the


Machine Learning Holiday Live Stream

so we need these


Machine Learning Holiday Live Stream

source mask and here we need source mask as well target IDs source IDs and source mask


Machine Learning Holiday Live Stream

you also need a tokenizer


Machine Learning Holiday Live Stream

so I feel we can copy over the data set from the last one


Machine Learning Holiday Live Stream

good so now we we don't have the data set which is fine


Machine Learning Holiday Live Stream

T5 for conditional where does this come from


Machine Learning Holiday Live Stream

have you tried comment


Machine Learning Holiday Live Stream

I have not tried comment I'm sorry


Machine Learning Holiday Live Stream

T5 for conditional generation that's what we need


Machine Learning Holiday Live Stream

with the language modeling head on top yes


Machine Learning Holiday Live Stream

so input IDs


Machine Learning Holiday Live Stream

position embeddings


Machine Learning Holiday Live Stream

from a T5 tokenizer


Machine Learning Holiday Live Stream

what about target


Machine Learning Holiday Live Stream

returns a loss


Machine Learning Holiday Live Stream

labels are there we go


Machine Learning Holiday Live Stream

no this is sequence classification


Machine Learning Holiday Live Stream

how can we compute the loss if we have batch size sequence length


Machine Learning Holiday Live Stream

how do we compute a loss exactly if we don't have targets like


Machine Learning Holiday Live Stream

your label so you just give OK


Machine Learning Holiday Live Stream

I guess we can do that


Machine Learning Holiday Live Stream

all right so here here's what we do we'll do a new collab as we had it here


Machine Learning Holiday Live Stream

we'll just make our own and we'll click click click together whatever whatever we need


Machine Learning Holiday Live Stream

so


Machine Learning Holiday Live Stream

this is probably going to yell at us no OK


Machine Learning Holiday Live Stream

do we have the GPU change runtime type GPU yes


Machine Learning Holiday Live Stream

it's going to yell at us we're going to terminate the others and close


Machine Learning Holiday Live Stream

I've just started a job and your channel is a common source of inspiration Thank you. I hope I'm not destroying that today


Machine Learning Holiday Live Stream

because live streams are quite a bit more more boring


Machine Learning Holiday Live Stream

but we'll try our best


Machine Learning Holiday Live Stream

yes OK


Machine Learning Holiday Live Stream

well so we get the data set and then we get this will just try that we'll try the T5 thing that they have here


Machine Learning Holiday Live Stream

so this is for inference this is for


Machine Learning Holiday Live Stream

yeah we can do this this is fine


Machine Learning Holiday Live Stream

the Vim binding still here no they're not tools settings editor Vim so


Machine Learning Holiday Live Stream

OK we still need sentence piece


Machine Learning Holiday Live Stream

excellent


Machine Learning Holiday Live Stream

favorite beer I


Machine Learning Holiday Live Stream

don't I don't have a I don't drink beer so


Machine Learning Holiday Live Stream

no idea sorry OK


Machine Learning Holiday Live Stream

tokenizer we wait we can't get pretrained token this is impossible


Machine Learning Holiday Live Stream

what's our tokenizer none our tokenizer is none


Machine Learning Holiday Live Stream

how


Machine Learning Holiday Live Stream

let's grab this


Machine Learning Holiday Live Stream

put it down here


Machine Learning Holiday Live Stream

and


Machine Learning Holiday Live Stream

see my bindings don't work this is annoying


Machine Learning Holiday Live Stream

how can this how can it be


Machine Learning Holiday Live Stream

all right help me here why is this why is it none wise tokenizer none


Machine Learning Holiday Live Stream

have you experienced imposter syndrome like long periods without published papers how did you go through yeah I think yeah this is quite unless you're like super stellar at academia this is very very common


Machine Learning Holiday Live Stream

yeah it's it's like it it seems like everyone else knows more than you and


Machine Learning Holiday Live Stream

you can't like you just can't let it get you down and also a lot of research fails but


Machine Learning Holiday Live Stream

I mean I think for most people the answer is just to prevail there it might be a little bit tricky if you have like if you really have a wrong topic that where it's really hard to publish stuff yeah but oh OK


Machine Learning Holiday Live Stream

oh


Machine Learning Holiday Live Stream

I'm just seeing that no not again sorry need need to get quick power


Machine Learning Holiday Live Stream

yeah


Machine Learning Holiday Live Stream

see this previously happened on live stream where I was streaming and my battery just kept decreasing in power


Machine Learning Holiday Live Stream

and now I even have the big charger here


Machine Learning Holiday Live Stream

but when I did the Minecraft stream that was the case so even though it was plugged in it would just slowly decrease in in in battery over time


Machine Learning Holiday Live Stream

so I might have to stop it might just break at some point and then I'm really sorry


Machine Learning Holiday Live Stream

but


Machine Learning Holiday Live Stream

yeah we'll see how long this lasts


Machine Learning Holiday Live Stream

OK


Machine Learning Holiday Live Stream

in any case did we figure out did we figure out why


Machine Learning Holiday Live Stream

the tokenizer here is


Machine Learning Holiday Live Stream

none maybe we have a wrong one so


Machine Learning Holiday Live Stream

up to five small


Machine Learning Holiday Live Stream

all right


Machine Learning Holiday Live Stream

I mean this should be


Machine Learning Holiday Live Stream

should be OK no


Machine Learning Holiday Live Stream

maybe we can get an auto tokenizer


Machine Learning Holiday Live Stream

all right instead of a


Machine Learning Holiday Live Stream

an auto tokenizer instead of using the T5 class seems reasonable enough


Machine Learning Holiday Live Stream

so like this let's take this put it here


Machine Learning Holiday Live Stream

up


Machine Learning Holiday Live Stream

that's better OK


Machine Learning Holiday Live Stream

see none of this Vim stuff is working


Machine Learning Holiday Live Stream

if I cut


Machine Learning Holiday Live Stream

cut this and


Machine Learning Holiday Live Stream

OK I can paste it but


Machine Learning Holiday Live Stream

like I have I don't have my my zero buffer


Machine Learning Holiday Live Stream

aren't you afraid that your search history will pop up when you type the search bar


Machine Learning Holiday Live Stream

yes yes I'm afraid well I'm afraid I mean it will pop up but I'm not I'm not that interesting of a


Machine Learning Holiday Live Stream

I don't think my searches are interesting enough to warrant big worry


Machine Learning Holiday Live Stream

yeah I I'm rather yeah


Machine Learning Holiday Live Stream

what are we working on we're trying to make a model that


Machine Learning Holiday Live Stream

that gives us questions to answers which


Machine Learning Holiday Live Stream

so let me update the text right here


Machine Learning Holiday Live Stream

current goal just chatting also training model that


Machine Learning Holiday Live Stream

OK


Machine Learning Holiday Live Stream

all right so now let's look at our loss


Machine Learning Holiday Live Stream

our loss should be a number


Machine Learning Holiday Live Stream

prediction scores are something


Machine Learning Holiday Live Stream

1732 that's probably the vocabulary that's probably the


Machine Learning Holiday Live Stream

length


Machine Learning Holiday Live Stream

I guess because the input IDs what's the


Machine Learning Holiday Live Stream

input IDs should be a tensor


Machine Learning Holiday Live Stream

of length seven


Machine Learning Holiday Live Stream

all right so and then we can use the second line right here in order to


Machine Learning Holiday Live Stream

conditional


Machine Learning Holiday Live Stream

generation from pre trained that's the same line that's the same line that's the same line and there we can generate stuff from it


Machine Learning Holiday Live Stream

and the outputs here are so let's give it to


Machine Learning Holiday Live Stream

the code


Machine Learning Holiday Live Stream

done done done done done done done done list canopy interpreted as an integer how about that


Machine Learning Holiday Live Stream

yep so there you go that is


Machine Learning Holiday Live Stream

hello my dog is cute


Machine Learning Holiday Live Stream

no


Machine Learning Holiday Live Stream

shouldn't we sort of auto aggressively


Machine Learning Holiday Live Stream

and


Machine Learning Holiday Live Stream

shouldn't we be able to generate text from this I have no idea how this how this works


Machine Learning Holiday Live Stream

generate inputs max length min length do sample


Machine Learning Holiday Live Stream

really stopping


Machine Learning Holiday Live Stream

let's let's put 10 here


Machine Learning Holiday Live Stream

so


Machine Learning Holiday Live Stream

cute and cute


Machine Learning Holiday Live Stream

use batch decode yes true absolutely


Machine Learning Holiday Live Stream

very cool


Machine Learning Holiday Live Stream

all right so we can force it to to create something now we need a data set and will copy this from here will get the squad data set


Machine Learning Holiday Live Stream

uh huh


Machine Learning Holiday Live Stream

data sets


Machine Learning Holiday Live Stream

we have data sets over here


Machine Learning Holiday Live Stream

we have data sets cool


Machine Learning Holiday Live Stream

we'll get the squad data set load


Machine Learning Holiday Live Stream

data set