<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[DragDrop.VN- Giúp bạn dẫn đầu với Micro Software]]></title><description><![CDATA[Chuyển đổi số dễ dàng với No Code và AI]]></description><link>https://blog.dragdrop.vn</link><image><url>https://substackcdn.com/image/fetch/$s_!wcbh!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0017ae6-1b66-445f-8c2b-7552ecdc7b48_495x495.png</url><title>DragDrop.VN- Giúp bạn dẫn đầu với Micro Software</title><link>https://blog.dragdrop.vn</link></image><generator>Substack</generator><lastBuildDate>Wed, 06 May 2026 10:59:55 GMT</lastBuildDate><atom:link href="https://blog.dragdrop.vn/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Khởi]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[khoi@dragdrop.vn]]></webMaster><itunes:owner><itunes:email><![CDATA[khoi@dragdrop.vn]]></itunes:email><itunes:name><![CDATA[Khởi]]></itunes:name></itunes:owner><itunes:author><![CDATA[Khởi]]></itunes:author><googleplay:owner><![CDATA[khoi@dragdrop.vn]]></googleplay:owner><googleplay:email><![CDATA[khoi@dragdrop.vn]]></googleplay:email><googleplay:author><![CDATA[Khởi]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Các thành phần của LLM]]></title><description><![CDATA[T&#236;m hi&#7875;u v&#7873; c&#7845;u tr&#250;c v&#224; c&#225;ch ho&#7841;t &#273;&#7897;ng b&#234;n trong c&#7911;a m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n LLM.]]></description><link>https://blog.dragdrop.vn/p/cac-thanh-phan-cua-llm</link><guid isPermaLink="false">https://blog.dragdrop.vn/p/cac-thanh-phan-cua-llm</guid><dc:creator><![CDATA[Khởi]]></dc:creator><pubDate>Tue, 18 Jun 2024 22:21:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89707174-49dd-4054-8dde-537ac04f74cd_779x458.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><strong>T&#7893;ng quan</strong></h2><p>H&#7847;u h&#7871;t c&#225;c LLM &#273;&#225;ng ch&#250; &#253; trong nh&#7919;ng n&#259;m g&#7847;n &#273;&#226;y &#273;&#7873;u &#273;&#432;&#7907;c x&#226;y d&#7921;ng tr&#234;n ki&#7871;n &#8203;&#8203;tr&#250;c Transformer. Tr&#432;&#7899;c &#273;&#226;y, h&#7847;u h&#7871;t c&#225;c m&#244; h&#236;nh ng&#244;n ng&#7919; &#273;&#7873;u d&#7921;a v&#224;o m&#7841;ng n&#417;-ron t&#237;ch ch&#7853;p ho&#7863;c h&#7891;i quy, nh&#432;ng s&#7921; ra &#273;&#7901;i c&#7911;a c&#225;c m&#244; h&#236;nh Transformer &#273;&#227; c&#225;ch m&#7841;ng h&#243;a hi&#7879;u su&#7845;t c&#7911;a m&#244; h&#236;nh ng&#244;n ng&#7919;. &#272;i&#7875;m m&#7841;nh c&#7889;t l&#245;i c&#7911;a c&#225;c m&#7851;u Transformer l&#224; kh&#7843; n&#259;ng x&#7917; l&#253; v&#259;n b&#7843;n song song, t&#259;ng hi&#7879;u qu&#7843; cho c&#225;c t&#225;c v&#7909; ng&#244;n ng&#7919;. B&#224;i h&#7885;c n&#224;y t&#236;m hi&#7875;u s&#7921; ph&#7913;c t&#7841;p c&#7911;a ki&#7871;n &#8203;&#8203;tr&#250;c Transformer, &#273;i s&#226;u v&#224;o hai th&#224;nh ph&#7847;n ch&#237;nh c&#7911;a n&#243;: c&#417; ch&#7871; ch&#250; &#253; v&#224; c&#7845;u tr&#250;c b&#7897; m&#227; h&#243;a-gi&#7843;i m&#227; (attention mechanisms and the encoder-decoder structure). T&#236;m hi&#7875;u v&#7873; c&#225;c y&#7871;u t&#7889; n&#224;y s&#7869; cho ph&#233;p ch&#250;ng ta hi&#7875;u r&#245; h&#417;n v&#7873; c&#225;ch c&#225;c LLM hi&#7879;n &#273;&#7841;i nh&#432; Transformer &#273;&#432;&#7907;c hu&#7845;n luy&#7879;n (generative pre-trained transformers - GPT) ho&#7841;t &#273;&#7897;ng v&#224; v&#432;&#7907;t tr&#7897;i trong c&#225;c nhi&#7879;m v&#7909; ng&#244;n ng&#7919;.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_opH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4df9ba-e674-4933-81ef-54a2c4029458_433x373.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_opH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4df9ba-e674-4933-81ef-54a2c4029458_433x373.png 424w, https://substackcdn.com/image/fetch/$s_!_opH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4df9ba-e674-4933-81ef-54a2c4029458_433x373.png 848w, https://substackcdn.com/image/fetch/$s_!_opH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4df9ba-e674-4933-81ef-54a2c4029458_433x373.png 1272w, https://substackcdn.com/image/fetch/$s_!_opH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4df9ba-e674-4933-81ef-54a2c4029458_433x373.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_opH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4df9ba-e674-4933-81ef-54a2c4029458_433x373.png" width="433" height="373" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c4df9ba-e674-4933-81ef-54a2c4029458_433x373.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:373,&quot;width&quot;:433,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:12144,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_opH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4df9ba-e674-4933-81ef-54a2c4029458_433x373.png 424w, https://substackcdn.com/image/fetch/$s_!_opH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4df9ba-e674-4933-81ef-54a2c4029458_433x373.png 848w, https://substackcdn.com/image/fetch/$s_!_opH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4df9ba-e674-4933-81ef-54a2c4029458_433x373.png 1272w, https://substackcdn.com/image/fetch/$s_!_opH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c4df9ba-e674-4933-81ef-54a2c4029458_433x373.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">D&#7883;ch v&#259;n b&#7843;n (ti&#7871;ng Anh sang ti&#7871;ng &#272;&#7913;c) b&#7857;ng Transformer</figcaption></figure></div><h2><strong>C&#7845;u tr&#250;c c&#7911;a Transformer</strong></h2><p>Transformers c&#243; th&#7875; x&#7917; l&#253; &#273;&#7891;ng th&#7901;i c&#225;c ph&#7847;n kh&#225;c nhau c&#7911;a v&#259;n b&#7843;n &#273;&#7847;u v&#224;o, gi&#250;p c&#7843;i thi&#7879;n kh&#7843; n&#259;ng hi&#7875;u c&#7911;a m&#244; h&#236;nh v&#7873; ng&#7919; c&#7843;nh c&#7911;a v&#259;n b&#7843;n &#273;&#7847;u v&#224;o. Tr&#7885;ng t&#226;m c&#7911;a Transformer l&#224; hai nguy&#234;n t&#7855;c c&#417; b&#7843;n: s&#7917; d&#7909;ng c&#417; ch&#7871; t&#7921; ch&#250; &#253; v&#224; c&#7845;u tr&#250;c b&#7897; m&#227; h&#243;a-gi&#7843;i m&#227;. Ch&#250;ng ta h&#227;y xem x&#233;t chi ti&#7871;t c&#7843; hai th&#224;nh ph&#7847;n ch&#237;nh n&#224;y d&#432;&#7899;i &#273;&#226;y.</p><h3><strong>C&#417; ch&#7871; ch&#250; &#253; (Attention Mechanism)</strong></h3><p>&#272;&#7875; hi&#7875;u s&#7921; c&#7847;n thi&#7871;t c&#7911;a c&#417; ch&#7871; ch&#250; &#253;, tr&#432;&#7899;c ti&#234;n ch&#250;ng ta h&#227;y th&#7843;o lu&#7853;n v&#7873; ph&#7847;n nh&#250;ng. <strong>Vi&#7879;c nh&#250;ng c&#226;u ho&#7863;c t&#7915;</strong> (Sentence/word embeddings) li&#234;n k&#7871;t c&#225;c t&#7915; v&#7899;i vect&#417; sao cho c&#225;c t&#7915; t&#432;&#417;ng t&#7921; c&#243; vect&#417; t&#432;&#417;ng t&#7921;. Tuy nhi&#234;n, m&#7897;t v&#7845;n &#273;&#7873; r&#245; r&#224;ng v&#7899;i qu&#225; tr&#236;nh n&#224;y l&#224; c&#249;ng m&#7897;t t&#7915; c&#243; th&#7875; c&#243; ngh&#297;a kh&#225;c nhau trong c&#225;c ng&#7919; c&#7843;nh kh&#225;c nhau. V&#237; d&#7909;: m&#7897;t ph&#250;t c&#243; th&#7875; &#273;&#7873; c&#7853;p &#273;&#7871;n m&#7897;t &#273;&#417;n v&#7883; th&#7901;i gian v&#224; c&#361;ng c&#243; th&#7875; &#273;&#7873; c&#7853;p &#273;&#7871;n m&#7897;t c&#225;i g&#236; &#273;&#243; nh&#7887; (Footnote 1). C&#417; ch&#7871; ch&#250; &#253; c&#243; th&#7875; gi&#250;p gi&#7843;i quy&#7871;t v&#7845;n &#273;&#7873; n&#224;y v&#236; ch&#250;ng cho ph&#233;p m&#244; h&#236;nh t&#7853;p trung v&#224;o ch&#7881; m&#7897;t s&#7889; ph&#7847;n c&#7909; th&#7875; c&#7911;a v&#259;n b&#7843;n &#273;&#7847;u v&#224;o, &#273;i&#7873;u n&#224;y r&#7845;t quan tr&#7885;ng &#273;&#7875; hi&#7875;u ng&#7919; c&#7843;nh c&#7911;a b&#7845;t k&#7923; t&#225;c v&#7909; ng&#244;n ng&#7919; n&#224;o.</p><p>V&#7873; c&#417; b&#7843;n, s&#7921; ch&#250; &#253; cho ph&#233;p m&#244; h&#236;nh g&#225;n m&#7913;c &#273;&#7897; quan tr&#7885;ng kh&#225;c nhau cho c&#225;c ph&#7847;n kh&#225;c nhau c&#7911;a d&#7919; li&#7879;u &#273;&#7847;u v&#224;o. V&#237; d&#7909;: khi x&#7917; l&#253; m&#7897;t c&#226;u, m&#244; h&#236;nh c&#243; th&#7875; ch&#250; &#253; h&#417;n &#273;&#7871;n c&#225;c t&#7915; kh&#243;a quan tr&#7885;ng &#273;&#7875; hi&#7875;u &#253; ngh&#297;a t&#7893;ng th&#7875; c&#7911;a c&#226;u.</p><p><strong>T&#7921; ch&#250; &#253;</strong> (Self-attention) l&#224; m&#7897;t lo&#7841;i c&#417; ch&#7871; ch&#250; &#253; cho ph&#233;p m&#7895;i ph&#7847;n c&#7911;a chu&#7895;i &#273;&#7847;u v&#224;o c&#243; th&#7875; t&#432;&#417;ng t&#225;c v&#224; ch&#7883;u &#7843;nh h&#432;&#7903;ng c&#7911;a c&#225;c ph&#7847;n kh&#225;c. Khi x&#7917; l&#253; v&#259;n b&#7843;n, c&#417; ch&#7871; t&#7921; ch&#250; &#253; trong m&#244; h&#236;nh Transformer cho ph&#233;p n&#243; ph&#226;n t&#237;ch to&#224;n b&#7897; chu&#7895;i t&#7915; m&#7897;t c&#225;ch &#273;&#7891;ng nh&#7845;t.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!W2ML!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f864104-a19f-4fb0-a3af-1ed58d4baffd_276x92.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!W2ML!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f864104-a19f-4fb0-a3af-1ed58d4baffd_276x92.png 424w, https://substackcdn.com/image/fetch/$s_!W2ML!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f864104-a19f-4fb0-a3af-1ed58d4baffd_276x92.png 848w, https://substackcdn.com/image/fetch/$s_!W2ML!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f864104-a19f-4fb0-a3af-1ed58d4baffd_276x92.png 1272w, https://substackcdn.com/image/fetch/$s_!W2ML!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f864104-a19f-4fb0-a3af-1ed58d4baffd_276x92.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!W2ML!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f864104-a19f-4fb0-a3af-1ed58d4baffd_276x92.png" width="276" height="92" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5f864104-a19f-4fb0-a3af-1ed58d4baffd_276x92.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:92,&quot;width&quot;:276,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2597,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!W2ML!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f864104-a19f-4fb0-a3af-1ed58d4baffd_276x92.png 424w, https://substackcdn.com/image/fetch/$s_!W2ML!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f864104-a19f-4fb0-a3af-1ed58d4baffd_276x92.png 848w, https://substackcdn.com/image/fetch/$s_!W2ML!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f864104-a19f-4fb0-a3af-1ed58d4baffd_276x92.png 1272w, https://substackcdn.com/image/fetch/$s_!W2ML!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5f864104-a19f-4fb0-a3af-1ed58d4baffd_276x92.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Ch&#250; &#253;: hi&#7875;u ng&#7919; c&#7843;nh c&#7911;a v&#259;n b&#7843;n</figcaption></figure></div><p>V&#237; d&#7909;: trong c&#226;u &#8220;&#273;&#7891;ng h&#7891; c&#242;n 1 ph&#250;t&#8221;, vi&#7879;c T&#7921; Ch&#250; &#221; s&#7869; gi&#250;p m&#244; h&#236;nh quy&#7871;t &#273;&#7883;nh r&#7857;ng &#8220;ph&#250;t&#8221; &#273;&#7873; c&#7853;p &#273;&#7871;n m&#7897;t &#273;&#417;n v&#7883; th&#7901;i gian trong ng&#7919; c&#7843;nh n&#224;y. S&#7921; hi&#7875;u bi&#7871;t n&#224;y &#273;&#432;&#7907;c th&#7921;c hi&#7879;n th&#244;ng qua c&#225;c t&#237;nh to&#225;n li&#234;n quan &#273;&#7871;n truy v&#7845;n, kh&#243;a v&#224; gi&#225; tr&#7883;. M&#7895;i t&#7915; trong c&#226;u &#273;&#432;&#7907;c chuy&#7875;n th&#224;nh c&#225;c ph&#7847;n t&#7917; n&#224;y b&#7857;ng c&#225;ch s&#7917; d&#7909;ng c&#225;c tr&#7885;ng s&#7889; &#273;&#227; h&#7885;c, cho ph&#233;p m&#244; h&#236;nh &#273;&#225;nh gi&#225; m&#7913;c &#273;&#7897; li&#234;n quan ho&#7863;c m&#7913;c &#273;&#7897; ch&#250; &#253; c&#7911;a t&#7915;ng t&#7915; so v&#7899;i c&#225;c t&#7915; kh&#225;c trong c&#226;u. B&#7857;ng c&#225;ch n&#224;y, m&#244; h&#236;nh hi&#7875;u r&#7857;ng trong c&#226;u c&#7909; th&#7875; n&#224;y, &#8220;ph&#250;t&#8221; &#273;&#432;&#7907;c li&#234;n k&#7871;t v&#7899;i c&#225;c kh&#225;i ni&#7879;m v&#7873; th&#7901;i gian v&#224; m&#7913;c &#273;&#7897; kh&#7849;n c&#7845;p, &#273;&#432;&#7907;c bi&#7875;u th&#7883; b&#7857;ng &#8220;c&#242;n 1 ph&#250;t&#8221; v&#224; &#8220;tr&#234;n &#273;&#7891;ng h&#7891;&#8221;, cung c&#7845;p kh&#7843; n&#259;ng hi&#7875;u v&#259;n b&#7843;n &#273;&#7847;u v&#224;o theo ng&#7919; c&#7843;nh.</p><p>Trong Foot note 1 th&#236; c&#226;u n&#243;i <strong>Give me a minute</strong> th&#236; ng&#432;&#7907;c l&#7841;i, b&#7857;ng vi&#7879;c T&#7921; Ch&#250; &#221;, m&#244; h&#236;nh li&#234;n k&#7871;t kh&#225;i ni&#7879;m &#8220;cho t&#244;i&#8221; (Give) v&#224; v&#7883; ng&#7919; &#8220;t&#244;i&#8221;, cung c&#7845;p kh&#7843; n&#259;ng hi&#7875;u v&#259;n b&#7843;n theo ng&#7919; c&#7843;nh kh&#225;c.</p><h3><strong>B&#7897; m&#227; h&#243;a-gi&#7843;i m&#227; (Encoder-Decoder)</strong></h3><p>C&#7845;u tr&#250;c b&#7897; m&#227; h&#243;a-gi&#7843;i m&#227; l&#224; th&#224;nh ph&#7847;n n&#7873;n t&#7843;ng c&#7911;a ki&#7871;n &#8203;&#8203;tr&#250;c Transformer, &#273;&#243;ng vai tr&#242; quan tr&#7885;ng trong c&#225;ch c&#225;c m&#244; h&#236;nh n&#224;y x&#7917; l&#253; v&#224; t&#7841;o ra ng&#244;n ng&#7919;. C&#7845;u tr&#250;c th&#224;nh ph&#7847;n k&#233;p n&#224;y cho ph&#233;p m&#244; h&#236;nh x&#7917; l&#253; v&#259;n b&#7843;n &#273;&#7847;u v&#224;o th&#224;nh &#273;&#7847;u ra c&#243; &#253; ngh&#297;a m&#7897;t c&#225;ch hi&#7879;u qu&#7843;, &#273;i&#7873;u n&#224;y r&#7845;t c&#7847;n thi&#7871;t cho nhi&#7873;u t&#225;c v&#7909; ng&#244;n ng&#7919;, t&#7915; d&#7883;ch thu&#7853;t &#273;&#7871;n t&#7841;o v&#259;n b&#7843;n.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TYYm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89707174-49dd-4054-8dde-537ac04f74cd_779x458.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TYYm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89707174-49dd-4054-8dde-537ac04f74cd_779x458.png 424w, https://substackcdn.com/image/fetch/$s_!TYYm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89707174-49dd-4054-8dde-537ac04f74cd_779x458.png 848w, https://substackcdn.com/image/fetch/$s_!TYYm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89707174-49dd-4054-8dde-537ac04f74cd_779x458.png 1272w, https://substackcdn.com/image/fetch/$s_!TYYm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89707174-49dd-4054-8dde-537ac04f74cd_779x458.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TYYm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89707174-49dd-4054-8dde-537ac04f74cd_779x458.png" width="779" height="458" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/89707174-49dd-4054-8dde-537ac04f74cd_779x458.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:458,&quot;width&quot;:779,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:30560,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TYYm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89707174-49dd-4054-8dde-537ac04f74cd_779x458.png 424w, https://substackcdn.com/image/fetch/$s_!TYYm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89707174-49dd-4054-8dde-537ac04f74cd_779x458.png 848w, https://substackcdn.com/image/fetch/$s_!TYYm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89707174-49dd-4054-8dde-537ac04f74cd_779x458.png 1272w, https://substackcdn.com/image/fetch/$s_!TYYm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F89707174-49dd-4054-8dde-537ac04f74cd_779x458.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Ki&#7871;n tr&#250;c b&#7897; m&#227; h&#243;a-gi&#7843;i m&#227;</figcaption></figure></div><p>S&#417; &#273;&#7891; tr&#234;n m&#244; t&#7843; m&#7841;ng n&#417;-ron m&#227; h&#243;a-gi&#7843;i m&#227; &#273;&#7875; t&#7841;o v&#259;n b&#7843;n. C&#225;c v&#242;ng tr&#242;n m&#224;u xanh lam &#7903; b&#234;n tr&#225;i &#273;&#7841;i di&#7879;n cho c&#225;c n&#417;-ron trong m&#7841;ng l&#432;&#7899;i th&#7847;n kinh c&#7911;a b&#7897; m&#227; h&#243;a, m&#7841;ng n&#224;y ph&#226;n t&#237;ch tu&#7847;n t&#7921; v&#259;n b&#7843;n &#273;&#7847;u v&#224;o, tinh ch&#7881;nh n&#243; th&#224;nh m&#7897;t vect&#417; ng&#7919; c&#7843;nh (context vector), &#273;&#432;&#7907;c bi&#7875;u th&#7883; b&#7857;ng c&#225;c v&#242;ng tr&#242;n m&#224;u t&#237;m &#7903; gi&#7919;a. Vect&#417; n&#224;y, &#273;&#7847;u ra c&#7911;a b&#7897; m&#227; h&#243;a, l&#224; s&#7921; th&#7875; hi&#7879;n c&#244; &#273;&#7885;ng &#253; ngh&#297;a c&#7911;a &#273;&#7847;u v&#224;o v&#224; &#273;&#432;&#7907;c &#273;&#432;a v&#224;o b&#7897; gi&#7843;i m&#227; &#273;&#7875; x&#7917; l&#253; ti&#7871;p. C&#225;c v&#242;ng tr&#242;n m&#224;u xanh l&#225; c&#226;y &#7903; b&#234;n ph&#7843;i minh h&#7885;a b&#7897; gi&#7843;i m&#227;, b&#7897; gi&#7843;i m&#227; n&#224;y t&#225;i t&#7841;o l&#7841;i v&#259;n b&#7843;n m&#7841;ch l&#7841;c t&#7915; vect&#417; ng&#7919; c&#7843;nh, t&#7841;o ra phi&#234;n b&#7843;n &#273;&#227; chuy&#7875;n &#273;&#7893;i c&#7911;a &#273;&#7847;u v&#224;o ban &#273;&#7847;u, ch&#7859;ng h&#7841;n nh&#432; b&#7843;n d&#7883;ch ho&#7863;c ph&#7847;n ti&#7871;p theo. Ch&#250;ng ta h&#227;y xem x&#233;t chi ti&#7871;t h&#417;n v&#7873; b&#7897; m&#227; h&#243;a v&#224; b&#7897; gi&#7843;i m&#227; b&#234;n d&#432;&#7899;i.</p><h4><strong>B&#7897; M&#227; ho&#225; (Encoder)</strong></h4><p>B&#7897; <strong>m&#227; h&#243;a</strong> x&#7917; l&#253; v&#259;n b&#7843;n &#273;&#7847;u v&#224;o &#273;&#7875; hi&#7875;u ng&#7919; c&#7843;nh v&#224; s&#7855;c th&#225;i c&#7911;a n&#243;. N&#243; bi&#7871;n &#273;&#7893;i chu&#7895;i &#273;&#7847;u v&#224;o th&#224;nh m&#7897;t chu&#7895;i vect&#417;, m&#7895;i vect&#417; &#273;&#7841;i di&#7879;n cho c&#225;c ph&#7847;n kh&#225;c nhau c&#7911;a &#273;&#7847;u v&#224;o. B&#7897; m&#227; h&#243;a c&#243; nhi&#7873;u l&#7899;p, trong &#273;&#243; m&#7895;i l&#7899;p bao g&#7891;m hai th&#224;nh ph&#7847;n ph&#7909; ch&#237;nh: l&#7899;p t&#7921; ch&#250; &#253; (self-attention layer) v&#224; m&#7841;ng n&#417;-ron chuy&#7875;n ti&#7871;p ngu&#7891;n c&#7845;p d&#7919; li&#7879;u (feed-forward neural network). L&#7899;p <strong>t&#7921; ch&#250; &#253;</strong> s&#7917; d&#7909;ng m&#7885;i t&#7915; trong chu&#7895;i &#273;&#7847;u v&#224;o &#273;&#7875; li&#234;n h&#7879; v&#224; th&#244;ng b&#225;o c&#225;ch gi&#7843;i th&#237;ch cho m&#7885;i t&#7915; kh&#225;c. Theo &#273;&#243;, m&#7841;ng <strong>n&#417; ron chuy&#7875;n ti&#7871;p ngu&#7891;n</strong> c&#7845;p d&#7919; li&#7879;u x&#7917; l&#253; &#273;&#7847;u ra t&#7915; l&#7899;p ch&#250; &#253; b&#7857;ng c&#225;ch &#225;p d&#7909;ng c&#225;c ph&#233;p bi&#7871;n &#273;&#7893;i tuy&#7871;n t&#237;nh v&#224; k&#237;ch ho&#7841;t phi tuy&#7871;n t&#237;nh &#273;&#7875; n&#7855;m b&#7855;t c&#225;c m&#7851;u c&#417; b&#7843;n trong d&#7919; li&#7879;u. Khi v&#259;n b&#7843;n &#273;&#7847;u v&#224;o &#273;i qua c&#225;c l&#7899;p n&#224;y, n&#243; s&#7869; bi&#7871;n &#273;&#7893;i, d&#7847;n d&#7847;n tr&#7903; n&#234;n tr&#7915;u t&#432;&#7907;ng h&#417;n v&#224; phong ph&#250; h&#417;n v&#7873; ng&#7919; c&#7843;nh. V&#259;n b&#7843;n &#273;&#227; x&#7917; l&#253; n&#224;y (&#273;&#432;&#7907;c g&#7885;i l&#224; vect&#417; ng&#7919; c&#7843;nh - context vector) &#273;&#432;&#7907;c chuy&#7875;n &#273;&#7871;n b&#7897; gi&#7843;i m&#227; cho giai &#273;o&#7841;n t&#7841;o v&#259;n b&#7843;n ti&#7871;p theo th&#244;ng qua Transformer.</p><h4><strong>B&#7897; Gi&#7843;i m&#227; (Decoder)</strong></h4><p>B&#7897; <strong>gi&#7843;i m&#227;</strong> d&#7883;ch th&#244;ng tin gi&#224;u ng&#7919; c&#7843;nh do b&#7897; m&#227; h&#243;a cung c&#7845;p th&#224;nh v&#259;n b&#7843;n &#273;&#7847;u ra m&#7841;ch l&#7841;c v&#224; c&#243; &#253; ngh&#297;a. Ng&#432;&#7907;c l&#7841;i v&#7899;i c&#7845;u tr&#250;c c&#7911;a b&#7897; m&#227; h&#243;a, b&#7897; gi&#7843;i m&#227; bao g&#7891;m m&#7897;t s&#7889; l&#7899;p, ch&#7859;ng h&#7841;n nh&#432; l&#7899;p t&#7921; ch&#250; &#253; &#273;&#432;&#7907;c che gi&#7845;u (masked self-attention layer), l&#7899;p ch&#250; &#253; c&#7911;a b&#7897; m&#227; h&#243;a (encoder attention layer) v&#224; m&#7841;ng th&#7847;n kinh chuy&#7875;n ti&#7871;p ngu&#7891;n c&#7845;p d&#7919; li&#7879;u. L&#7899;p <strong>t&#7921; ch&#250; &#253; &#273;&#432;&#7907;c che gi&#7845;u</strong> &#273;&#7843;m b&#7843;o b&#7897; gi&#7843;i m&#227; ch&#7881; t&#7853;p trung v&#224;o c&#225;c t&#7915; tr&#432;&#7899;c &#273;&#243; (trong m&#7897;t t&#7847;m xa &#273;&#7911; g&#7847;n v&#224; v&#7915;a m&#7899;i, v&#237; d&#7909; trong 1 &#273;&#7871;n 2 c&#226;u g&#7847;n nh&#7845;t ch&#7913; kh&#244;ng l&#7845;y c&#225;c t&#7915; c&#243; tr&#432;&#7899;c &#273;&#243; nh&#432;ng &#7903; ch&#432;&#417;ng tr&#432;&#7899;c, quy&#7875;n tr&#432;&#7899;c), duy tr&#236; tr&#236;nh t&#7921; c&#7847;n thi&#7871;t &#273;&#7875; d&#7921; &#273;o&#225;n ch&#237;nh x&#225;c trong qu&#225; tr&#236;nh t&#7841;o v&#259;n b&#7843;n. Vi&#7879;c che gi&#7845;u n&#224;y ng&#259;n b&#7897; gi&#7843;i m&#227; nh&#236;n th&#7845;y c&#225;c ph&#7847;n trong t&#432;&#417;ng lai c&#7911;a chu&#7895;i, b&#7855;t ch&#432;&#7899;c qu&#225; tr&#236;nh hi&#7875;u ng&#244;n ng&#7919; t&#7921; nhi&#234;n c&#7911;a con ng&#432;&#7901;i, trong &#273;&#243; m&#7895;i c&#7909;m t&#7915; &#273;&#432;&#7907;c di&#7877;n gi&#7843;i trong ng&#7919; c&#7843;nh c&#7911;a nh&#7919;ng g&#236; &#273;&#227; &#273;&#432;&#7907;c n&#243;i m&#224; kh&#244;ng c&#7847;n bi&#7871;t tr&#432;&#7899;c c&#225;c t&#7915; trong t&#432;&#417;ng lai. (Foot note 2)</p><p>Trong khi &#273;&#243;, <strong>l&#7899;p ch&#250; &#253; c&#7911;a b&#7897; m&#227; h&#243;a</strong> gi&#250;p t&#237;ch h&#7907;p ng&#7919; c&#7843;nh do b&#7897; m&#227; h&#243;a cung c&#7845;p b&#7857;ng c&#225;ch cho ph&#233;p b&#7897; gi&#7843;i m&#227; t&#7853;p trung v&#224;o c&#225;c ph&#7847;n c&#243; li&#234;n quan c&#7911;a chu&#7895;i &#273;&#7847;u v&#224;o khi n&#243; t&#7841;o ra t&#7915;ng t&#7915; c&#7911;a &#273;&#7847;u ra. &#272;i&#7873;u n&#224;y gi&#250;p t&#7841;o ra k&#7871;t qu&#7843; &#273;&#7847;u ra ph&#249; h&#7907;p v&#7873; m&#7863;t ng&#7919; c&#7843;nh v&#7899;i &#273;&#7847;u v&#224;o.</p><p>Th&#224;nh ph&#7847;n cu&#7889;i c&#249;ng, m&#7841;ng n&#417; ron chuy&#7875;n ti&#7871;p ngu&#7891;n c&#7845;p d&#7919; li&#7879;u, ho&#7841;t &#273;&#7897;ng t&#432;&#417;ng t&#7921; nh&#432; th&#224;nh ph&#7847;n trong b&#7897; m&#227; h&#243;a, tinh ch&#7881;nh th&#234;m t&#7915;ng t&#7915; do b&#7897; gi&#7843;i m&#227; t&#7841;o ra b&#7857;ng c&#225;ch &#225;p d&#7909;ng c&#7843; ph&#233;p bi&#7871;n &#273;&#7893;i tuy&#7871;n t&#237;nh v&#224; phi tuy&#7871;n t&#237;nh.</p><p>K&#7871;t h&#7907;p l&#7841;i, c&#225;c l&#7899;p v&#224; th&#224;nh ph&#7847;n n&#224;y ho&#7841;t &#273;&#7897;ng c&#249;ng nhau trong ki&#7871;n &#8203;&#8203;tr&#250;c Transformer &#273;&#7875; t&#7841;o ra c&#225;c &#273;&#7847;u ra nh&#7853;n bi&#7871;t theo ng&#7919; c&#7843;nh cho v&#259;n b&#7843;n &#273;&#7847;u v&#224;o.</p><div><hr></div><p><strong>[Foot note]</strong></p><ol><li><p>Trong ti&#7871;ng Anh c&#243; c&#226;u n&#243;i: <em><strong>Give me a minute</strong></em> th&#236; &#8220;a minute&#8221; &#273;&#7875; ch&#7881; t&#237;nh t&#7915; m&#7897;t kho&#7843;ng th&#7901;i gian ng&#7855;n ch&#7913; kh&#244;ng c&#243; ngh&#297;a &#273;en ch&#237;nh x&#225;c m&#7897;t ph&#250;t nh&#432; l&#224; m&#7897;t &#273;&#417;n v&#7883; &#273;o th&#7901;i gian. Trong ti&#7871;ng Vi&#7879;t g&#7885;i hi&#7879;n t&#432;&#7907;ng n&#224;y l&#224; &#273;&#7891;ng &#226;m kh&#225;c ngh&#297;a, 2 t&#7915; &#273;&#7891;ng &#226;m kh&#225;c ngh&#297;a s&#7869; d&#7851;n &#273;&#7871;n c&#243; c&#249;ng vect&#417; (xem l&#7841;i ph&#7847;n <em>C&#417; ch&#7871; ch&#250; &#253; (Attention Mechanism)</em>). T&#7915; &#273;&#7891;ng &#226;m kh&#225;c ngh&#297;a l&#224; m&#7897;t lo&#7841;i nhi&#7877;u, nhi&#7873;u n&#224;y &#273;&#432;&#7907;c kh&#7917; b&#7903;i c&#417; ch&#7871; T&#7921; Ch&#250; &#221;- Self Attention Machanism.</p></li><li><p>M&#7901;i b&#7841;n &#273;&#7885;c th&#234;m v&#7873; <strong><a href="https://blog.dragdrop.vn/p/dinh-nghia-ve-mo-hinh-ngon-ngu-lon-llm">N&#7855;m b&#7855;t ph&#7909; thu&#7897;c t&#7847;m xa</a></strong></p></li></ol><div><hr></div><p><em>H&#7871;t B&#224;i 2-Ch&#432;&#417;ng 2</em></p><p>&#272;&#7875; &#273;&#7885;c h&#7871;t Series, vui l&#242;ng xem l&#7841;i Kh&#243;a h&#7885;c V&#7905; L&#242;ng: M&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n (LLM)</p>]]></content:encoded></item><item><title><![CDATA[Định nghĩa về Mô hình ngôn ngữ lớn (LLM)]]></title><description><![CDATA[B&#7841;n s&#7869; l&#224;m quen v&#7899;i c&#225;c m&#244; h&#236;nh ng&#244;n ng&#7919; v&#224; th&#7871; n&#224;o l&#224; m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n.]]></description><link>https://blog.dragdrop.vn/p/dinh-nghia-ve-mo-hinh-ngon-ngu-lon-llm</link><guid isPermaLink="false">https://blog.dragdrop.vn/p/dinh-nghia-ve-mo-hinh-ngon-ngu-lon-llm</guid><dc:creator><![CDATA[Khởi]]></dc:creator><pubDate>Sun, 19 May 2024 00:24:21 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/2d331d90-472e-41a5-93b0-1072da0b93b4_580x436.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1>1. T&#7893;ng quan</h1><p>H&#227;y t&#432;&#7903;ng t&#432;&#7907;ng m&#7897;t cu&#7897;c tr&#242; chuy&#7879;n v&#7899;i m&#7897;t ng&#432;&#7901;i b&#7841;n, trong &#273;&#243; ng&#432;&#7901;i b&#7841;n &#273;&#243; b&#7855;t &#273;&#7847;u c&#226;u b&#7857;ng: &#8220;T&#244;i &#273;&#7883;nh pha m&#7897;t c&#7889;c ________.&#8221; Con ng&#432;&#7901;i c&#243; th&#7875; d&#7921; &#273;o&#225;n r&#7857;ng t&#7915; ti&#7871;p theo c&#243; th&#7875; l&#224; c&#224; ph&#234; ho&#7863;c tr&#224; d&#7921;a tr&#234;n ki&#7871;n &#8203;&#8203;th&#7913;c c&#7911;a h&#7885; v&#7873; c&#225;c l&#7921;a ch&#7885;n &#273;&#7891; u&#7889;ng th&#244;ng th&#432;&#7901;ng.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Bxel!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03b973c-760a-4120-ae7e-2957be6683ea_619x206.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Bxel!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03b973c-760a-4120-ae7e-2957be6683ea_619x206.png 424w, https://substackcdn.com/image/fetch/$s_!Bxel!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03b973c-760a-4120-ae7e-2957be6683ea_619x206.png 848w, https://substackcdn.com/image/fetch/$s_!Bxel!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03b973c-760a-4120-ae7e-2957be6683ea_619x206.png 1272w, https://substackcdn.com/image/fetch/$s_!Bxel!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03b973c-760a-4120-ae7e-2957be6683ea_619x206.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Bxel!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03b973c-760a-4120-ae7e-2957be6683ea_619x206.png" width="619" height="206" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e03b973c-760a-4120-ae7e-2957be6683ea_619x206.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:206,&quot;width&quot;:619,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:65013,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Bxel!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03b973c-760a-4120-ae7e-2957be6683ea_619x206.png 424w, https://substackcdn.com/image/fetch/$s_!Bxel!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03b973c-760a-4120-ae7e-2957be6683ea_619x206.png 848w, https://substackcdn.com/image/fetch/$s_!Bxel!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03b973c-760a-4120-ae7e-2957be6683ea_619x206.png 1272w, https://substackcdn.com/image/fetch/$s_!Bxel!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe03b973c-760a-4120-ae7e-2957be6683ea_619x206.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p>T&#432;&#417;ng t&#7921;, m&#7897;t m&#244; h&#236;nh ng&#244;n ng&#7919; &#273;&#432;&#7907;c &#273;&#224;o t&#7841;o &#273;&#7875; hi&#7875;u v&#224; d&#7921; &#273;o&#225;n t&#7915; ti&#7871;p theo theo tr&#236;nh t&#7921; d&#7921;a tr&#234;n ng&#7919; c&#7843;nh c&#7911;a c&#225;c t&#7915; tr&#432;&#7899;c &#273;&#243;. N&#243; h&#7885;c t&#7915; m&#7897;t l&#432;&#7907;ng l&#7899;n d&#7919; li&#7879;u v&#259;n b&#7843;n v&#224; c&#243; th&#7875; &#273;&#432;a ra nh&#7919;ng d&#7921; &#273;o&#225;n s&#225;ng su&#7889;t v&#7873; t&#7915; n&#224;o c&#243; th&#7875; s&#7869; xu&#7845;t hi&#7879;n ti&#7871;p theo trong m&#7897;t ng&#7919; c&#7843;nh nh&#7845;t &#273;&#7883;nh.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.dragdrop.vn/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading DragDrop.VN- Gi&#250;p b&#7841;n d&#7851;n &#273;&#7847;u v&#7899;i Micro Software! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p>Tr&#432;&#7899;c khi &#273;i v&#224;o chi ti&#7871;t h&#417;n, tr&#432;&#7899;c ti&#234;n ch&#250;ng ta h&#227;y th&#7843;o lu&#7853;n v&#7873; m&#244; h&#236;nh ng&#244;n ng&#7919; l&#224; g&#236;.</p><h1>2. M&#244; h&#236;nh ng&#244;n ng&#7919;</h1><p>M&#244; <strong>h&#236;nh ng&#244;n ng&#7919; </strong>(Language Model, vi&#7871;t t&#7855;t l&#224; LM) c&#243; th&#7875; &#273;&#432;&#7907;c &#273;&#7883;nh ngh&#297;a l&#224; m&#244; h&#236;nh x&#225;c su&#7845;t g&#225;n x&#225;c su&#7845;t cho chu&#7895;i t&#7915; ho&#7863;c m&#227; th&#244;ng b&#225;o trong m&#7897;t ng&#244;n ng&#7919; nh&#7845;t &#273;&#7883;nh. M&#7909;c &#273;&#237;ch l&#224; n&#7855;m b&#7855;t c&#7845;u tr&#250;c v&#224; m&#244; h&#236;nh c&#7911;a ng&#244;n ng&#7919; &#273;&#7875; d&#7921; &#273;o&#225;n kh&#7843; n&#259;ng x&#7843;y ra c&#7911;a m&#7897;t chu&#7895;i t&#7915; c&#7909; th&#7875;.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1zo0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4df4da-23ca-416f-ae70-1c7d4d35bc62_307x283.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1zo0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4df4da-23ca-416f-ae70-1c7d4d35bc62_307x283.png 424w, https://substackcdn.com/image/fetch/$s_!1zo0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4df4da-23ca-416f-ae70-1c7d4d35bc62_307x283.png 848w, https://substackcdn.com/image/fetch/$s_!1zo0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4df4da-23ca-416f-ae70-1c7d4d35bc62_307x283.png 1272w, https://substackcdn.com/image/fetch/$s_!1zo0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4df4da-23ca-416f-ae70-1c7d4d35bc62_307x283.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1zo0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4df4da-23ca-416f-ae70-1c7d4d35bc62_307x283.png" width="307" height="283" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cc4df4da-23ca-416f-ae70-1c7d4d35bc62_307x283.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:283,&quot;width&quot;:307,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:54008,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1zo0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4df4da-23ca-416f-ae70-1c7d4d35bc62_307x283.png 424w, https://substackcdn.com/image/fetch/$s_!1zo0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4df4da-23ca-416f-ae70-1c7d4d35bc62_307x283.png 848w, https://substackcdn.com/image/fetch/$s_!1zo0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4df4da-23ca-416f-ae70-1c7d4d35bc62_307x283.png 1272w, https://substackcdn.com/image/fetch/$s_!1zo0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4df4da-23ca-416f-ae70-1c7d4d35bc62_307x283.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Gi&#7843; s&#7917; ch&#250;ng ta c&#243; v&#7889;n t&#7915; v&#7921;ng <em><strong>V</strong> </em>c&#243; ch&#7913;a m&#7897;t chu&#7895;i c&#225;c t&#7915; (g&#7885;i l&#224; m&#227; th&#244;ng b&#225;o hay token) &#273;&#432;&#7907;c k&#253; hi&#7879;u l&#224; <em>w</em>1&#8203;,<em>w</em>2&#8203;,&#8230;<em>wn</em>. &#7902; &#273;&#226;y <em><strong>N</strong> </em>l&#224; &#273;&#7897; d&#224;i c&#7911;a chu&#7895;i. M&#244; h&#236;nh ng&#244;n ng&#7919; &#7845;n &#273;&#7883;nh x&#225;c su&#7845;t (<em><strong>p</strong></em>) v&#7899;i m&#7885;i tr&#236;nh t&#7921; ho&#7863;c th&#7913; t&#7921; c&#243; th&#7875; c&#243; c&#7911;a c&#225;c t&#7915; thu&#7897;c b&#7897; t&#7915; v&#7921;ng (<em><strong>V</strong></em>) .</p><p>K&#253; hi&#7879;u x&#225;c su&#7845;t c&#7911;a m&#7897;t chu&#7895;i t&#7915; c&#243; th&#7875; &#273;&#432;&#7907;c bi&#7875;u th&#7883; nh&#432; sau:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;p ( w_1, w_2, \\ldots, w_N)&quot;,&quot;id&quot;:&quot;IYDUULGNOI&quot;}" data-component-name="LatexBlockToDOM"></div><h2>2.1. V&#237; d&#7909;</h2><p>Gi&#7843; s&#7917; ch&#250;ng ta c&#243; b&#7897; t&#7915; v&#7921;ng:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;V= \\{ chase,the,cat,the,mouse \\}&quot;,&quot;id&quot;:&quot;IZRDKHLJJL&quot;}" data-component-name="LatexBlockToDOM"></div><p>v&#224; ch&#250;ng ta c&#243; c&#225;c x&#225;c xu&#7845;t gi&#7843; &#273;&#7883;nh c&#7911;a c&#225;c chu&#7895;i t&#7915; c&#243; th&#7913; t&#7921; xu&#7845;t hi&#7879;n tr&#7885;ng th&#7921;c t&#7871;:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;p\\{chase, the, cat, the, mouse\\}=0.0001&quot;,&quot;id&quot;:&quot;WOLYRQPBVN&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;p\\{the, chase, cat, the, mouse\\}=0.003&quot;,&quot;id&quot;:&quot;LXVWKIFQNY&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;p\\{chase, the, mouse, the, cat\\}=0.0021&quot;,&quot;id&quot;:&quot;WEDGXPRFSJ&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;p\\{the, cat, chase, the, mouse\\}=0.02&quot;,&quot;id&quot;:&quot;NIPHZMWCIW&quot;}" data-component-name="LatexBlockToDOM"></div><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;p\\{the, mouse, chase, the, cat\\}=0.01&quot;,&quot;id&quot;:&quot;GOARNCUDGD&quot;}" data-component-name="LatexBlockToDOM"></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MMlK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1d7390e-5b8d-4fdb-9291-8b739c51f4fa_362x180.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MMlK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1d7390e-5b8d-4fdb-9291-8b739c51f4fa_362x180.png 424w, https://substackcdn.com/image/fetch/$s_!MMlK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1d7390e-5b8d-4fdb-9291-8b739c51f4fa_362x180.png 848w, https://substackcdn.com/image/fetch/$s_!MMlK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1d7390e-5b8d-4fdb-9291-8b739c51f4fa_362x180.png 1272w, https://substackcdn.com/image/fetch/$s_!MMlK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1d7390e-5b8d-4fdb-9291-8b739c51f4fa_362x180.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MMlK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1d7390e-5b8d-4fdb-9291-8b739c51f4fa_362x180.png" width="362" height="180" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1d7390e-5b8d-4fdb-9291-8b739c51f4fa_362x180.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:180,&quot;width&quot;:362,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:28706,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MMlK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1d7390e-5b8d-4fdb-9291-8b739c51f4fa_362x180.png 424w, https://substackcdn.com/image/fetch/$s_!MMlK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1d7390e-5b8d-4fdb-9291-8b739c51f4fa_362x180.png 848w, https://substackcdn.com/image/fetch/$s_!MMlK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1d7390e-5b8d-4fdb-9291-8b739c51f4fa_362x180.png 1272w, https://substackcdn.com/image/fetch/$s_!MMlK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1d7390e-5b8d-4fdb-9291-8b739c51f4fa_362x180.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p><p>T&#7915; k&#7871;t qu&#7843; x&#225;c xu&#7845;t b&#234;n tr&#234;n, ta c&#243; th&#7875; nh&#236;n th&#7845;y r&#7857;ng s&#7921; xu&#7845;t hi&#7879;n c&#7911;a chu&#7895;i th&#7913; t&#7921; <strong>the, cat, chase, the, mouse</strong> c&#243; x&#225;c xu&#7845;t cao nh&#7845;t.</p><blockquote><p><strong>L&#432;u &#253;:</strong> C&#225;c m&#244; h&#236;nh ng&#244;n ng&#7919; ph&#7843;i c&#243; ki&#7871;n &#8203;&#8203;th&#7913;c b&#234;n ngo&#224;i th&#236; m&#7899;i c&#243; th&#7875; g&#225;n c&#225;c x&#225;c su&#7845;t c&#243; &#253; ngh&#297;a; do &#273;&#243;, ch&#250;ng ph&#7843;i &#273;&#432;&#7907;c &#273;&#224;o t&#7841;o (hay c&#242;n g&#7885;i l&#224; hu&#7845;n luy&#7879;n, ti&#7871;ng anh l&#224; training). Trong qu&#225; tr&#236;nh &#273;&#224;o t&#7841;o n&#224;y, m&#244; h&#236;nh h&#7885;c c&#225;ch g&#225;n x&#225;c su&#7845;t cao h&#417;n cho c&#225;c t&#7915; c&#243; nhi&#7873;u kh&#7843; n&#259;ng tu&#226;n theo m&#7897;t ng&#7919; c&#7843;nh nh&#7845;t &#273;&#7883;nh. Sau khi &#273;&#224;o t&#7841;o, m&#244; h&#236;nh ng&#244;n ng&#7919; c&#243; th&#7875; t&#7841;o v&#259;n b&#7843;n b&#7857;ng c&#225;ch l&#7845;y m&#7851;u c&#225;c t&#7915; d&#7921;a tr&#234;n c&#225;c x&#225;c su&#7845;t &#273;&#227; h&#7885;c n&#224;y.</p></blockquote><h2>2.2. S&#7921; d&#7921; &#273;o&#225;n (Prediction)</h2><p>Ch&#250;ng ta c&#361;ng c&#243; th&#7875; d&#7921; &#273;o&#225;n m&#7897;t t&#7915; theo m&#7897;t chu&#7895;i. M&#7897;t m&#244; h&#236;nh ng&#244;n ng&#7919; &#432;&#7899;c t&#237;nh x&#225;c su&#7845;t n&#224;y b&#7857;ng c&#225;ch xem x&#233;t c&#225;c x&#225;c su&#7845;t c&#243; &#273;i&#7873;u ki&#7879;n (conditional probability) c&#7911;a m&#7895;i t&#7915; d&#7921;a tr&#234;n c&#225;c t&#7915; tr&#432;&#7899;c &#273;&#243; trong chu&#7895;i. S&#7917; d&#7909;ng quy t&#7855;c x&#225;c su&#7845;t chu&#7895;i (chain rule of probability), n&#234;n x&#225;c su&#7845;t chung c&#7911;a chu&#7895;i c&#243; th&#7875; &#273;&#432;&#7907;c ph&#226;n t&#225;ch th&#224;nh:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;p ( w \n1\n&#8203;\n ,w \n2\n&#8203;\n ,&#8230;,w \nN\n&#8203;\n )=p ( w \n1\n&#8203;\n )&#8901;p ( w \n2\n&#8203;\n &#8739; w \n1\n&#8203;\n )&#8901;p ( w \n3\n&#8203;\n &#8739; w \n1\n&#8203;\n ,w \n2\n&#8203;\n ) .&#8230;p ( w \nN\n&#8203;\n &#8739; w \n1\n&#8203;\n ,w \n2\n&#8203;\n ,&#8230;,w \nn - 1\n&#8203;\n )&quot;,&quot;id&quot;:&quot;LEJQVVOWEE&quot;}" data-component-name="LatexBlockToDOM"></div><p>trong &#273;&#243;:</p><pre><code>p(w1): l&#224; x&#225;c xu&#7845;t xu&#7845;t hi&#7879;n c&#7911;a t&#7915; w1
p(w2|w1): l&#224; x&#225;c xu&#7845;t c&#7911;a t&#7915; w2 khi theo sau w1
p(w3|w1,w2): l&#224; x&#225;c xu&#7845;t xu&#7845;t hi&#7879;n c&#7911;a t&#7915; w3 theo sau chu&#7895;i w1, w2</code></pre><h2>2.3. N-gram language model</h2><p>M&#244; h&#236;nh N-gram l&#224; m&#7897;t lo&#7841;i m&#244; h&#236;nh ng&#244;n ng&#7919; x&#225;c su&#7845;t &#273;&#432;&#7907;c s&#7917; d&#7909;ng trong x&#7917; l&#253; ng&#244;n ng&#7919; t&#7921; nhi&#234;n v&#224; ng&#244;n ng&#7919; h&#7885;c t&#237;nh to&#225;n. Nh&#7919;ng m&#244; h&#236;nh n&#224;y d&#7921;a tr&#234;n &#253; t&#432;&#7903;ng r&#7857;ng x&#225;c su&#7845;t c&#7911;a m&#7897;t t&#7915; ph&#7909; thu&#7897;c v&#224;o n - 1 t&#7915; tr&#432;&#7899;c &#273;&#243;. Thu&#7853;t ng&#7919; &#8220;n-gram&#8221; d&#249;ng &#273;&#7875; ch&#7881; m&#7897;t chu&#7895;i li&#234;n ti&#7871;p c&#225;c &#119899; t&#7915;.</p><p>V&#237; d&#7909;, h&#227;y xem x&#233;t c&#226;u sau: T&#244;i th&#237;ch ng&#7855;m hoa v&#224;ng.</p><ul><li><p>Unigram (1-gram): &#8220;T&#244;i&#8221;, &#8220;th&#237;ch&#8221;, &#8220;ng&#7855;m&#8221;, &#8220;hoa&#8221;, &#8220;v&#224;ng&#8221;.</p></li><li><p>Bigram (2-gram): &#8220;T&#244;i th&#237;ch&#8221;, &#8220;th&#237;ch ng&#7855;m&#8221;, &#8220;ng&#7855;m hoa&#8221;, &#8220;hoa v&#224;ng&#8221;.</p></li><li><p>Trigram (3-gram): &#8220;T&#244;i th&#237;ch ng&#7855;m&#8221;, &#8220;th&#237;ch ng&#7855;m hoa&#8221;, &#8220;ng&#7855;m hoa v&#224;ng&#8221;.</p></li><li><p>4-gram: &#8220;T&#244;i th&#237;ch ng&#7855;m hoa&#8221;, &#8220;th&#237;ch ng&#7855;m hoa v&#224;ng&#8221;.</p></li><li><p>5-gram: &#8220;T&#244;i th&#237;ch ng&#7855;m hoa v&#224;ng&#8221;.</p></li></ul><p>C&#225;c m&#244; h&#236;nh N-gram &#273;&#417;n gi&#7843;n v&#224; hi&#7879;u qu&#7843; v&#7873; m&#7863;t t&#237;nh to&#225;n, khi&#7871;n ch&#250;ng ph&#249; h&#7907;p v&#7899;i nhi&#7873;u t&#225;c v&#7909; x&#7917; l&#253; ng&#244;n ng&#7919; t&#7921; nhi&#234;n kh&#225;c nhau. Tuy nhi&#234;n, nh&#7919;ng h&#7841;n ch&#7871; c&#7911;a ch&#250;ng bao g&#7891;m kh&#244;ng c&#243; kh&#7843; n&#259;ng n&#7855;m b&#7855;t &#273;&#432;&#7907;c s&#7921; ph&#7909; thu&#7897;c t&#7847;m xa trong ng&#244;n ng&#7919; (Footnote 1) v&#224; v&#7845;n &#273;&#7873; th&#432;a th&#7899;t khi x&#7917; l&#253; c&#225;c N-gram b&#7853;c cao h&#417;n (Footnote 2) </p><p>Thu&#7853;t to&#225;n c&#7911;a N-Gram nh&#432; sau:</p><ol><li><p><strong>M&#227; th&#244;ng b&#225;o (Tokenization):</strong> Chia v&#259;n b&#7843;n &#273;&#7847;u v&#224;o th&#224;nh c&#225;c t&#7915; ho&#7863;c m&#227; th&#244;ng b&#225;o ri&#234;ng l&#7867; (g&#7885;i l&#224; token).</p></li><li><p><strong>T&#7841;o N-gram (N-gram generation):</strong> T&#7841;o n-gram b&#7857;ng c&#225;ch h&#236;nh th&#224;nh c&#225;c chu&#7895;i N t&#7915; li&#234;n ti&#7871;p t&#7915; v&#259;n b&#7843;n &#273;&#432;&#7907;c m&#227; h&#243;a.</p></li><li><p><strong>&#272;&#7871;m t&#7847;n s&#7889; (Frequency Counting):</strong> &#272;&#7871;m s&#7889; l&#7847;n xu&#7845;t hi&#7879;n c&#7911;a t&#7915;ng N-gram trong kho d&#7919; li&#7879;u hu&#7845;n luy&#7879;n.</p></li><li><p><strong>&#431;&#7899;c t&#237;nh x&#225;c su&#7845;t (Probability estimation):</strong> T&#237;nh x&#225;c su&#7845;t c&#243; &#273;i&#7873;u ki&#7879;n c&#7911;a m&#7895;i t&#7915; d&#7921;a tr&#234;n n-1 c&#225;c t&#7915; cho tr&#432;&#7899;c b&#7857;ng c&#225;ch s&#7917; d&#7909;ng &#273;&#7871;m l&#432;&#7907;t xu&#7845;t hi&#7879;n.</p></li><li><p><strong>L&#224;m m&#7883;n (Smoothing) (t&#249;y ch&#7885;n):</strong> &#193;p d&#7909;ng c&#225;c k&#7929; thu&#7853;t l&#224;m m&#7883;n &#273;&#7875; x&#7917; l&#253; c&#225;c n-gram kh&#244;ng nh&#236;n th&#7845;y (Footnote 1) v&#224; tr&#225;nh x&#225;c su&#7845;t b&#7857;ng 0 (Footnote 2).</p></li><li><p><strong>T&#7841;o v&#259;n b&#7843;n (Text generation):</strong> B&#7855;t &#273;&#7847;u v&#7899;i m&#7897;t b&#7897; h&#7841;t gi&#7889;ng ban &#273;&#7847;u N-1 t&#7915; ban &#273;&#7847;u, d&#7921; &#273;o&#225;n t&#7915; ti&#7871;p theo d&#7921;a tr&#234;n x&#225;c su&#7845;t v&#224; l&#7863;p l&#7841;i t&#7841;o ra c&#225;c t&#7915; ti&#7871;p theo &#273;&#7875; t&#7841;o th&#224;nh m&#7897;t chu&#7895;i.</p></li><li><p><strong>L&#7863;p l&#7841;i:</strong> Ti&#7871;p t&#7909;c t&#7841;o t&#7915; cho &#273;&#7871;n khi &#273;&#7841;t &#273;&#432;&#7907;c &#273;&#7897; d&#224;i mong mu&#7889;n ho&#7863;c &#273;&#7841;t &#273;&#7871;n &#273;i&#7873;u ki&#7879;n d&#7915;ng.</p></li></ol><p>H&#227;y xem m&#7897;t v&#237; d&#7909; th&#7921;c t&#7871;:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!b_w1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F775a44db-f369-40a0-a960-6e10879b9020_742x1069.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!b_w1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F775a44db-f369-40a0-a960-6e10879b9020_742x1069.png 424w, https://substackcdn.com/image/fetch/$s_!b_w1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F775a44db-f369-40a0-a960-6e10879b9020_742x1069.png 848w, https://substackcdn.com/image/fetch/$s_!b_w1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F775a44db-f369-40a0-a960-6e10879b9020_742x1069.png 1272w, https://substackcdn.com/image/fetch/$s_!b_w1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F775a44db-f369-40a0-a960-6e10879b9020_742x1069.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!b_w1!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F775a44db-f369-40a0-a960-6e10879b9020_742x1069.png" width="1200" height="1728.8409703504044" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/775a44db-f369-40a0-a960-6e10879b9020_742x1069.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:1069,&quot;width&quot;:742,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:80526,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!b_w1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F775a44db-f369-40a0-a960-6e10879b9020_742x1069.png 424w, https://substackcdn.com/image/fetch/$s_!b_w1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F775a44db-f369-40a0-a960-6e10879b9020_742x1069.png 848w, https://substackcdn.com/image/fetch/$s_!b_w1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F775a44db-f369-40a0-a960-6e10879b9020_742x1069.png 1272w, https://substackcdn.com/image/fetch/$s_!b_w1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F775a44db-f369-40a0-a960-6e10879b9020_742x1069.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Xem chi ti&#7871;t, d&#7877; nh&#236;n h&#417;n, ho&#7863;c b&#7841;n c&#361;ng c&#243; th&#7875; clone code v&#7873; ch&#7841;y th&#7917; t&#7841;i <a href="https://github.com/DragDrop-JSC/large-language-model-course/blob/main/main.py">Github c&#7911;a DragDrop JSC</a></figcaption></figure></div><p>Gi&#7843;i th&#237;ch code:</p><ul><li><p><strong>D&#242;ng 1:</strong> Import <strong>random </strong>m&#244;-&#273;un &#273;&#7875; t&#7841;o &#273;i&#7873;u ki&#7879;n cho c&#225;c l&#7921;a ch&#7885;n ng&#7851;u nhi&#234;n trong qu&#225; tr&#236;nh t&#7841;o v&#259;n b&#7843;n.</p></li><li><p><strong>D&#242;ng 3:</strong> Ch&#250;ng ta t&#7841;o m&#7897;t class &#273;&#432;&#7907;c &#273;&#7863;t t&#234;n <strong>NGramLanguageModel</strong><code> </code>&#273;&#7875; g&#243;i g&#7885;n ch&#7913;c n&#259;ng c&#7911;a m&#244; h&#236;nh ng&#244;n ng&#7919; N-gram.</p></li><li><p><strong>D&#242;ng 4&#8211;7:</strong> Ch&#250;ng ta kh&#7903;i t&#7841;o m&#7897;t s&#7889; bi&#7871;n c&#7847;n thi&#7871;t cho class, kh&#7903;i t&#7841;o s&#7889; <strong>N</strong> cho m&#244; h&#236;nh <strong>N</strong>-gram, dictionary <strong>ngrams </strong>v&#224; danh s&#225;ch c&#225;c m&#227; th&#244;ng b&#225;o gi&#7843; &#273;&#7875; &#273;&#7879;m cho chu&#7895;i N token. Bi&#7871;n <strong>start_token </strong>d&#249;ng &#273;&#7875; cung c&#7845;p ng&#7919; c&#7843;nh cho ph&#7847;n &#273;&#7847;u c&#7911;a c&#226;u khi kh&#244;ng c&#243; &#273;&#7911; t&#7915; &#273;&#7913;ng tr&#432;&#7899;c &#273;&#7875; t&#7841;o th&#224;nh m&#7897;t N-gram ho&#224;n ch&#7881;nh. &#272;i&#7873;u n&#224;y &#273;&#7843;m b&#7843;o vi&#7879;c t&#7841;o ra v&#259;n b&#7843;n m&#7841;ch l&#7841;c v&#224; nh&#7845;t qu&#225;n.</p></li><li><p><strong>D&#242;ng 9&#8211;17:</strong> Ch&#250;ng ta x&#225;c &#273;&#7883;nh m&#7897;t ph&#432;&#417;ng th&#7913;c &#273;&#432;&#7907;c &#273;&#7863;t t&#234;n <strong>train</strong><code> </code>&#273;&#7875; hu&#7845;n luy&#7879;n m&#244; h&#236;nh ng&#244;n ng&#7919; tr&#234;n m&#7897;t kho v&#259;n b&#7843;n nh&#7845;t &#273;&#7883;nh. Sau &#273;&#243;, ch&#250;ng t&#244;i l&#7863;p l&#7841;i t&#7915;ng c&#226;u trong kho v&#259;n b&#7843;n &#273;&#432;&#7907;c cung c&#7845;p. Ch&#250;ng t&#244;i m&#227; h&#243;a c&#226;u b&#7857;ng c&#225;ch th&#234;m m&#227; th&#244;ng b&#225;o b&#7855;t &#273;&#7847;u, chia c&#226;u &#273;&#243; th&#224;nh c&#225;c t&#7915; ri&#234;ng l&#7867; v&#224; th&#234;m m&#227; th&#244;ng b&#225;o k&#7871;t th&#250;c. H&#417;n n&#7919;a, ch&#250;ng ta l&#7863;p qua c&#226;u &#273;&#7875; t&#7841;o ra N-gram b&#7857;ng c&#225;ch xem x&#233;t c&#225;c chu&#7895;i c&#243; &#273;&#7897; d&#224;i <code>N</code>. Ch&#250;ng t&#244;i tr&#237;ch xu&#7845;t N-gram hi&#7879;n t&#7841;i d&#432;&#7899;i d&#7841;ng m&#7897;t b&#7897; d&#7919; li&#7879;u t&#7915; chu&#7895;i m&#227; th&#244;ng b&#225;o v&#224; c&#7853;p nh&#7853;t s&#7889; t&#7847;n s&#7889; c&#7911;a N-gram hi&#7879;n t&#7841;i trong bi&#7871;n dictionary <strong>ngrams</strong>.</p></li><li><p><strong>D&#242;ng 19&#8211;34:</strong> Ch&#250;ng ta x&#225;c &#273;&#7883;nh m&#7897;t ph&#432;&#417;ng th&#7913;c &#273;&#432;&#7907;c &#273;&#7863;t t&#234;n <strong>generate_text </strong>&#273;&#7875; t&#7841;o v&#259;n b&#7843;n d&#7921;a tr&#234;n m&#244; h&#236;nh ng&#244;n ng&#7919; &#273;&#432;&#7907;c &#273;&#224;o t&#7841;o, b&#7855;t &#273;&#7847;u b&#7857;ng v&#259;n b&#7843;n g&#7889;c.</p></li><li><p><strong>D&#242;ng 37&#8211;53:</strong> Ch&#250;ng ta x&#225;c &#273;&#7883;nh kho ng&#7919; li&#7879;u &#273;&#7875; &#273;&#224;o t&#7841;o v&#224; ki&#7875;m tra m&#244; h&#236;nh ng&#244;n ng&#7919;. Sau &#273;&#243;, ch&#250;ng ta t&#7841;o m&#7897;t th&#7875; hi&#7879;n c&#7911;a class NGramLanguageModel  v&#7899;i <em>N = 2</em><code> </code>v&#224; hu&#7845;n luy&#7879;n n&#243; tr&#234;n kho v&#259;n b&#7843;n. Ti&#7871;p theo, ch&#250;ng t&#244;i ch&#7881; &#273;&#7883;nh t&#7915; h&#7841;t gi&#7889;ng, t&#7841;o v&#259;n b&#7843;n d&#7921;a tr&#234;n m&#244; h&#236;nh &#273;&#432;&#7907;c &#273;&#224;o t&#7841;o v&#224; in c&#7843; c&#225;c t&#7915; h&#7841;t gi&#7889;ng v&#224; v&#259;n b&#7843;n &#273;&#432;&#7907;c t&#7841;o.</p></li></ul><h1>3. M&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n</h1><p>C&#225;c m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n (LLM) l&#224; c&#225;c m&#244; h&#236;nh x&#7917; l&#253; ng&#244;n ng&#7919; t&#7921; nhi&#234;n ti&#234;n ti&#7871;n &#273;&#432;&#7907;c &#273;&#224;o t&#7841;o tr&#234;n l&#432;&#7907;ng l&#7899;n d&#7919; li&#7879;u v&#259;n b&#7843;n. Nh&#7919;ng m&#244; h&#236;nh n&#224;y &#273;&#432;&#7907;c thi&#7871;t k&#7871; &#273;&#7875; hi&#7875;u v&#224; t&#7841;o ra v&#259;n b&#7843;n gi&#7889;ng con ng&#432;&#7901;i d&#7921;a tr&#234;n d&#7919; li&#7879;u &#273;&#7847;u v&#224;o m&#224; ch&#250;ng nh&#7853;n &#273;&#432;&#7907;c.</p><h2>So s&#225;nh v&#7899;i c&#225;c LM &#273;&#417;n gi&#7843;n h&#417;n</h2><p>LLM v&#224; LM &#273;&#417;n gi&#7843;n h&#417;n kh&#225;c nhau ch&#7911; y&#7871;u v&#7873; quy m&#244;, &#273;&#7897; ph&#7913;c t&#7841;p v&#224; nhi&#7879;m v&#7909; m&#224; ch&#250;ng &#273;&#432;&#7907;c thi&#7871;t k&#7871; &#273;&#7875; th&#7921;c hi&#7879;n. D&#432;&#7899;i &#273;&#226;y l&#224; so s&#225;nh gi&#7919;a c&#225;c m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n v&#224; c&#225;c m&#244; h&#236;nh &#273;&#417;n gi&#7843;n h&#417;n:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nwul!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f576114-3917-47c6-a9bf-baf4cc8692b5_735x306.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nwul!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f576114-3917-47c6-a9bf-baf4cc8692b5_735x306.png 424w, https://substackcdn.com/image/fetch/$s_!nwul!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f576114-3917-47c6-a9bf-baf4cc8692b5_735x306.png 848w, https://substackcdn.com/image/fetch/$s_!nwul!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f576114-3917-47c6-a9bf-baf4cc8692b5_735x306.png 1272w, https://substackcdn.com/image/fetch/$s_!nwul!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f576114-3917-47c6-a9bf-baf4cc8692b5_735x306.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nwul!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f576114-3917-47c6-a9bf-baf4cc8692b5_735x306.png" width="735" height="306" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f576114-3917-47c6-a9bf-baf4cc8692b5_735x306.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:306,&quot;width&quot;:735,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56930,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nwul!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f576114-3917-47c6-a9bf-baf4cc8692b5_735x306.png 424w, https://substackcdn.com/image/fetch/$s_!nwul!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f576114-3917-47c6-a9bf-baf4cc8692b5_735x306.png 848w, https://substackcdn.com/image/fetch/$s_!nwul!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f576114-3917-47c6-a9bf-baf4cc8692b5_735x306.png 1272w, https://substackcdn.com/image/fetch/$s_!nwul!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f576114-3917-47c6-a9bf-baf4cc8692b5_735x306.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p>[<strong>Footnote</strong>]</p><p>C&#225;c m&#244; h&#236;nh N-gram tuy h&#7919;u &#237;ch trong vi&#7879;c hi&#7875;u v&#224; d&#7921; &#273;o&#225;n c&#225;c m&#7851;u ng&#244;n ng&#7919; d&#7921;a tr&#234;n c&#225;c chu&#7895;i t&#7915; ng&#7855;n nh&#432;ng l&#7841;i g&#7863;p ph&#7843;i hai h&#7841;n ch&#7871; ch&#237;nh:</p><ol><li><p><em>Kh&#244;ng c&#243; kh&#7843; n&#259;ng n&#7855;m b&#7855;t c&#225;c ph&#7909; thu&#7897;c t&#7847;m xa:&nbsp;</em></p></li></ol><p>&#272;i&#7873;u n&#224;y &#273;&#7873; c&#7853;p &#273;&#7871;n th&#225;ch th&#7913;c m&#224; c&#225;c m&#244; h&#236;nh n-gram g&#7863;p ph&#7843;i trong vi&#7879;c nh&#7853;n bi&#7871;t m&#7889;i quan h&#7879; gi&#7919;a c&#225;c t&#7915; c&#225;ch xa nhau trong c&#226;u ho&#7863;c v&#259;n b&#7843;n. V&#237; d&#7909;: m&#7889;i li&#234;n h&#7879; gi&#7919;a ch&#7911; ng&#7919; c&#7911;a m&#7897;t c&#226;u v&#224; m&#7897;t &#273;&#7897;ng t&#7915; xu&#7845;t hi&#7879;n mu&#7897;n h&#417;n nhi&#7873;u c&#243; th&#7875; kh&#244;ng &#273;&#432;&#7907;c n-gram n&#7855;m b&#7855;t m&#7897;t c&#225;ch hi&#7879;u qu&#7843;, &#273;&#7863;c bi&#7879;t n&#7871;u c&#243; nhi&#7873;u t&#7915; xen v&#224;o.</p><ol start="2"><li><p><em>V&#7845;n &#273;&#7873; th&#432;a th&#7899;t v&#7899;i n-gram b&#7853;c cao:</em></p></li></ol><p>Khi ch&#7919; &#8216;n&#8217; trong n-gram t&#259;ng l&#234;n (chuy&#7875;n t&#7915; bigram sang trigram v&#224; h&#417;n th&#7871; n&#7919;a), s&#7889; l&#432;&#7907;ng n-gram c&#243; th&#7875; c&#243; s&#7869; t&#259;ng theo c&#7845;p s&#7889; nh&#226;n. Nhi&#7873;u n-gram b&#7853;c cao h&#417;n n&#224;y s&#7869; kh&#244;ng xu&#7845;t hi&#7879;n ngay c&#7843; trong c&#225;c t&#7853;p d&#7919; li&#7879;u hu&#7845;n luy&#7879;n l&#7899;n, d&#7851;n &#273;&#7871;n v&#7845;n &#273;&#7873; th&#432;a th&#7899;t khi c&#243; th&#7875; c&#243; nhi&#7873;u n-gram nh&#432;ng kh&#244;ng &#273;&#7911; d&#7919; li&#7879;u &#273;&#7875; &#432;&#7899;c t&#237;nh ch&#237;nh x&#225;c x&#225;c su&#7845;t c&#7911;a ch&#250;ng. &#272;i&#7873;u n&#224;y d&#7851;n &#273;&#7871;n nhi&#7873;u n-gram c&#243; x&#225;c su&#7845;t b&#7857;ng 0, &#273;i&#7873;u n&#224;y c&#243; th&#7875; c&#7843;n tr&#7903; hi&#7879;u su&#7845;t c&#7911;a m&#244; h&#236;nh.</p><div><hr></div><p><em>H&#7871;t B&#224;i 1-Ch&#432;&#417;ng 2</em></p><p>&#272;&#7875; &#273;&#7885;c h&#7871;t Series, vui l&#242;ng xem l&#7841;i Kh&#243;a h&#7885;c V&#7905; L&#242;ng: M&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n (LLM)</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;9892d27c-0796-4dff-86ec-7e24ba4621ef&quot;,&quot;caption&quot;:&quot;L&#7907;i &#237;ch c&#7911;a kh&#243;a h&#7885;c Hi&#7875;u c&#225;c m&#244; h&#236;nh ng&#244;n ng&#7919;, m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n v&#224; s&#7921; kh&#225;c bi&#7879;t ch&#237;nh c&#7911;a ch&#250;ng L&#224;m quen v&#7899;i c&#225;c th&#224;nh ph&#7847;n c&#7911;a LLM v&#224; ki&#7871;n tr&#250;c c&#417; b&#7843;n c&#7911;a ch&#250;ng N&#259;ng l&#7921;c ki&#7871;n th&#7913;c l&#224;m vi&#7879;c, c&#225;c lo&#7841;i LLM, c&#249;ng v&#7899;i t&#7847;m quan tr&#7885;ng v&#224; h&#7841;n ch&#7871; c&#7911;a ch&#250;ng&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Kh&#243;a h&#7885;c V&#7905; L&#242;ng: M&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n (LLM)&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:29708371,&quot;name&quot;:&quot;Kh&#7903;i&quot;,&quot;bio&quot;:&quot; &quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/68867b80-caee-4b0a-88d1-fb3d701dc0db_1080x1080.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-05-09T14:21:41.002Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0c265c38-a936-45e4-b3a4-c2a8b2253e64_1024x512.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://blog.dragdrop.vn/p/khoa-hoc-vo-long-mo-hinh-ngon-ngu-lon-llm&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:144470738,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:0,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;DragDrop.VN- Gi&#250;p b&#7841;n d&#7851;n &#273;&#7847;u v&#7899;i Micro Software&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0017ae6-1b66-445f-8c2b-7552ecdc7b48_495x495.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://blog.dragdrop.vn/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading DragDrop.VN- Gi&#250;p b&#7841;n d&#7851;n &#273;&#7847;u v&#7899;i Micro Software! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Khóa học Vỡ Lòng: Mô hình ngôn ngữ lớn (LLM)]]></title><description><![CDATA[B&#7841;n s&#7869; c&#243; &#273;&#432;&#7907;c ki&#7871;n th&#7913;c c&#417; b&#7843;n v&#7873; LLM, t&#7847;m quan tr&#7885;ng v&#224; h&#7841;n ch&#7871; c&#7911;a ch&#250;ng. B&#7841;n s&#7869; c&#243; kinh nghi&#7879;m th&#7921;c h&#224;nh b&#7857;ng c&#225;ch tinh ch&#7881;nh LLM cho c&#225;c b&#7897; d&#7919; li&#7879;u c&#7909; th&#7875;]]></description><link>https://blog.dragdrop.vn/p/khoa-hoc-vo-long-mo-hinh-ngon-ngu-lon-llm</link><guid isPermaLink="false">https://blog.dragdrop.vn/p/khoa-hoc-vo-long-mo-hinh-ngon-ngu-lon-llm</guid><dc:creator><![CDATA[Khởi]]></dc:creator><pubDate>Thu, 09 May 2024 14:21:41 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0c265c38-a936-45e4-b3a4-c2a8b2253e64_1024x512.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sPuv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65844643-eeac-4eed-aaca-8638e439db57_1024x512.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sPuv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65844643-eeac-4eed-aaca-8638e439db57_1024x512.png 424w, https://substackcdn.com/image/fetch/$s_!sPuv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65844643-eeac-4eed-aaca-8638e439db57_1024x512.png 848w, https://substackcdn.com/image/fetch/$s_!sPuv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65844643-eeac-4eed-aaca-8638e439db57_1024x512.png 1272w, https://substackcdn.com/image/fetch/$s_!sPuv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65844643-eeac-4eed-aaca-8638e439db57_1024x512.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sPuv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65844643-eeac-4eed-aaca-8638e439db57_1024x512.png" width="728" height="364" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/65844643-eeac-4eed-aaca-8638e439db57_1024x512.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:512,&quot;width&quot;:1024,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:48431,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sPuv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65844643-eeac-4eed-aaca-8638e439db57_1024x512.png 424w, https://substackcdn.com/image/fetch/$s_!sPuv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65844643-eeac-4eed-aaca-8638e439db57_1024x512.png 848w, https://substackcdn.com/image/fetch/$s_!sPuv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65844643-eeac-4eed-aaca-8638e439db57_1024x512.png 1272w, https://substackcdn.com/image/fetch/$s_!sPuv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65844643-eeac-4eed-aaca-8638e439db57_1024x512.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1>L&#7907;i &#237;ch c&#7911;a kh&#243;a h&#7885;c</h1><ol><li><p>Hi&#7875;u c&#225;c m&#244; h&#236;nh ng&#244;n ng&#7919;, m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n v&#224; s&#7921; kh&#225;c bi&#7879;t ch&#237;nh c&#7911;a ch&#250;ng</p></li><li><p>L&#224;m quen v&#7899;i c&#225;c th&#224;nh ph&#7847;n c&#7911;a LLM v&#224; ki&#7871;n tr&#250;c c&#417; b&#7843;n c&#7911;a ch&#250;ng</p></li><li><p>N&#259;ng l&#7921;c ki&#7871;n th&#7913;c l&#224;m vi&#7879;c, c&#225;c lo&#7841;i LLM, c&#249;ng v&#7899;i t&#7847;m quan tr&#7885;ng v&#224; h&#7841;n ch&#7871; c&#7911;a ch&#250;ng</p></li><li><p>Hi&#7875;u bi&#7871;t v&#7873; ho&#7841;t &#273;&#7897;ng c&#7911;a GPT-2 v&#7899;i t&#432; c&#225;ch l&#224; LLM</p></li><li><p>Kinh nghi&#7879;m th&#7921;c t&#7871; trong vi&#7879;c tinh ch&#7881;nh LLM cho c&#225;c b&#7897; d&#7919; li&#7879;u c&#7909; th&#7875; v&#224; &#273;&#225;nh gi&#225; n&#243;</p></li></ol><h1>T&#7893;ng quan v&#7873; kh&#243;a h&#7885;c</h1><ol><li><p>Trong kh&#243;a h&#7885;c n&#224;y, b&#7841;n s&#7869; c&#243; &#273;&#432;&#7907;c ki&#7871;n th&#7913;c l&#224;m vi&#7879;c v&#7873; c&#225;c kh&#7843; n&#259;ng v&#224; c&#225;c lo&#7841;i LLM, c&#249;ng v&#7899;i t&#7847;m quan tr&#7885;ng v&#224; h&#7841;n ch&#7871; c&#7911;a ch&#250;ng trong c&#225;c &#7913;ng d&#7909;ng kh&#225;c nhau. B&#7841;n s&#7869; c&#243; &#273;&#432;&#7907;c kinh nghi&#7879;m th&#7921;c h&#224;nh b&#7857;ng c&#225;ch tham gia v&#224;o vi&#7879;c tinh ch&#7881;nh LLM cho c&#225;c b&#7897; d&#7919; li&#7879;u c&#7909; th&#7875;, sau &#273;&#243; l&#224; &#273;&#225;nh gi&#225; hi&#7879;u su&#7845;t c&#7911;a ch&#250;ng.</p></li><li><p>B&#7841;n s&#7869; b&#7855;t &#273;&#7847;u v&#7899;i ph&#7847;n gi&#7899;i thi&#7879;u v&#7873; c&#225;c m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n, c&#225;c th&#224;nh ph&#7847;n, kh&#7843; n&#259;ng v&#224; lo&#7841;i c&#7911;a ch&#250;ng. Ti&#7871;p theo, b&#7841;n s&#7869; &#273;&#432;&#7907;c gi&#7899;i thi&#7879;u v&#7873; GPT-2 nh&#432; m&#7897;t v&#237; d&#7909; v&#7873; m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n. Sau &#273;&#243;, b&#7841;n s&#7869; t&#236;m hi&#7875;u c&#225;ch tinh ch&#7881;nh LLM &#273;&#227; ch&#7885;n cho m&#7897;t t&#7853;p d&#7919; li&#7879;u c&#7909; th&#7875;, b&#7855;t &#273;&#7847;u t&#7915; c&#225;c b&#432;&#7899;c ch&#7885;n m&#244; h&#236;nh, chu&#7849;n b&#7883; d&#7919; li&#7879;u, &#273;&#224;o t&#7841;o v&#224; &#273;&#225;nh gi&#225;. B&#7841;n c&#361;ng s&#7869; so s&#225;nh hi&#7879;u su&#7845;t c&#7911;a hai LLM kh&#225;c nhau.</p></li><li><p>&#272;&#7871;n cu&#7889;i kh&#243;a h&#7885;c n&#224;y, b&#7841;n s&#7869; c&#243; &#273;&#432;&#7907;c kinh nghi&#7879;m th&#7921;c t&#7871; trong vi&#7879;c tinh ch&#7881;nh LLM cho c&#225;c b&#7897; d&#7919; li&#7879;u c&#7909; th&#7875;, &#273;&#7843;m b&#7843;o b&#7897; k&#7929; n&#259;ng to&#224;n di&#7879;n &#273;&#7875; t&#7853;n d&#7909;ng hi&#7879;u qu&#7843; c&#225;c m&#244; h&#236;nh AI t&#7893;ng qu&#225;t n&#224;y trong c&#225;c &#7913;ng d&#7909;ng &#273;a d&#7841;ng li&#234;n quan &#273;&#7871;n ng&#244;n ng&#7919;.</p></li></ol><h1>N&#7897;i dung kh&#243;a h&#7885;c</h1><ol><li><p><a href="https://blog.dragdrop.vn/p/khoa-hoc-vo-long-mo-hinh-ngon-ngu-lon-llm">Gi&#7899;i thi&#7879;u kh&#243;a h&#7885;c</a><br>- T&#7893;ng quan<br>- T&#7841;i sao b&#7841;n n&#234;n h&#7885;c kh&#243;a h&#7885;c n&#224;y<br>- Kh&#243;a h&#7885;c n&#224;y d&#224;nh cho ai</p></li><li><p>B&#7855;t &#273;&#7847;u t&#236;m hi&#7875;u v&#7873; m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n (LLM)<br>- <a href="https://blog.dragdrop.vn/p/dinh-nghia-ve-mo-hinh-ngon-ngu-lon-llm">M&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n l&#224; g&#236; ?</a><br>- <a href="https://blog.dragdrop.vn/p/cac-thanh-phan-cua-llm">C&#225;c th&#224;nh ph&#7847;n c&#7911;a LLM</a><br>- C&#225;c lo&#7841;i LLM<br>- C&#225;c kh&#7843; n&#259;ng c&#7911;a LLM<br>- V&#237; d&#7909; v&#7873; GPT-2<br>- M&#7913;c &#273;&#7897; quan tr&#7885;ng v&#224; Gi&#7899;i h&#7841;n</p></li><li><p>Tinh ch&#7881;nh m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n (Fine-Tuning LLM)<br>- Th&#7871; n&#224;o l&#224; tinh ch&#7881;nh m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n LLM<br>- L&#7921;a ch&#7885;n m&#244; h&#236;nh<br>- Chu&#7849;n b&#7883; d&#7919; li&#7879;u<br>- Hu&#7845;n luy&#7879;n m&#244; h&#236;nh (Training)<br>- &#272;&#225;nh gi&#225; m&#244; h&#236;nh (Evaluation)<br>- Th&#7921;c h&#224;nh: So s&#225;nh hi&#7879;u n&#259;ng c&#7911;a 2 m&#244; h&#236;nh ng&#244;n ng&#7919; l&#7899;n LLM kh&#225;c nhau</p></li></ol><p>&#272;&#7875; nh&#7853;n &#273;&#432;&#7907;c b&#224;i vi&#7871;t ti&#7871;p theo ngay sau khi xu&#7845;t b&#7843;n, b&#7841;n vui l&#242;ng &#273;&#7875; l&#7841;i email nh&#233;.</p><div><hr></div><p>[<strong>Footnote</strong>]</p><p>&#272;&#7875; xem c&#225;c b&#224;i h&#7885;c, vui l&#242;ng click v&#224;o t&#7915;ng link trong m&#7909;c l&#7909;c b&#234;n tr&#234;n</p><p></p>]]></content:encoded></item></channel></rss>