Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"Khoá học Mô hình ngôn ngữ cơ bản","local":"khoá-học-mô-hình-ngôn-ngữ-cơ-bản","sections":[{"title":"Nội dung khoá học","local":"nội-dung-khoá-học","sections":[],"depth":2},{"title":"Tại sao lại chọn Mô hình Ngôn ngữ Nhỏ?","local":"tại-sao-lại-chọn-mô-hình-ngôn-ngữ-nhỏ","sections":[],"depth":2},{"title":"Yêu cầu tiên quyết","local":"yêu-cầu-tiên-quyết","sections":[],"depth":2},{"title":"Cài đặt","local":"cài-đặt","sections":[{"title":"Sử dụng uv","local":"sử-dụng-uv","sections":[],"depth":3},{"title":"Sử dụng pip","local":"sử-dụng-pip","sections":[],"depth":3},{"title":"Google Colab","local":"google-colab","sections":[],"depth":3}],"depth":2},{"title":"Tham gia và chia sẻ","local":"tham-gia-và-chia-sẻ","sections":[],"depth":2}],"depth":1}"/> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/entry/start.CtyBSNgQ.js" rel="modulepreload"> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/chunks/CF4wRftK.js" rel="modulepreload"> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/chunks/CySbcAT-.js" rel="modulepreload"> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/entry/app.DVqfUt_-.js" rel="modulepreload"> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/chunks/VgaoKIOi.js" rel="modulepreload"> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/chunks/B78lAqAx.js" rel="modulepreload"> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/chunks/CuNCLOyX.js" rel="modulepreload"> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/chunks/DsnmJJEf.js" rel="modulepreload"> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/nodes/0.CssKaOMK.js" rel="modulepreload"> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/chunks/Dglb--k6.js" rel="modulepreload"> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/nodes/2.J1FOH6JO.js" rel="modulepreload"> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/chunks/CNq3mOx8.js" rel="modulepreload"> | |
| <!--1lvyxoj--><meta name="hf:doc:metadata" content="{"title":"Khoá học Mô hình ngôn ngữ cơ bản","local":"khoá-học-mô-hình-ngôn-ngữ-cơ-bản","sections":[{"title":"Nội dung khoá học","local":"nội-dung-khoá-học","sections":[],"depth":2},{"title":"Tại sao lại chọn Mô hình Ngôn ngữ Nhỏ?","local":"tại-sao-lại-chọn-mô-hình-ngôn-ngữ-nhỏ","sections":[],"depth":2},{"title":"Yêu cầu tiên quyết","local":"yêu-cầu-tiên-quyết","sections":[],"depth":2},{"title":"Cài đặt","local":"cài-đặt","sections":[{"title":"Sử dụng uv","local":"sử-dụng-uv","sections":[],"depth":3},{"title":"Sử dụng pip","local":"sử-dụng-pip","sections":[],"depth":3},{"title":"Google Colab","local":"google-colab","sections":[],"depth":3}],"depth":2},{"title":"Tham gia và chia sẻ","local":"tham-gia-và-chia-sẻ","sections":[],"depth":2}],"depth":1}"/><!----> | |
| <link href="/docs/smol-course/pr_306/vi/_app/immutable/assets/0.tn0RQdqM.css" rel="modulepreload"> <!--[--><!--[0--><!--[--><!--[0--><!--[--><p></p> <p><img src="../banner.png" alt="smolcourse image"/></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"><div class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----></span> <span>Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-7 max-sm:h-7 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible sm:size-3.5 size-3 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg><!----></button></div> <!--[-1--><!--]--></div><!----> <!--[0--><h1 class="relative group"><a id="khoá-học-mô-hình-ngôn-ngữ-cơ-bản" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#khoá-học-mô-hình-ngôn-ngữ-cơ-bản"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Khoá học Mô hình ngôn ngữ cơ bản</span></h1><!--]--><!----> <p>Đây là một khoá học thực hành về việc huấn luyện các mô hình ngôn ngữ (LM) cho các trường hợp sử dụng cụ thể. Khoá học này là cách thuận tiện để bắt đầu với việc điều chỉnh các mô hình ngôn ngữ, bởi vì mọi thứ đều có thể chạy được trên hầu hết các máy tính cá nhân. Tại đây, chúng ta không cần quá nhiều tài nguyên GPUs hay các dịch vụ trả phí để học tập. Khoá học được xây dựng dựa trên series mô hình <a href="https://github.com/huggingface/smollm/tree/main" rel="nofollow">SmolLM2</a>, nhưng bạn có thể áp dụng các kỹ năng học được ở đây cho các mô hình lớn hơn hoặc các mô hình ngôn ngữ nhỏ khác.</p> <p><em>Lưu ý: Vì khóa học được dịch từ bản gốc tiếng Anh, chúng tôi sẽ giữ lại một số thuật ngữ gốc nhằm tránh gây hiểu lầm.</em></p> <a href="http://hf.co/join/discord">s <img src="https://img.shields.io/badge/Discord-7289DA?&logo=discord&logoColor=white"/></a> <div style="background: linear-gradient(to right, #e0f7fa, #e1bee7, orange); padding: 20px; border-radius: 5px; margin-bottom: 20px; color: purple;"><h2>Tham gia học ngay!</h2> <p>Khoá học này mở và được đánh giá bởi cộng đồng. Để tham gia khoá học <strong>hãy tạo Pull Request (PR)</strong> và gửi bài làm của bạn để được review. Các bước thực hiện:</p> <ol><li>Fork repo <a href="https://github.com/huggingface/smol-course/fork">tại đây</a></li> <li>Đọc tài liệu, thực hiện thay đổi, làm bài tập, thêm ví dụ của riêng bạn</li> <li>Tạo PR trên nhánh december_2024</li> <li>Nhận review và merge</li></ol> <p>Điều này sẽ giúp bạn học tập và xây dựng một khoá học có cộng đồng tham gia và luôn được cải thiện.</p></div> <p>Chúng ta có thể thảo luận về quá trình học tập và phát triển trong <a href="https://github.com/huggingface/smol-course/discussions/2#discussion-7602932" rel="nofollow">thread này</a>.</p> <!--[1--><h2 class="relative group"><a id="nội-dung-khoá-học" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#nội-dung-khoá-học"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Nội dung khoá học</span></h2><!--]--><!----> <p>Khoá học này cung cấp phương pháp thực hành để làm việc với các mô hình ngôn ngữ nhỏ, từ huấn luyện ban đầu đến triển khai lên sản phẩm.</p> <table><thead><tr><th>Bài</th><th>Mô tả</th><th>Trạng thái</th><th>Ngày phát hành</th></tr></thead><tbody><tr><td><a href="./1_instruction_tuning">Tinh chỉnh theo chỉ thị (Instruction Tuning)</a></td><td>Học về huấn luyện có giám sát (SFT), định dạng chat, và thực hiện các chỉ thị cơ bản</td><td>✅ Sẵn sàng</td><td>3/12/2024</td></tr><tr><td><a href="./2_preference_alignment">Tinh chỉnh theo sự ưu tiên (Preference Alignment)</a></td><td>Học các kỹ thuật DPO và ORPO để huấn luyện mô hình theo sự uy tiên của người dùng</td><td>✅ Sẵn sàng</td><td>6/12/2024</td></tr><tr><td><a href="./3_parameter_efficient_finetuning">Tinh chỉnh hiệu quả tham số (Parameter-efficient Fine-tuning)</a></td><td>Học về LoRA, prompt tuning và các phương pháp huấn luyện hiệu quả</td><td>✅ Sẵn sàng</td><td>9/12/2024</td></tr><tr><td><a href="./4_evaluation">Đánh giá mô hình (Evaluation)</a></td><td>Sử dụng benchmark tự động và tạo đánh giá theo lĩnh vực cụ thể</td><td><a href="https://github.com/huggingface/smol-course/issues/42" rel="nofollow">🚧 Đang thực hiện</a></td><td>13/12/2024</td></tr><tr><td><a href="./5_vision_language_models">Mô hình đa phương thức (Vision-language Models)</a></td><td>Điều chỉnh các mô hình đa phương thức (Multimodal models) cho các tác vụ thị giác-ngôn ngữ</td><td><a href="https://github.com/huggingface/smol-course/issues/49" rel="nofollow">🚧 Đang thực hiện</a></td><td>16/12/2024</td></tr><tr><td><a href="./6_synthetic_datasets">Dữ liệu nhân tạo (Synthetic Datasets)</a></td><td>Tạo và đánh giá tập dữ liệu tổng hợp cho huấn luyện</td><td>📝 Đã lên kế hoạch</td><td>20/12/2024</td></tr><tr><td><a href="./7_inference">Triển khai mô hình (Inference)</a></td><td>Triển khai mô hình một cách hiệu quả</td><td>📝 Đã lên kế hoạch</td><td>23/12/2024</td></tr></tbody></table> <!--[1--><h2 class="relative group"><a id="tại-sao-lại-chọn-mô-hình-ngôn-ngữ-nhỏ" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#tại-sao-lại-chọn-mô-hình-ngôn-ngữ-nhỏ"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Tại sao lại chọn Mô hình Ngôn ngữ Nhỏ?</span></h2><!--]--><!----> <p>Mặc dù các mô hình ngôn ngữ lớn đã cho thấy khả năng ấn tượng, chúng thường yêu cầu tài nguyên tính toán đáng kể và có thể quá mức cần thiết cho các ứng dụng tập trung. Các mô hình ngôn ngữ nhỏ mang lại nhiều lợi thế cho các ứng dụng theo lĩnh vực cụ thể:</p> <ul><li><strong>Hiệu quả:</strong> Yêu cầu ít tài nguyên tính toán hơn đáng kể để huấn luyện và triển khai</li> <li><strong>Tùy chỉnh:</strong> Dễ dàng tinh chỉnh phù hợp cho các lĩnh vực cụ thể</li> <li><strong>Kiểm soát:</strong> Dễ dàng hiểu và kiểm soát hành vi mô hình hơn</li> <li><strong>Chi phí:</strong> Chi phí huấn luyện và triển khai thấp hơn đáng kể</li> <li><strong>Bảo mật:</strong> Có thể triển khai trên mạng cục bộ mà không cần gửi dữ liệu tới API bên ngoài</li> <li><strong>Công nghệ xanh:</strong> Sử dụng tài nguyên hiệu quả (carbon footprint giảm)</li> <li><strong>Nghiên cứu học thuật dễ dàng hơn:</strong> Khởi đầu dễ dàng cho nghiên cứu học thuật trên mô hình ngôn ngữ với ít ràng buộc về tài nghiên tính toán</li></ul> <!--[1--><h2 class="relative group"><a id="yêu-cầu-tiên-quyết" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#yêu-cầu-tiên-quyết"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Yêu cầu tiên quyết</span></h2><!--]--><!----> <p>Trước khi bắt đầu, hãy đảm bảo bạn có:</p> <ul><li>Hiểu biết cơ bản về machine learning (ML) và xử lý ngôn ngữ tự nhiên (NLP)</li> <li>Quen thuộc với Python, PyTorch và thư viện <code>transformers</code></li> <li>Hiểu về mô hình ngôn ngữ và tập dữ liệu có nhãn</li></ul> <!--[1--><h2 class="relative group"><a id="cài-đặt" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#cài-đặt"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Cài đặt</span></h2><!--]--><!----> <p>Chúng tôi duy trì khoá học như một package để bạn có thể cài đặt dễ dàng thông qua package manager. Chúng tôi gợi ý sử dụng <a href="https://github.com/astral-sh/uv" rel="nofollow">uv</a>, nhưng bạn có thể sử dụng các lựa chọn thay thế như <code>pip</code> hoặc <code>pdm</code>.</p> <!--[2--><h3 class="relative group"><a id="sử-dụng-uv" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#sử-dụng-uv"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Sử dụng uv</span></h3><!--]--><!----> <p>Với <code>uv</code> đã được cài đặt, bạn có thể cài đặt khoá học như sau:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-bash "><!---->uv venv --python 3.11.0 | |
| uv <span class="hljs-built_in">sync</span><!----></pre></div><!----> <!--[2--><h3 class="relative group"><a id="sử-dụng-pip" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#sử-dụng-pip"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Sử dụng pip</span></h3><!--]--><!----> <p>Tất cả các ví dụ chạy trong cùng một môi trường <strong>python 3.11</strong>, vì vậy bạn nên tạo môi trường và cài đặt dependencies như sau:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-bash "><!----><span class="hljs-comment"># python -m venv .venv</span> | |
| <span class="hljs-comment"># source .venv/bin/activate</span> | |
| pip install -r requirements.txt<!----></pre></div><!----> <!--[2--><h3 class="relative group"><a id="google-colab" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#google-colab"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Google Colab</span></h3><!--]--><!----> <p>Nếu dùng <strong>Google Colab</strong> bạn sẽ cần cài đặt dependencies một cách linh hoạt dựa trên phần cứng bạn đang sử dụng. Như sau:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> Copied</div><!----></button><!----></div> <pre class="language-bash "><!---->pip install -r transformers trl datasets huggingface_hub<!----></pre></div><!----> <!--[1--><h2 class="relative group"><a id="tham-gia-và-chia-sẻ" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#tham-gia-và-chia-sẻ"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span>Tham gia và chia sẻ</span></h2><!--]--><!----> <p>Hãy chia sẻ khoá học này, để cùng nhau phát triển cộng đồng AI Việt Nam.</p> <p><a href="https://star-history.com/#huggingface/smol-course&Date" rel="nofollow"><img src="https://api.star-history.com/svg?repos=huggingface/smol-course&type=Date" alt="Biểu đồ sao của khoá học"/></a></p> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/smol-course/blob/main/units/vi/README.md" target="_blank"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg><!----> <span><span class="underline">Update</span> on GitHub</span></a><!----> <p></p><!--]--><!----><!--]--><!--]--><!--]--> <!--[-1--><!--]--><!--]--> | |
| <script> | |
| { | |
| __sveltekit_1cwjigp = { | |
| base: "/docs/smol-course/pr_306/vi", | |
| assets: "/docs/smol-course/pr_306/vi" | |
| }; | |
| const element = document.currentScript.parentElement; | |
| Promise.all([ | |
| import("/docs/smol-course/pr_306/vi/_app/immutable/entry/start.CtyBSNgQ.js"), | |
| import("/docs/smol-course/pr_306/vi/_app/immutable/entry/app.DVqfUt_-.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 2], | |
| data: [null,null], | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 28.6 kB
- Xet hash:
- 692079e26d2cd3124a3c6caebf0c86daf64070422a5fb87e37e9883221049f90
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.