0: And to Ван ту a second session of a five сешен корс, аарон, билдинг on top of alice in this one, we follow the classical паф оф эни, а инженер гоинг Фром implementing.
1: Two buildings with to know and to do, in the city to on, what, to do, when you try to implement ИНН Алик, ай.
2: This фо ю на YouTube the плиз.
3: The fashion is my YouTube channel.
4: Welcome to the н иис Ван ту линию.
5: And why this course, экзист ви Шёл тип сити фо юзинг клоуз версии opera in this one will н. Кастомайзинг энд билдинг.
6: And more specific ли his the plan we start with so first we just do a small камбэк они so the problem of context виндоу, но проблем энд мор.
7: Shortly than we talk about what we can do long контекст раг, к white, and finally the practice?
8: У and practical demonstration implementing раг кэг энд файнтюнинг ол зе куста, со летс старт r m limitations.
9: Get the Бигас Ван из learn when the model джаст инвент стаф он the fly because i just a predicting machine трекинг ворд тру, а visa the first session and so there's.
10: Problem we come this all give 1000000.
11: Window. Its still not at перформан энд ассирии и lamar for hard and to have ten million токенс ин зе контекст, виндоу энд ит воен перформинг.
12: Совел совей, ви кен скилл, ту миллионс оф контекст, виндоус ат зе модус, перформинг ли and the two of.
13: And potential where you give you so u two.
14: Is sometime но present in the training set, if you want to us in the different language, or about language, to or компании meine би ин the н Бейс вен вен ит вас трейнд энд соу.
15: It wont be able to answer correct if not for y y y you check the first course аген веер ви дискасс зе тренинг оф.
16: So, when we train first the training and it time, t n, time, you can see more users н.
17: So if the president and it wont н ю ду фиксит интернет вич лимите.
18: Itzy из i not talking about like i talking about.
19: Пауерфул лоджикал машинс лайк d, dont use that make very дом стейс с visa and so every фаннешнл limitation из.
20: Two reasons and understand ворлд соу солюшенс ввёл ферст ви, но that's easy fix агес энд за зеидан ту мэни Вейс д and with many.
21: We will come in дискос н in what order we have to do and other solution is to контрол стир зе дженерейшен энд зис компидер мени пресс ввёл z вилкове ин the next hour со.
22: What can we do to fix? Элэм limitations? Шуд ви файнтюн, оо we train тюн дду файнтюнинг, её менин. А just we train our model should we do that from.
23: Start no never first вай ви невер вонт ту do that first firstly because it's квакали ю нид Таузен, иф нот миллионс оф экзампл оф квесчен Ансор ю вонт пик.
24: You're бейсик ли, v трейнинг, ю модел, ту андерстенд, зе ленгвидж энд the world in different ways, so, you are not just trying to tweak бит house you are a train to re, shape, итс хонест.
25: World специфики Тунис со тейкс, то дата текс оф тайм виз experimentation ту the date корелли вич минисо супер комплекс и to the date мени таймс the a training проблемс лайк.
26: Start start from and check point, its very complicated класс it means you need экспертиз ю нид сам и you need to spin лат оф мани энд гет.
27: The white people on board to help you to death?
28: Northern оф у from the start и end with this и this is биг, и because you stay фиксен, тайм виз.
29: Lamar to you still have ламату, а лама фор и and summer very great model so you need to written for every new model its
30: Might be the problem, so if you are from the start you and
31: Time and you dont гарантии резолт зе модел ит селф, мереди би кей оф вот ю вонт ит ту и but this little help here what we can do инсте Фром зе старт соу.
32: I will драфт, исход Форст, а this so just take some time to explain to access for to represent the space of all possible solutions, and we can do that to.
33: From la two high left to right to tap and the y axis, the Ван фертика, избу на the xx.
34: How many to tick the self to пиф?
35: Dont need to know time the best трансформер нау зис че.
36: Two thousand ten three or the mod стринг соу ю нид ту адрес like the top five квери Фром интернет орсона ей you need to give it information it no.
37: If you and you need модел.
38: Just in the new ленгвидж, в make it speak, the new ленгвидж ю и to really so it to this Ленид со ю нид энд.
39: You might want to have the model right in specific way комплаенс ту специфик норм о фуло, сам структур ин зис кейс ю Вил нот ни бикоз зе мол.
40: Everytime you want to see to write you, dont you just.
41: Bit more bit супер, and each of this can hold the first one the пёсик Ван из протеже the second one is our раг кверент соу.
42: Giving more information в generation the one is that most people want to start with and the last went из инфор Файт зет ви Вил дайв ин ту.
43: In the course and just to show off what we will do here the typical of what each компании do when in so i will go ли.
44: That i will one one with this is just to show what do bad.
45: Specific ли that you want to try to do?
46: Не danger and finally дженерейтор эген н but this вас fast and we didnt explain what the steps мин соу летс?
47: Everyone back beat we want to start this promise this means maximizing н не as much as possible this is because are extremely пауерфул зен оф фингс.
48: Why not try to extract the most it before we spend money, so how do we do that first we choose the model кодинг Тунис со the right model for x. For example, if you have very long content.
49: And long all your time you use, if you ав комплекс риквест в i model, like i, for example, and n for more.
50: Simple кури квест лайк вери пейси questions i try for pot Ван мини орнано джимми ай флэш оо for оо мини depending on where you using the mods then you want to?
51: Ю. Вон ту e on you and akin to maximize.
52: In instructions that never part that is done doing раг вич и cover вот контекст you want to give the model. You example of showing what you want to ачи?
53: Example here i ve just to example of how i want to text from english to french and here when i ask and then enter the english very и не in french.
54: Rise формат джаст бай сигет ту экзампл ви рекоменд и lies fritz файв, экзамплз, минимал зен ю вонт ту ад. The missing контекст from this example. And
55: Тут ту ту the context to.
56: Next you may want to adopt, you example, аккординг ту the request to user инсте оф Сендин, Вейс, зе сейм фри ту файв экзамплз, ю мэ вонт ту би с, of json file, or the type of мини.
57: Q host локали, изили энд инстед, хэв дозен твенти, тоди фифти экзамплз энд файн зе бест экзампл, ту гив ту. The user based on what the?
58: So you again and wish the prime, but you select the three more example, её он, о example, in the question so here this is what we call the ретривал парт энд the are several steps.
59: To find the information in these real for win to find the three more example from the fifty ви хэв со, а we do that well, we have to understand that the requests than this user request we have.
60: In to language, машина this is done using your and in that quickly it were we н the transformer модо соу, автор.
61: Taking a sentence мейкинг, а token and the making эмбеддинг зис, из what we use to competes вай бикоз итс аур номбер репрезент оф ич ворд энд оф ич концепс.
62: Meanings, сентенс соус и the words and in its on space so here. For example, we have it спейс. Шон преди клоуз, зе бит.
63: And so thanks to these numbers and the space Вике наберу и the н.
64: Cat and dog or this means that if the users cat and you select the most в that we have it would be н р Кати.
65: Killer with so this is бесили вот we do we use and оо и the same space, the same ли monster and so we can see can then we find.
66: This example with with like that we или just if we get back on the и jester.
67: Between the two н. В.
68: And we try to revive the more Ван ине, а for example, i become with many экзампл.
69: Two one by one to find the two or it will be you will have to its супер.
70: You cannot have other types of data you cannot have images тейбл н а from this where to find what we want some times we might.
71: Want to find экзакт кью вордс лайк a specific нейм оо специфик плейс инстед оф аскинг зе водол ту гив ас информейшн эбаут дифферент плейсе дифферент пипл, а because we may Вон.
72: To have everything рефрен ту самван специфик ли in dataset ор сам концепт н джаст зе мост симилар Минин вич вонт гарантии ту хэв экзакли зис нейм get back.
73: Everytime глобал контекст оф the text so if you н глобал контекст оф the sentence, but not the specific world of watch.
74: Insert the riot of man a fifty ю. Ю. Филлер 3 to do generally лайк.
75: Like sport this could be done with dust filter.
76: To find the data this is sometimes there is and you need to know to this user id meet and you.
77: If to user has to specific, for again man эф фифти ввёл ю майк вонт ту аск у from everything makes the u two.
78: Из to some of more the rug систем дженерейшн со и no hair in a typical and the difference between ка из.
79: We won the left, then we the back to the to the.
80: It will look, and we will go through all the steps, one by one so first the data we need to start with good data, remove the junk will морекс ли.
81: So you check data before and you perform. The king the text, the text and in you are so.
82: Its test to give the more only what needs and not эдишенл контекст, вич вуд, а noise and make the model not able to answer or tramp, the mode and the many ways to чанк.
83: Text you have us оптимал спосибл энд then i say оптимал ай мин ин оптимал sizes соу ю донт вонт кот вер итс и sentence or in?
84: Well, if it to you, to you will you do to it taking?
85: Good compromise and test and for you me.
86: No one контру солюшен и твити depend on your data you also me want to try чанк овер Лапин, вич, минс ту юз невер, апп оф лет сей тенти твенти просент ту Авай информейшн.
87: Семён с that means one of the chunk Ван оф зе сегмент Вил хэв Пласт Тен просент оф токен со иф ю хэв токен ИНН сегмент ю Вил олсоу тейк зе некст Тен токенс энд the phone сегмен.
88: Токен will take the previous токен в so that will have nowhere love of ten токен гоус ту Бо сегмент, джаст ту and dat v диден cut through something relevant for the context.
89: We can do is intelligent сегментейшн ю донт вонт ту. Катреном ли you want to your respect that the text, then you can also use.
90: With you like.
91: Anna н инфор.
92: Which would айдили файн её the white левел зен ю can do dat зис матрёшка, тайп оф компресси виз эмбери зис из beat more комп.
93: Just that will end at various levels the same as so Ван, так would be the first course we produce with
94: For example.
95: If you have you?
96: Ill just the two оптима туду.
97: Have about the context to this about the global документ да session информейшн.
98: To doing to
99: You can use вектор и the best method.
100: Компресс из the best method соу ю кэн ду дифферен, зе ферст, Ван куд би и fight you may one, two, just come and find.
101: Тут.
102: The base and индекси вектор Бейс из джаст ту 100 лайк крома би. For example, it will save the text чанк энд the together for easy речи.
103: The coming one by one.
104: Ancient part из index is simply to group to.
105: And then find to мос, мир u will have just easy to know, which one is my super ли, if you go like here, and the next we be ill try.
106: Combining this will be super you, take ill be home for each and i have more information and the Ван пасиб зен ю.
107: To find information лайк ю can you can do it систем сантем оо тугезер.
108: Пёсики хир ю Вил хэв энозер, элэм вич, ви кал, Раттер хэвин, специфик прамс ту ориент зе ретривал ту the right type of ретривал соу иф это.
109: It needs to find the words. I example. If it understand it needs вери гуд структур, ту андерстенд линс битвин тут.
110: Just.
111: New much here we are wall we can improve or information.
112: So, when we your information, we can to the of the data to make more sense of them we can also.
113: Тут.
114: And find more by ли, in the end to find, and we we receive ви кен.
115: Тут and провайдер респонс ту the user, but its not other first we want to a a pipeline and prove it each of steps we don't want just try.
116: One by one want to test.
117: We will see in the nexus из и the system to the би.
118: And i take her because it в ретрив нонсенс.
119: We do not for we may have that we have rain, even if i like спикинг экзампл.
120: Минимал so next we might want to add фью н f, you interesting некст, тп фо рил 2 and this is.
121: Again, you want to write each step to know if you have rich a good point, or you want to still keep the system so the first you want to do is to enter?
122: Between the generator and this is just we dont fail the end we give the с information, we have to to see so we want to date.
123: For the generator, дженерейтор. Тут we may also want to write the user context из we may Вон ту или.
124: Just like it will.
125: I think in cases, get back to you, this question to clarify what if it has understood, what to do and as for clarification.
126: You than me want to try new ways to 3 and understand контекст лайк ю YouTube two of.
127: And to индент в if you see н шип из when the module сенсер соу иф ю си.
128: Understand everything between two things i to the two concepts ю. М. One to use to information is the two concepts.
129: You may want to add modalities вич минс эдин имидж серч лайк юзинг в with me this can be done using more like клип ту?
130: Have of to tell you?
131: Speech to text you can y you me?
132: Вон ту ду ту мол like to earth from x, and what this н.
133: 1 to you may want to start trying to find module н, and i example, да.
134: Too so here, i just have example the medical филд энд айм.
135: In the medical Фил ви мей би толкинг эбаут специфик лес ор специфик cancer, or with very specific, медикал terminology, and if i here dan right now i.
136: Two under it something медикал со хир вот вилле Вере блюда Арбит тугезе бат ту экспериенс ир лайки дактор ди но when the hair.
137: Words, just music stuff to the prostate и to the end, so the cluster that the topics in
138: So here thats what we will try to teach our эмбеддинг модел из to do by him your understand доме and as groups of.
139: Global group of we would have special Медин эр вич и lt would have group for the.
140: Специалист, доктор no. So. It's к and hair. Giving the module экспертиз ту дом. If you will help.
141: With having the next to the wrong everything of dance well, we having to find to self её.
142: We can do in this whole process тина, вид b to implement каг ор контекст, контекст, кэшин вич из эген опшинал бат квикли.
143: Локали или just кэш the эмбеддинг оф, специфик инс, со iv v sad in the фсс, ю порт ю.
144: You dont want to send that again it will just процесс the whole world again to your model, in said, we will save the.
145: Just and will be ready to small and we have to process the new.
146: To see just to meet.
147: A technique to make the generation матч фастер энд эфишент.
148: Then we may want to finally трай фанни со ю. C. It's not from the start its ли lady and fifty so its quiet dawn, the pop of improving, the all in окей.
149: Site generator a model, which is the model the user with possible here in файнтюнинг, ви фен, джаст трай ту трейн её deep this is because.
150: And the н. Трансформер андерстенд зе контекст энд the sentence and everything more концептуали вас the first лес FOX он граммар сента энд мор ленгвич стаф.
151: And so we do this to a knowledge to our эм. And this is older i Дели ви текник, ви кол Лора зет Вил син зе некст курсес вич из about efficient ли where we keep the same?
152: Big jam, the lord модели model and we just use тайни удали тур в Дастан.
153: Туда, да, way to fight modell, and finally if seal fix, you and still problem with us and with
154: The way that generates, and you may want to train, which is new to the platform your platforms оо именно из.
155: And so this is mine too русское the model or a for the model to indifferent?
156: We train the model to speak in different ways, but with the same ноуледж ви верит ин the last course квикли н вилкове ин зе некст у корсес бат пейсики вот we do.
157: Free training тут take you актули трейн зе модел эген бат нот руке, но тут экзампл оф.
158: Carrie and response and then you get you give it system to right sword оо специфик лейн зет ю ду фанкшн, ю ю ю гив.
159: Рейтинг ту денсер энд зис рейтинг Вил би юз ту твик the modules wait, the modules параметерс соу ю и just Ван риспонс ИНН стеда фор ич токен н in регуляр файнтюн
160: And so we were lot of things but when do you do with one between r. К using н. Контекст?
161: Because we talk about in the feat curse, which is clean when you want to do ich типикл ю вонт ту зе из в here at квикли.
162: I want to use run for энил тестинг оо иф ю си the module конте зе но ни if you just need to add литл оф ю ю вонт ту джаст тест n тратит супер.
163: Cost and easy to know if there then you to you for and for that because you can use н контекст.
164: Base are the report to the model, but this will us lost of token increase the cost and even эд проблем бикоз Лони конекс Арен, перфект энд the models.
165: Generate random things sometimes because of the needle in the хейстак проблем the visa in the less so anyway рагги из the most эфишент систе.
166: But if you have you just want to тут ю ю ю дату.
167: Turn on for when using for example, i save you money by computing, при компьютинг зе репорт, н. And several time and lt.
168: Time for you to
169: Model that we want and does really to optimize performance or teach new они сами ю ду энд специфике фо мен да кули супер юсфул ту импрув её.
170: We reply to user, он back and i did и good model you dont train one from you do, if the very last step of the whole.
171: Plaisir из date, you dont need much data in the case, you just need an or, of example, 1000000 ту хэв вери гуд твис ин the model.
172: And get very good response in the staff модели the next you want to you for комплекс.
173: Mortal candy thing before and daddy good for мультистеп лоджикал лайк ма код планинга колд.
174: Il genere планс энд хэв специфик респонсе ту энивей в get back to date on the us want to you for when you need very экшен ю нид.
175: Very феррол response if you know that you i need things you can use ролл.
176: The most импортент и as we said из to measure and эволет эврифинг прамин раг лонг контекст, джаст хэв Бейс эволюшен, датасет and try, try everything камер эврисин энд.
177: Вот best dont try плати n v, c, date in the scores now, i live omar ту кавер структура, путс, энд практикал, ноутбукс, фо а tag and fun, сенсор, вотчинг, зис, он, YouTube, плиз.
178: The full course on the турай академии вер иф ю лайк, зис ферст Ауэр ю. Can benefit from nine more hours of useful concept да way more play than this first фаундейшен теоретика лесен.
179: Please check for the floor also with консультинг тренинг saw плиз ричад ту ми ту майли фо.
180: Now lets back with hello everyone so lets start with the second part of this session we all by showing алеврит мор практикал, типс он, хау ви кен бил.
181: On top of am so in this section ол би presenting, вот a структур отпус вай сьюту энд ошоу, сам code on how we can implement структур отпус энд.
182: Go over сам ноутбукс соу, сам code on how we can implement a basic, чатбот, дат, юзес ретривел, ту ансер квесченс энд, сам ноутбукс, эбаут контек.
183: Generation and finally some an example on how we can тюн и морол и claw сорс моррол соу летс старт соу хир ви хэв эн экземпл оф сам.
184: Text that can be bad and you can see here это paragraph, and if we ха аск эбаут специфик элементс инди инди текст here.
185: Hard to know if the morale экшели дженнер оо the information that we wanted to see so for example, if we wanted to generate и like дискрипшен оф сам пипл воркинг от different компании.
186: Here we wanted to see the name the age the role of the people and other types of information and it very hard to know if the morale экшели Дженнет доуз элементс хир.
187: Hail the main points we wanted to see индиэнс.
188: And also, the формат inn, which the information is presented here its its within the параграф бат зе мол, куд хэв пут, зе сейм информейшен, н. Маркдаун, ор ИНН джейсон.
189: Schema wie in, given the instructions to do so, so that the model we kind of surprises we наче ха, the information we represented, and if all the information is экшли визин зе текст.
190: So thats why we like структур ответ because its away to менедж зис кайнд оф фактор энд соу.
191: Well, its just a technique the we can make the морс фоллоу эй, презе файнс кима. For example, so, if we want the энсер ту би виз н джейсон кима.
192: Or if we want the source to be within эксэмэл фо экзампл, ви кэн юз структур аутпут ту ду экзакли дат олсоу иф ви ареди ноу the types of энсер зет ви вант Фром зе моделс ви.
193: Can tell the more to use the специфай токенс соу иф ви d know that we want to know if its if сам и true false хир ви кэн мейк демо онлине.
194: Dose, ту токенс соу итс гонна би вери изи ту the partner and know what the model, энсер соу фор экземпл, иф v c. This example, here this string.
195: The store энсер тут would be here кима виде коррект о like that the most импортент информейшен оф the strings of so if instead of.
196: Having to deal with strings with correct and having two or the strings and not be what in the string, if all the information is is included here with the json итс вери изи ту порс бикоз ви?
197: Json, format and i going to be very easy to know exactly what i of information is missing ya make.
198: So just to samurai the адвентис оф юзинг структур путс из number one консистенси соу иф ви choose to work with jason хима зен офф.
199: Will have to follow that format and all will be дём консистент итс гоинг ту би вери эфишент бикоз ви no one need to parse стрингс фор экзампл.
200: Its going to be more way more reliable бикоз we can see if value in if if the morale экшели, энви зе комплит информейшен, ви вонтед, энд соу, вен шут ви юз.
201: Strutter, тут well, for example, is going it very useful if we want to extract information from параграф оо just стратер, текст so here we can get json и.
202: Like we see on the screen where we have exactly what of meaning the time the date, and who is going to be in the mi?
203: Its also very useful when we want to integrate апс вит экстернал системс соу летс сей Вон ту юз эй web search, api like big search or search.
204: Then its going to be very easy to use строкер опус in this case, because i i know the feels i want to send to the вебер, api and i.
205: No options, i want to earn to the api so very easy, and very они to get from the ball from the response the correct.
206: Icon to the y and its also very full when you want to great structure соу фор экзампл её you want to write файненшл репортс энд ю d no, that you want продакшн.
207: Some type of analysis and the confusion ден ю can use трактур тут ту мешер зет оо the section оо инклюде Индии мотал энсер энд итс гоинг ту би вери конви.
208: Two using the how can we ей и the two main Месед за пипл девелопинг ди ду ту.
209: To you to the first метод из simply to train, the mare to do it and also include the instruction with in the prom.
210: And the second method is to use what we call рамер, Бейс констрейн, оо контекст, рамер ту констрейн и the type of token димон с going to die.
211: Deep within this to me before i do that i just want to specified to me can be экшели комбайн энд then we use мост эм providers дей гив.
212: Give access to to me, for example, here i v i know that we can use your number one number so н. Экшели, ви. Донт си the method we just use.
213: Top but in the background, затс, вот is happening and to make it easy to get строкер, отпус зен и we can use thus like пайдентик иф ви.
214: With python, for example, to easily create the json schema for the types of ether the we want to see in the response соу айм гоинг ту.
215: Give it more дител фор ич метод соу зе метод номер one, which is just to train to find to the mars to produce джейсон кимас хиро.
216: А or whoever и training the more just has to create dataset of промс софр экземпл риспонд ор экстракт ди
217: Text and i want to follow a специфай джейсон кима энд then will be in the input, the input, and the out will just be the json кима, виз зе коррект, информейшн соу иф ви трейн Зёма.
218: To do that with all of dose экзампл зен зе морол, Вил лерн, ту ду the so. For example, here we won the mario to extract information of the string that mean.
219: And we feel we want to see the feeling that вас.
220: We will have the the completed энсер з. Json with the correct дали вот to see now for method number to that uses a base констрейн хир ви.
221: Not training the more to do it here we are many restricting the марол choices for the next token соу.
222: On top of the марл лет se, v a removing all of the токен опшенс зе Марлен дженерейтор example, if we want only the tokens тру орфос ден зе мал ви Вил онли хэв зе чойс оф юзинг.
223: Ту токенс соу зис из something that nurse that dinner will экшели фоллоу зе инстракшн оо фоллоу зе формат at a very reliable рейт.
224: To be бейсик ли, good all the time so here, for example, we have and ll and we knew that lm предус probability for the next token со лет.
225: Hair d m for the next token Вил би зе некст токен хир Вил би хир, а twenty two просент вот we can do is to apply маск энд хир пут ол озёр токенс эт Зиро.
226: And only live, there, probably of the token set we want to see индиэнс соу фор дос ту токенс зе токенс фоллс энд тру ви live there probably аис.
227: Since we put all to zero, then here the token, set the more will дженерейтор зет, ви бейсик ли хир, зе токен, зет Вил би чоузен бай дефолт из хай.
228: And since all the ones, sir than фолс Вил би d, next токен мороженки энд затс, вот we call констрейн семплинг, бикоз, ви ар констрейн.
229: The number of token set the more can use to to put респонс энд ту ду зис сел ви нид ту хэв аксес ту зе при of the more.
230: This is very easy, a easier to do with open Вейт Марс бикоз we have complete access to do we know exactly whats happening in the url bat for close source, Марс нот эври компании.
231: Ill give that information, so, so for example, this german i or other companies итс нот с that we can do are this method of grace on this method can become экшели.
232: Very complex со лет se se морол generates this 3 function calls the same time with in the same энсер зен зе морол хасту мечер зет зе бракет.
233: Are correctly in инде рейт позишн ор индерект ордер зе камас эврисинг хэв ту би ин the correct order for for this to call to work so.
234: This констин семплинг метод кэн би камбери комплекс because you have to keep track of what you генерейт бифор ту мечер зет ю экшели complete, the string, you complete, the, brackets, you complete the.
235: The valleys корректи соу ту мейк ит изи ор ор Ван вей ту ду ит ин о easy way is to use what we we call контекст фри рамер со d this thing.
236: Is the context фри граммер из бейсик ли last of strict rules that the more will need to follow when it's generators со фор экзампл, ай вонт ту мейкер, дат зе рулс.
237: Will констрейн зе мол, to only generates со, а here i put very simple example of what these rules can look like for example, here i start and then the next.
238: Talking we need to be Гридин энд хир зе и greeting is the five words hello or high so here the моррол хаз ту авелибилити он вот has the high или?
239: The Гридин из fall by como ден бай я space and then by name and then here name is also the fine by two strings содер Алис энд зендер Бо зе.
240: We choose whatever has high, and then we will and the энсер Визе эксклю поинт со зис. Из what we call?
241: Trick рул оо контекст граммер ту ту хэв нессер зет зет фолос экзектли вот we want to see then, after we define your rules we need декодинг алгорит.
242: That follow the progression of the text аккординг ту зис грамм.
243: So for this декодер ит кен ай Дерби, а парсер оо finite state machine or tomato and at each тёп. Соу вайл, итс энсер онли.
244: Taking that follow that ruth will be allowed, for the more to use.
245: And im not going that much into the дител because this process or this алгоритм еди имплементед энд, а very fast и henry may and you can use them when.
246: Ю. Ю. Экземпл, лайк, аутлайн, ор апи пи or even the open api иф ю, ю, the one of the so Бахай де синс.
247: Death лабери Вил криейт ди грамор зе the list of rules to фото, and then have дикое и that will make it so that the мол, кономи тут the tokens и.
248: Тут so if you want to see комплекс джейсон респонс виз мени мени, индекс мени лес зен и will have two for the rules and you.
249: Follow экзакли её i just want to say that different имплементейшен кэн хэв.
250: Speed and, for example, аутлайн её Деро имплементейшен из the faster one so, thats interesting ноут and so, if you me using open.
251: Or open Вейт, мол, зен ай, рекомендую юз аутлайн, иф ю хэв ту юз Марлен ю l have to use i имплементейшен.
252: Then you have лабери лайк. Инструктор зет Вил юз, её имплементейшен из ready, велел Фром зе дифферент, providers инструктор из very useful when you are
253: Defining the different that you want to see and i will come to this инди инди кодинг экзампл соу хау кэн ви юз и me in practice.
254: Like i said before we need to специфай дэнсер ви вонт ту c and to do that we can use ли like пайдантик иф ви а using python.
255: So what пайдантик со бейзик ли, пайдантик из и python, лариат, кен хелп, ос, the five and validate дейта морс.
256: For alternative, ю can look at зад фор джаваскрипт, оо лабрис лайк, флюенд, валидейшен, фо сишарп энд соу вот is it look like when we use пайдантик, вот basic ли hi.
257: We can create what the Кола и the юристу?
258: Name has to be a stream, so then i can create one user with an idea and a name, and then i have дефайна. Пайтант тайт, обжект зис из
259: Because валидейт за id н. And the name is clearing.
260: Then, when we create this this class, this user, we can then use the пайдентик лабори модел, дам, джейсон ту, криейт, зи джейсон репрезен.
261: Of an object or a amor, so this is going to be very useful for the finding the lm энсер соу фор экземпл, ай кен сей.
262: I want to see what type of event the date, the hour and the people that will be in the event, or have this i can ден пас the json representation of this.
263: Small this event and i can пром, мол, to enter my and to put the information in the exact формат, а специфай энд then i get ди энсер хир.
264: Validate ip to be very so if i o u. Complete.
265: Here am showing thumb н open документейшен со хир ай хэв и event and i want to see the name of the event the date and the list of.
266: Экшели, олсо, гивинг, тайпс фор ич атрибьют ич варил да i want to see in the dent and then, when i make a request to get энесе Фром.
267: I can then give the instructions со экзампл как information i gave the мол, the string that contains the information i want to extract, and then this in the same.
268: Api, call, the same request, i also give the the module, d, the system, d and went so this is the пайдентик, обжект да, дефайн, хир, а and then i receive.
269: In the event верил i can ден изили аксес ди нейм ди дейт энд зе participatory из very useful.
270: Working on top of this alice so now im going to show a quick example that it is basic the same thing but here i instead im going to show.
271: How to do it with the instructor лавери бикоз итс вери изи ту ту ден свап от провайдера и so here this is ноутбук. And i using Кола.
272: Ту Ранде код it if you dont know bout Кола, итс вери юсфул фор for this, for this demonstration, соу, хир, ферст, айм, гоинг ту шоу, ю, the text that contains information.
273: And from this text он страшер текст i want to extract специфик информейшен, да, i want to dan идер сейф ту э датабейс, ор ту ду сам type of analysis.
274: Over i just want to from the text экстракт зи елевен информейшн да, i want to see saw to do that im going to use пайдантик энд айм гоинг ту.
275: For example, i will the five и person обжект пайдантик обжект энд then this person will have a name, we the string and the string, i want desize, оф, the string to have максимум love фифти, корректор зис.
276: Information is correct than i want to see the age, so there's the age can either be an integer оо string, this is just for demonstration проперси бикоз.
277: Here i will der wand to have everything integers or everything is make sense to toe hear to let there mario choose the type this so я here im just giving.
278: A choice then for the ролл ай вонт ту би э рин энд зенит, дискрипшен соу зис из вери, юсу, бикоз, самтаймс и you giving this инфор.
279: The json schema из эти сам таймс the mars dont know exactly what information шут би ин the key so for the ролл ки хир ам.
280: Death the world of a person with in the company and i also give it an example so for example, i девелопер ден фо зе компании hair синс ай ноу Дворкин визин.
281: Specific number of companies for the reason i already know that the number of companies that will be in the text here i can специфай зе делис да, the more will be able to choose from.
282: А company is not this in date, list than there more can choose to put the other стринг фор зи аз энсер.
283: Then, as we saw in the first session its very useful for non ризонинг modules to instruct them to reason бифор.
284: Dancer to think степ бай степ бифор зей экшели её дикшн оо destruction. So thats what im doing here im, forcing the more im telling him to to write?
285: Reasoning string to write how see how the metal need to approach, how it will approach solving this task, and finally here as секенд ки.
286: I want ди экш пипл лист end, this is going to be a list of person persons, which i дефайнд, хир абв and i want a minimum of Ван экшели, фри пипл.
287: Here its because i die no that in the text that there three people that a mention in the text so now for the second step, one i finish the.
288: The party modules that i can create the api, client, go to use, make the request here i the five и the text the онтракте, текст and he.
289: As for steppe, i write the prime so i say to the model экстракт ол зе пипл меншин ин зис, текст and i put the text in the prime хир аз аварии and.
290: Number five i мейкер квест, and here i display this, i just want to specified, а you gemini ту the flash, so this is very cheap.
291: Мол, mortal can use and here for the энсер ви кэн си the people экстракшн варбла да the моррол энсер виз ви кэн экшели вит код.
292: See the of the key that i define the варил соу иф ай гоу ту the reasoning, ай принт, the reasoning, ай кен си зет зе морроу сэд ай Вил экстракт зе нейм энд зе эй.
293: In the things i will treat, the text, and if the company does not экзакли матч the last i will use other and then i print this in this форлуп.
294: People that morale extracted and i can see for person one i have the name the ролл the company, the age, or i can also have the string презентейшен оф зе сейм.
295: So are you can see using структур апут воркинг виз эм из матч more easy than trying to порс ди анстратер энсер Фром.
296: Here am able to direct ли c how many people watch the different attribute of all the different people i can make the morale thing before энсер ай кэн ду.
297: Бейсик ли everything that i can do we here im im using all make very easy to work in call this very very useful to do now.
298: Show some more bass морал экзампл со лет сей Вон ту экстракт ди локейшн информейшен Фром джапон соу лет se you have джапон он.
299: For example, if you win joe you see of text of information and if you want to фо экзампл экстракт ки и from текст then you can use like.
300: I дентик ту the find the information you want to see so here i just in example of trying to get location from so here i have the chain of that.
301: Double that will контейн и step by step ренин оф the model than i want to see list of city list of regions, ай специфай е type so liest, оо string i.
302: Pi the number of айдем зе лист шут have so for example, i want to have Алис Ван айдем ин зе лист Ван элемент i show экземпл ай шоу дискрипшен соу ол оф зис из джаст.
303: Information, so that the, мол, can extract the correct information and put dat in to json кима, соу эврисинг и just make it easy for the morale to экшели со зет.
304: More to extract the information i want to extract соу иф ви хэв зе салярии, фор экзампл, ви вонт ту ноу, экзакли, вот салярии из гивин, бай ич.
305: We can do that so we have that the top из бизе. Может from ли?
306: The salary ви кэн идер хэв лист о флокс ор стрингс бикоз sometimes the information is not контейнт ин the structure текст so we want to give the more the choice to put иф.
307: This information is not present инди инди, текст then i have more example of using литра соу зис из something, specific to python, but here im say to the морол.
308: So that i dont see different types of ether the later on will be harder to work with so if i i want to see ли мантли.
309: Салярис, денди metal will not try to come up with other time time frame for салярии, фо экзампл, лайк дейли салярии, оо уикли салярии, ай донт вонт ту си.
310: And then this is where i request so here would be и айдентика, да.
311: Про видео the here we контейн и structure текст да. Контейн зе информейшн зе параграф зе ей.
312: Information юхан.
313: And, yeah, thats how you make to request and just to show you quickly i recommend you check out all of those this example, if you want to learn how to use an страшер.
314: Because я it can make воркинг ви. They more easy, you know фреймворк мор комплекс в so lets go to рагги со.
315: In the first section луи то lot about how we can implement рак систем виз Инна апликейшен энд хир ай джаст вонт ту шоу, this simple example, how we can implement сач системс.
316: Not going to show. A complicated, от or комплекс example, but its just to show you how simple it can be how i can by using н о celery оо аш.
317: Example google api?
318: So here lets go to the top hair. I will be using to api бикоз. Айм гоин ту и using из эшли джамай бат ин ордер ту кризис.
319: Вектор презентейшен и to use a metal by open eye, and we can access it bye bye do api ка квест.
320: And show him i will be to and just one, then here im just импортинг оо оф зе the data that i want.
321: Work with here to juice путсом бэкграунд контекст ви вонт ту би зе чат бот да is able to look at different articles that talk about
322: Ди мета лама, мол соу иф ви хэв квн эбаут и lana, мол, зен зис чат пот нидс ту лук дус орик си из информейшен из der and if its there i want to see dat.
323: Инди файнал за so here im just done loading this арикол Индии локали Хирин Индии колаб.
324: And we can see here that we have экшели фортин articles, and if we экшели сплет дос articles in to chance.
325: We have a hundred and seventy four чанкс just to make it clear here, is a чанкинг, фанкшн соу хир бейсики, ви divided Дикал бай чанкс оф.
326: Тени фор корректор соу зис из нот the optimal вей ту гори Ван вей ту ту и very simple and works in моя this is.
327: Keep money just for demonstration джаст шоу хауи.
328: Now wont we have the артикул заторчат нау ай вонт ту криейт хир фордис демо и pandas дата фред энд айм гоинг ту пут оо.
329: С within a single Коллам соу летс да, in within my на frame i right now i have one Кола and its the chunk Коллам энд фор ич.
330: I will have all of the different чанкс ин май дарасе.
331: Denn hier, am the finding. What is the the get эмбеддинг фанкшн хир ви а going to be calling the text эмбеддинг 3 small motor вич из a very small motor Фром.
332: Well from india опена ипиай со зис эмбеддинг, мол, джаст нидс текст.
333: And it will or put a Абедин вич из just a list of numbers that represent this text специфик ли.
334: So what we do here is? We just look over all the rose, and then we create the эмбеддинг фор ич чанк ин the даррен соу нау ви хэв ту калам ви хэв d.
335: Chunks коланс энд зе эмбеддинг калам со фор ич роу Вил хэв зе текст the strings and the edition for each ви ич Ван оф дос чанкс.
336: Now, if we create write a question of example, i write how many параметр лама ту and then, i get off the queen i just then.
337: Can see exactly the number of value that are within this эмбеддинг соу ви хав Ван таузенд файв хандред 3 six numbers of value for that specific question, so this this will.
338: This is specific to that эмбеддинг модал зис из зе the number of value for each вектор презентейшен зе намбер оф dimensions in the deep нау летс шоу how.
339: We can use as so here, i have two н and i have example, the sky is blue and мату Моха за total of two.
340: Parameters со the two different things now let's компьют и форбол н. I will have to and using the семинарии фанкшн.
341: Which i import from this лабери ай кэн си the the similarity скор оф the question with the question.
342: And the queen абба, соки, соу ви хэв зис квэсчен мед. The how many параметр model has and i compute the score of this квестчен баф.
343: We die to энсер беллоу энд ви кэн си зет фо зе энсер зе скай из blue we can see that the score из экшли рили really low because there the энсер доснт матч the question.
344: Within ди ди и space and in the контри фор зи энсер, зе секонд энсер, хир ви хэв хай скор фор зе симиларити.
345: Of ad free просент соу зис из just show case that similar писес оф текст will have a higher скор зен ту pieces of text that dont mean that симфин бейсики.
346: На now if i do the same thing of taking the question and Коперин да to each of the chance in my dataset Бо.
347: Then i will have экшели, а hundred and seventy, four score, лоджик ли, Наталии and i will be able to sport the энсер тут the chance that get the хай.
348: Score for my question so i can i can print the indexes that have the high score, and we can see that the chunk ви зи индекс, ви зис 3, индекс.
349: This these 3 чанк ли have higher core, if i the chance for each of down and.
350: One of dem шут контейн dancer to my question.
351: Now when i built the request this is basic ли the чатбот райт нау the rug чатбот хир ай хэв зе систем Прант ай have the prut i.
352: And?
353: Ляма ту из эвелибл ин four sizes севен 1000000, Фетин, 1000003 for billions and seventy биллион зис из бейсики вот вот, а чат из со бесили хир.
354: Have the question i i filter this the chance that have the highest симиларити скорс зен ай тейк зе текст вин windows чанкс энд ай джаст.
355: To the про so within the same про im also in the context не the information and to me correctly, so this is very very.
356: Simple example of what ретривел Бейс.
357: System Лукс лайк ю ду зе ретривел ю гет зе текст and then you are to the prompt со зет вен сама а van den and check the information in the prompt ин the context and энсер корректли.
358: So here have another chunk with some information that ввозин ин the articles here i ask how many параметр z. The new or model has the model фри дат Ван.
359: I add this example, чанк ин зе Пронт со зис из the correct information taking from the man документейшен.
360: Once we do the request and if i do the same thing we out in the correct контекст ден ви кен си зет демо из not able to enter my because when it was it didnt have that энсер со.
361: We can see that by dean the correct контекст this model ей to read the context in the prompt and энсер рилай соу зис воз вери бейсик экземпл нау летс лук.
362: At the same экзампл бат нау летс юз фреймворк смени её you can use лама индекс фо экзампл зе спешл айс ИНН ретрив фо.
363: So, if i do that i iv файл винтик.
364: Here im going to create what we call a index document and im going to put all of the different content of the articles with each документ энд ич документ.
365: The text атрибьют айм джаст при the content the content of the article in the text, url and here am printing the contents of the first артикул?
366: Where i create index со зис, из what we call вектор стор индекс и here are my индекс Мекси вери вери изи ту крейт Ван Фром, эй лист оф документс.
367: I want to use im sayin экзакли вот the chunk size should be what should be the chang оверлап вот should be there in module.
368: I just want to специфай за the options should be оптимайз бейст он эвалюэйшн со хир виа джаст Шоин хау викент, вери квилли э вектор стор, индекс бат и.
369: Next a bit to try to optimized соу Ван ви хэв зе индекс ви кен ден.
370: Going to be very quick and then one we have the index ви кэн, ай земо ви он to use for the ether дженерейшен, зен, иф, ай дду, a quick test here i do a.
371: Using the index свири энджин ай с со хани параметр la to has and its able to enemy корректли энд иф. Ай аска квесчен эбаут лама 3.
372: Its not going to be able to an дирик, забав ту нот хэв информ фо ю can see that to the same чатбот, а the show Шодин зе.
373: In dieser ноутбук Хири ит воз рили really easy to watch the d. Next set викли гоинг ту snow in the next session will be to эвал энтере овер.
374: Рад систем нау. Вот эмбеддинг, мол, to choose веллер мени мени диферент ай дили ю вонт зе о to know about the type of data that you working with so.
375: Here just showing a list of model Тейкин Фром, либо you can try to use me so you can see here okay н ю.
376: Izi, но led you have many many different ones to play with to try, but as i said to really know what model you. Шучу ю нид ту ту.
377: System to to know exactly the source the your system is a thug and also it can be very бенефиш ту вали, трейн, энди, мол, бикоз самтаймс.
378: Type of you have is not in the train data that was just to train this open паблик монс, соусом оф зем экшели, кэн би файнтюн соу.
379: That will be like different оптимизейшен avenue if you want to increase юр ретрив скорс, вот we talk more about this in the next in the next session.
380: So like i said, its its good to show to look лидерборд, ей more you to check to экли системс со Вон ту лайк Зезин.
381: System the recall оф юр раг апп ди рикал эм and other межермент иф зей реле ту юр таск со на let's change topic.
382: Now lets look at контекст он generation, which is the same thing but here we мости talking about bigger bigger контекст со лет se you have a book оо.
383: A big number of документс за will remain the same hair using кэг Вил би вери юсу.
384: So different провайдер меки фанат ю хэв джемай контекст, кэшинг соу фор экзампл иф ю хэв и специфик намбер оф pdf document that you want to cash.
385: In the system you can do so by the number of token in до документ и default time will be cash is one, but you can н.
386: Then you have automatic systems so for джеминай ит воз маниал ю хэв ту специфай дизарма документ i want to кэшем хир виз опен иай.
387: Its done автоматик ли so whenever you prompt is above aron Таузен tokens, the system will автоматик ли кэш, the prompt and the cash will be will remain active for.
388: Of activity see, if you ask very long can we long контекст энд ю аск зе сейм контекст a letter then its.
389: System will need to re кэш ди the content in её документс, энд ю, хэв тропик, пром. Кэшин, вич, воркс, симулял ту the open пром. Кэшин, фичер, ну.
390: They the pre match all have same type of features, and they really help in in reducing каст бикоз Ван Зее контент из кэштек фор токен энд ит.
391: If i to you контекст here i.
392: Contains документейшен Фром лама, индекс and it has a hundred and fifty k. Токенс, со зис фитс визин, инсайд ди контекст, виндоу оф.
393: And fifty k. Токенс, нау хир, айм гоинг ту криейт аген, ираг бот юзинг, контекст, кэшинг, визаут энд олсо, компен тут.
394: Дню контекст кэши соу хир зеваки, лама, индекс документс, энд хир ай Вил криейт Ван Сеген ан индекс and квери зис.
395: Chat bot and you can see death for the чат бот it took four seconds to венсер соу ай аск хауту, сетап квери энджин код end in энсер ми in four seconds.
396: Now lets to the same thing this gemini контекст кэшин со хир ай криейт ди.
397: The file of loud so i hear im конвери и jason all file in to txt бикоз азе тайм идидет суппорт джейсон айм нот 3. If its the case right now but.
398: Бейсик ли is the same content, but in the text file here i специфай зе мол, дай вонт ту юз фор ди кэш.
399: And later for ди чатбот, со i create the cash, i, first i под the document, and then i create the cache юзинг, зис, а, sdk, фо и my api.
400: And here im going to ask question using зикэш токенс энд ай вонт ай с say i want максимум таузенд токен фо.
401: And i can see the ether i can see the мера дара оф дэнсер соу ин торал, ви хэв ту, хандред таузенд токенс, Юст экшели.
402: Number of talking cat was экшели ту хандред н. Со дифферент Фром зе файл name because it was using different токенайзер бейсик ли, but it shows that.
403: Here it энсер ми in two seconds, in four seconds соу, а vs death it my way faster н. Индекс чатбот за have the context.
404: Cat saw this is just an example of using контекст кэшн нау хау викен хау кен ви файтин элемент as louis said its something we choose to do most ли автор ви хэв трайд.
405: Mine everything has so when we dont have really the choice, we ели go in to train to find to на мотол энд ту, мейк сингс ивен изи we can start with closed source Мотос иф ви ви.
406: If the data can be your wife, if компании the working with экшли у to use and here to make things easy we can.
407: Use the services that are provided by this close source, so, for example, we can use the platform and just to put some контекст он what we want to do we have a system we have.
408: A tutor is able to recording документейшен оф индекс райт нау the system is using.
409: For u. And then some ретривел ту библ ту ретрив коррект, информейшен ту the prom to the context of the prime and then get that have the correct information so now the system is.
410: Привёл и complete and youssou энсер бат нау ви вондер вот if we use gpt фор оо мини кэн ви хэв зе сейм квалити оф энсер.
411: And if that possible if we get the same level колари зен ви кен сейв лат, он токенс, он касс фор for the system бейсик ли.
412: So now lets see how we can экшели ю the open eye файнтюнинг, сервис, хир ай бейсики, олреди и the dataset фо зе.
413: Example so, basic ли we have джейсон файл with Путин от we have questions and dancer?
414: Is written by a system that the gpt фо у n z done before so here we really have the dataset of questions.
415: And correct инсурс, and we want to find to gpt фор у in here we in here is done, даёт from face so right now its.
416: Stored in holy face and im dont 1 it here in die, in the notebook now, if i create here again a.
417: И quick chat bot using лама индекс i can see that its able to enter my so i create the вектор стор ай z m, n, n i carry энджин ви кэн старт.
418: In c. The resource and we can see the сорси юз фор ич фор ич квесчен со хир ай хэв ол оф the chance.
419: Call them knows and each чанк ич ноуд ха url se url that points to the correct контент бейсик ли so i can this is us because then i can said.
420: Information the model is using to i can tell the model плиз сайт серии for example, and then people can click on the url in конформ.
421: This is correct соу хир ай have other question and the example, here i just.
422: Из in the correct format this function validate дарасе, Вил валидейт дат май дарасе контейнс зе дики месседжес.
423: The rose the content so this is important, because we want the inputs to be assistant, or user инпутс соу зис из зе ролки.
424: So this is just или making that the dataset ха коррект опен ай формат so this is not импортент ту меморайз хир айм джаст каннинг зе намбер оф токен ин ич экзампл ич семпл.
425: And here here is where i will.
426: Format d. Z. So, this is what i was talking about my my turn, and right now, the notebook has.
427: And source what i want my dataset to feat within the correct format that open i needs to for to work for the training for the training.
428: Run and so im конвери, бейсик, ли, эври, квешен, энсер ин ту зис, месседж ин ту зис, джейсон, бейсики, джейсон, обжект, энд и im going to have.
429: Jason lane файл the each line will be a json this this, this, this exact контент.
430: And im going to basic ли припёр даёт.
431: Too so you can go and do you
432: Api you can use code to load, fail to define сервис со летс, джаст, гоу бэк ту зи презентейшен, хир, ай хэв, сам скриншот, ту мейк ит.
433: So here we go to go to the platform соу ю ю и go to the section хир ин зе фо.
434: YouTube. Here you can. Бейсик ли. Чу вот witch more to so you can t hear н.
435: For мини сова ви у that then we селект н экзистен, её so you can either лайк сети ю о ю кэн ду инкод и dpi и.
436: We can also create специфай. Вот is the training data and what is валидейшен дейта соу зис из when ever you are training a model you need to your performance, and you can not measure?
437: Performance on the дета юр тренинг, виз бикоз офкорс зе the more will be will get better on the training data, but the point is that the more to learn how to generalize ту.
438: Type of so we need this валидейшен даёт вич контейнс вот city and we want to measure the performance on that валидейшен. Да, so he.
439: Специфай вот will be the софикс соу, её when we will use the mortal after words in её apk, инстед оф Путин, gpt фо мини слэш энд the rest of the string ви.
440: Will use this string, but also аппенд зе сафикс о that we can use the fighting от and the general one then here we need to set the number of epochs энд бач сайз.
441: Learning rate, the value a giving гивинг ту вас автоматики бат и during training дуринг ар experimentation ви Вил трай ту оптимайз зем ту гет зе мост перформанс сою.
442: You dont train Ван тайм ю шелли, трейн мотол таймс inn y play with this value to kelly get трай ту гет зе мост, перформанс зе хайес, эскорд зе ловес лос он её валюе эвалюэйшн соу.
443: Once финише тренинг ю хав зис секси с and you will be able to see that the graph of the lose, the training loss, and the валидейшн, лос Айсет, бифор, ю вонт ту мейн лук.
444: Got to see and you nee фо зе ит, южели бикоз офкорс за.
445: On the questions it экшели со трин тренинг saw saw this is just one training run and you want бейсик ли to make your that you have the?
446: Last possible for you task and i я. You can you can check on the of the code you can?
447: Very simple and you can start using in so this is not very impotent батя.
448: How easy is when you train is using сервис like it рко комплексити в with open source н а я пёсики the process.
449: We recommend i hope for the next to be.
450: So how we can take this чатбот зис ретривал системс how we can measure the performance экшели try to optimized for the task you so see you for for the next session.
451: Is i just want to to the path to плиз го Анис сенкью?