[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-huggingface--course":3,"tool-huggingface--course":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",150037,2,"2026-04-10T23:33:47",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":77,"owner_email":77,"owner_twitter":73,"owner_website":78,"owner_url":79,"languages":80,"stars":93,"forks":94,"last_commit_at":95,"license":96,"difficulty_score":32,"env_os":97,"env_gpu":98,"env_ram":98,"env_deps":99,"category_tags":106,"github_topics":107,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":111,"updated_at":112,"faqs":113,"releases":114},6561,"huggingface\u002Fcourse","course","The Hugging Face course on Transformers","course 是 Hugging Face 官方推出的开源学习项目，旨在系统性地引导用户掌握 Transformer 模型及其在自然语言处理等领域的应用。对于许多希望进入 AI 领域但面对庞大生态系统感到无从下手的初学者而言，course 提供了一条清晰的学习路径，有效解决了理论知识与工程实践脱节的痛点。\n\n这套课程完全免费且开放源代码，内容不仅涵盖核心算法原理，更侧重实战操作。它将带领学习者深入使用 Hugging Face 全家桶，包括 🤗 Transformers、🤗 Datasets、🤗 Tokenizers 和 🤗 Accelerate 等关键库，并演示如何利用 Hugging Face Hub 共享和调用模型资源。其独特的技术亮点在于“边学边做”的模式，通过真实的代码示例和项目练习，让用户在动手过程中理解如何构建、训练及部署现代 AI 模型。\n\ncourse 非常适合 AI 开发者、数据科学家、研究人员以及任何对深度学习感兴趣的技术爱好者。无论你是想从零开始构建第一个神经网络，还是希望系统化提升现有技能，都能从中获益。目前，该项目正由全球社区协作翻译成多种语言，致力于打破语","course 是 Hugging Face 官方推出的开源学习项目，旨在系统性地引导用户掌握 Transformer 模型及其在自然语言处理等领域的应用。对于许多希望进入 AI 领域但面对庞大生态系统感到无从下手的初学者而言，course 提供了一条清晰的学习路径，有效解决了理论知识与工程实践脱节的痛点。\n\n这套课程完全免费且开放源代码，内容不仅涵盖核心算法原理，更侧重实战操作。它将带领学习者深入使用 Hugging Face 全家桶，包括 🤗 Transformers、🤗 Datasets、🤗 Tokenizers 和 🤗 Accelerate 等关键库，并演示如何利用 Hugging Face Hub 共享和调用模型资源。其独特的技术亮点在于“边学边做”的模式，通过真实的代码示例和项目练习，让用户在动手过程中理解如何构建、训练及部署现代 AI 模型。\n\ncourse 非常适合 AI 开发者、数据科学家、研究人员以及任何对深度学习感兴趣的技术爱好者。无论你是想从零开始构建第一个神经网络，还是希望系统化提升现有技能，都能从中获益。目前，该项目正由全球社区协作翻译成多种语言，致力于打破语言障碍，让高质量的 AI 教育资源惠及更多人群。","# The Hugging Face Course\n\nThis repo contains the content that's used to create the **[Hugging Face course](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fchapter1\u002F1)**. The course teaches you about applying Transformers to various tasks in natural language processing and beyond. Along the way, you'll learn how to use the [Hugging Face](https:\u002F\u002Fhuggingface.co\u002F) ecosystem — [🤗 Transformers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers), [🤗 Datasets](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdatasets), [🤗 Tokenizers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers), and [🤗 Accelerate](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Faccelerate) — as well as the [Hugging Face Hub](https:\u002F\u002Fhuggingface.co\u002Fmodels). It's completely free and open-source!\n\n## 🌎 Languages and translations\n\n| Language                                                                      | Source                                                                             | Authors                                                                                                                                                                                                                                                                                                                                                  |\n|:------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [English](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fen\u002Fchapter1\u002F1)                        | [`chapters\u002Fen`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fen)       | [@sgugger](https:\u002F\u002Fgithub.com\u002Fsgugger), [@lewtun](https:\u002F\u002Fgithub.com\u002Flewtun), [@LysandreJik](https:\u002F\u002Fgithub.com\u002FLysandreJik), [@Rocketknight1](https:\u002F\u002Fgithub.com\u002FRocketknight1), [@sashavor](https:\u002F\u002Fgithub.com\u002Fsashavor), [@osanseviero](https:\u002F\u002Fgithub.com\u002Fosanseviero), [@SaulLu](https:\u002F\u002Fgithub.com\u002FSaulLu), [@lvwerra](https:\u002F\u002Fgithub.com\u002Flvwerra) |\n| [Bengali](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fbn\u002Fchapter1\u002F1) (WIP)                  | [`chapters\u002Fbn`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fbn)       | [@avishek-018](https:\u002F\u002Fgithub.com\u002Favishek-018), [@eNipu](https:\u002F\u002Fgithub.com\u002FeNipu)                                                                                                                                                                                                                                                                       |\n| [German](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fde\u002Fchapter1\u002F1) (WIP)                   | [`chapters\u002Fde`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fde)       | [@JesperDramsch](https:\u002F\u002Fgithub.com\u002FJesperDramsch), [@MarcusFra](https:\u002F\u002Fgithub.com\u002FMarcusFra), [@fabridamicelli](https:\u002F\u002Fgithub.com\u002Ffabridamicelli)                                                                                                                                                                                                                                                          |\n| [Spanish](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fes\u002Fchapter1\u002F1) (WIP)                  | [`chapters\u002Fes`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fes)       | [@camartinezbu](https:\u002F\u002Fgithub.com\u002Fcamartinezbu), [@munozariasjm](https:\u002F\u002Fgithub.com\u002Fmunozariasjm), [@fordaz](https:\u002F\u002Fgithub.com\u002Ffordaz)                                                                                                                                                                                                                 |\n| [Persian](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Ffa\u002Fchapter1\u002F1) (WIP)                  | [`chapters\u002Ffa`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Ffa)       | [@jowharshamshiri](https:\u002F\u002Fgithub.com\u002Fjowharshamshiri), [@schoobani](https:\u002F\u002Fgithub.com\u002Fschoobani)                                                                                                                                                                                                                                                       |\n| [French](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Ffr\u002Fchapter1\u002F1)                         | [`chapters\u002Ffr`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Ffr)       | [@lbourdois](https:\u002F\u002Fgithub.com\u002Flbourdois), [@ChainYo](https:\u002F\u002Fgithub.com\u002FChainYo), [@melaniedrevet](https:\u002F\u002Fgithub.com\u002Fmelaniedrevet), [@abdouaziz](https:\u002F\u002Fgithub.com\u002Fabdouaziz)                                                                                                                                                                       |\n| [Gujarati](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fgu\u002Fchapter1\u002F1) (WIP)                 | [`chapters\u002Fgu`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fgu)       | [@pandyaved98](https:\u002F\u002Fgithub.com\u002Fpandyaved98)                                                                                                                                                                                                                                                                                                           |\n| [Hebrew](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fhe\u002Fchapter1\u002F1) (WIP)                   | [`chapters\u002Fhe`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fhe)       | [@omer-dor](https:\u002F\u002Fgithub.com\u002Fomer-dor)                                                                                                                                                                                                                                                                                                                 |\n| [Hindi](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fhi\u002Fchapter1\u002F1) (WIP)                    | [`chapters\u002Fhi`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fhi)       | [@pandyaved98](https:\u002F\u002Fgithub.com\u002Fpandyaved98)                                                                                                                                                                                                                                                                                                           |\n| [Bahasa Indonesia](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fid\u002Fchapter1\u002F1) (WIP)                   | [`chapters\u002Fid`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fid)       | [@gstdl](https:\u002F\u002Fgithub.com\u002Fgstdl)                                                                                                                                                                                                                                                                                                           |\n| [Italian](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fit\u002Fchapter1\u002F1) (WIP)                  | [`chapters\u002Fit`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fit)       | [@CaterinaBi](https:\u002F\u002Fgithub.com\u002FCaterinaBi), [@ClonedOne](https:\u002F\u002Fgithub.com\u002FClonedOne),    [@Nolanogenn](https:\u002F\u002Fgithub.com\u002FNolanogenn), [@EdAbati](https:\u002F\u002Fgithub.com\u002FEdAbati), [@gdacciaro](https:\u002F\u002Fgithub.com\u002Fgdacciaro)                                                                                                                                                                  |\n| [Japanese](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fja\u002Fchapter1\u002F1) (WIP)                 | [`chapters\u002Fja`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fja)       | [@hiromu166](https:\u002F\u002Fgithub.com\u002F@hiromu166), [@younesbelkada](https:\u002F\u002Fgithub.com\u002F@younesbelkada), [@HiromuHota](https:\u002F\u002Fgithub.com\u002F@HiromuHota)                                                                                                                                                                                                       |\n| [Korean](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fko\u002Fchapter1\u002F1) (WIP)                   | [`chapters\u002Fko`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fko)       | [@Doohae](https:\u002F\u002Fgithub.com\u002FDoohae), [@wonhyeongseo](https:\u002F\u002Fgithub.com\u002Fwonhyeongseo), [@dlfrnaos19](https:\u002F\u002Fgithub.com\u002Fdlfrnaos19), [@nsbg](https:\u002F\u002Fgithub.com\u002Fnsbg)                                                                                                                                                                                                                                                                                                                     |\n| [Portuguese](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fpt\u002Fchapter1\u002F1) (WIP)               | [`chapters\u002Fpt`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fpt)       | [@johnnv1](https:\u002F\u002Fgithub.com\u002Fjohnnv1), [@victorescosta](https:\u002F\u002Fgithub.com\u002Fvictorescosta), [@LincolnVS](https:\u002F\u002Fgithub.com\u002FLincolnVS)                                                                                                                                                                                                                   |\n| [Russian](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fru\u002Fchapter1\u002F1) (WIP)                  | [`chapters\u002Fru`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fru)       | [@pdumin](https:\u002F\u002Fgithub.com\u002Fpdumin), [@svv73](https:\u002F\u002Fgithub.com\u002Fsvv73), [@blademoon](https:\u002F\u002Fgithub.com\u002Fblademoon)                                                                                                                                                                                                                                                                                 |\n| [Telugu]( https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fte\u002Fchapter0\u002F1 ) (WIP)                                                             | [`chapters\u002Fte`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fte)       | [@Ajey95](https:\u002F\u002Fgithub.com\u002FAjey95), [@RahulKonda18](https:\u002F\u002Fgithub.com\u002FRahulKonda18)\n| [Thai](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fth\u002Fchapter1\u002F1) (WIP)                     | [`chapters\u002Fth`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fth)       | [@peeraponw](https:\u002F\u002Fgithub.com\u002Fpeeraponw), [@a-krirk](https:\u002F\u002Fgithub.com\u002Fa-krirk), [@jomariya23156](https:\u002F\u002Fgithub.com\u002Fjomariya23156), [@ckingkan](https:\u002F\u002Fgithub.com\u002Fckingkan)                                                                                                                                                                         |\n| [Turkish](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Ftr\u002Fchapter1\u002F1) (WIP)                  | [`chapters\u002Ftr`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Ftr)       | [@tanersekmen](https:\u002F\u002Fgithub.com\u002Ftanersekmen), [@mertbozkir](https:\u002F\u002Fgithub.com\u002Fmertbozkir), [@ftarlaci](https:\u002F\u002Fgithub.com\u002Fftarlaci), [@akkasayaz](https:\u002F\u002Fgithub.com\u002Fakkasayaz)                                                                                                                                                                       |\n| [Vietnamese](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fvi\u002Fchapter1\u002F1)               | [`chapters\u002Fvi`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fvi)       | [@honghanhh](https:\u002F\u002Fgithub.com\u002Fhonghanhh)                                                                                                                                                                                                                                                                                                               |\n| [Chinese (simplified)](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fzh-CN\u002Fchapter1\u002F1)  | [`chapters\u002Fzh-CN`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fzh-CN) | [@zhlhyx](https:\u002F\u002Fgithub.com\u002Fzhlhyx), [petrichor1122](https:\u002F\u002Fgithub.com\u002Fpetrichor1122), [@1375626371](https:\u002F\u002Fgithub.com\u002F1375626371)                                                                                                                                                                                                                    |\n| [Chinese (traditional)](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fzh-TW\u002Fchapter1\u002F1) (WIP) | [`chapters\u002Fzh-TW`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fzh-TW) | [@davidpeng86](https:\u002F\u002Fgithub.com\u002Fdavidpeng86), [@thliang01](https:\u002F\u002Fgithub.com\u002Fthliang01)                                                                                                                                                                                                                                                                                                           |\n| [Romanian](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fro\u002Fchapter1\u002F1) (WIP) | [`chapters\u002Fro`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fro) | [@Sigmoid](https:\u002F\u002Fgithub.com\u002FSigmoidAI), [@eduard-balamatiuc](https:\u002F\u002Fgithub.com\u002Feduard-balamatiuc), [@FriptuLudmila](https:\u002F\u002Fgithub.com\u002FFriptuLudmila), [@tokyo-s](https:\u002F\u002Fgithub.com\u002Ftokyo-s), [@hbkdesign](https:\u002F\u002Fgithub.com\u002Fhbkdesign), [@grumpycatyo-collab](https:\u002F\u002Fgithub.com\u002Fgrumpycatyo-collab), [@Angroys](https:\u002F\u002Fgithub.com\u002FAngroys)                                                                                                                                                                                                                                                                                                             |\n\n### Translating the course into your language\n\nAs part of our mission to democratise machine learning, we'd love to have the course available in many more languages! Please follow the steps below if you'd like to help translate the course into your language 🙏.\n\n**🗞️ Open an issue**\n\nTo get started, navigate to the [_Issues_](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Fissues) page of this repo and check if anyone else has opened an issue for your language. If not, open a new issue by selecting the _Translation template_ from the _New issue_ button.\n\nOnce an issue is created, post a comment to indicate which chapters you'd like to work on and we'll add your name to the list.\n\n**🗣 Join our Discord**\n\nSince it can be difficult to discuss translation details quickly over GitHub issues, we have created dedicated channels for each language on our Discord server. If you'd like to join, follow the instructions at this channel 👉: [https:\u002F\u002Fdiscord.gg\u002FJfAtkvEtRb](https:\u002F\u002Fdiscord.gg\u002FJfAtkvEtRb)\n\n**🍴 Fork the repository**\n\nNext, you'll need to [fork this repo](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fget-started\u002Fquickstart\u002Ffork-a-repo). You can do this by clicking on the **Fork** button on the top-right corner of this repo's page.\n\nOnce you've forked the repo, you'll want to get the files on your local machine for editing. You can do that by cloning the fork with Git as follows:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FYOUR-USERNAME\u002Fcourse\n```\n\n**📋 Copy-paste the English files with a new language code**\n\nThe course files are organised under a main directory:\n\n* [`chapters`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters): all the text and code snippets associated with the course.\n\nYou'll only need to copy the files in the [`chapters\u002Fen`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fen) directory, so first navigate to your fork of the repo and run the following:\n\n```bash\ncd ~\u002Fpath\u002Fto\u002Fcourse\ncp -r chapters\u002Fen\u002FCHAPTER-NUMBER chapters\u002FLANG-ID\u002FCHAPTER-NUMBER\n```\n\nHere, `CHAPTER-NUMBER` refers to the chapter you'd like to work on and `LANG-ID` should be one of the ISO 639-1 or ISO 639-2 language codes -- see [here](https:\u002F\u002Fwww.loc.gov\u002Fstandards\u002Fiso639-2\u002Fphp\u002Fcode_list.php) for a handy table.\n\n**✍️ Start translating**\n\nNow comes the fun part - translating the text! The first thing we recommend is translating the part of the `_toctree.yml` file that corresponds to your chapter. This file is used to render the table of contents on the website and provide the links to the Colab notebooks. The only fields you should change are the `title`, ones -- for example, here are the parts of `_toctree.yml` that we'd translate for [Chapter 0](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fchapter0\u002F1?fw=pt):\n\n```yaml\n- title: 0. Setup # Translate this!\n  sections:\n  - local: chapter0\u002F1 # Do not change this!\n    title: Introduction # Translate this!\n```\n\n> 🚨 Make sure the `_toctree.yml` file only contains the sections that have been translated! Otherwise you won't be able to build the content on the website or locally (see below how).\n\n\nOnce you have translated the `_toctree.yml` file, you can start translating the [MDX](https:\u002F\u002Fmdxjs.com\u002F) files associated with your chapter.\n\n> 🙋 If the `_toctree.yml` file doesn't yet exist for your language, you can simply create one by copy-pasting from the English version and deleting the sections that aren't related to your chapter. Just make sure it exists in the `chapters\u002FLANG-ID\u002F` directory!\n\n**👷‍♂️ Build the course locally**\n\nOnce you're happy with your changes, you can preview how they'll look by first installing the [`doc-builder`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdoc-builder) tool that we use for building all documentation at Hugging Face:\n\n```bash\npython -m venv .venv\nsource .venv\u002Fbin\u002Factivate\npython -m pip install --upgrade pip\npython -m pip install \"git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdoc-builder.git\"\n```\n\n```bash\ndoc-builder preview course .\u002Fchapters\u002FLANG-ID --not_python_module\n```\n\nIf `LANG-ID` content is partial, make sure `_toctree.yml` only references files that exist in `chapters\u002FLANG-ID`.\n\nIf preview starts but all routes return `404`, this might be a local `doc-builder` version mismatch between the Python package and the SvelteKit template:\n\n```bash\npython -m pip uninstall -y hf-doc-builder\npython -m pip install \"git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdoc-builder.git\"\n```\n\nThen restart `doc-builder preview`.\n\n> `preview` command does not work with Windows.\n\nThis will build and render the course on [http:\u002F\u002Flocalhost:5173\u002F](http:\u002F\u002Flocalhost:5173\u002F). Although the content looks much nicer on the Hugging Face website, this step will still allow you to check that everything is formatted correctly.\n\n**🚀 Submit a pull request**\n\nIf the translations look good locally, the final step is to prepare the content for a pull request. Here, the first think to check is that the files are formatted correctly. For that you can run:\n\n```\npip install -r requirements.txt\nmake style\n```\n\nOnce that's run, commit any changes, open a pull request, and tag [@lewtun](https:\u002F\u002Fgithub.com\u002Flewtun) and [@stevhliu](https:\u002F\u002Fgithub.com\u002Fstevhliu) for a review. If you also know other native-language speakers who are able to review the translation, tag them as well for help. Congratulations, you've now completed your first translation 🥳!\n\n> 🚨 To build the course on the website, double-check your language code exists in `languages` field of the `build_documentation.yml` and `build_pr_documentation.yml` files in the `.github` folder. If not, just add them in their alphabetical order.\n\n## 📔 Jupyter notebooks\n\nThe Jupyter notebooks containing all the code from the course are hosted on the [`huggingface\u002Fnotebooks`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fnotebooks) repo. If you wish to generate them locally, first install the required dependencies:\n\n```bash\npython -m pip install -r requirements.txt\n```\n\nThen run the following script:\n\n```bash\npython utils\u002Fgenerate_notebooks.py --output_dir nbs\n```\n\nThis script extracts all the code snippets from the chapters and stores them as notebooks in the `nbs` folder (which is ignored by Git by default).\n\n## ✍️ Contributing a new chapter\n\n> Note: we are not currently accepting community contributions for new chapters. These instructions are for the Hugging Face authors.\n\nAdding a new chapter to the course is quite simple:\n\n1. Create a new directory under `chapters\u002Fen\u002FchapterX`, where `chapterX` is the chapter you'd like to add.\n2. Add numbered MDX files `sectionX.mdx` for each section. If you need to include images, place them in the [huggingface-course\u002Fdocumentation-images](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface-course\u002Fdocumentation-images) repository and use the [HTML Images Syntax](https:\u002F\u002Fwww.w3schools.com\u002Fhtml\u002Fhtml_images.asp) with the path `https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface-course\u002Fdocumentation-images\u002Fresolve\u002Fmain\u002F{langY}\u002F{chapterX}\u002F{your-image.png}`.\n3. Update the `_toctree.yml` file to include your chapter sections -- this information will render the table of contents on the website. If your section involves both the PyTorch and TensorFlow APIs of `transformers`, make sure you include links to both Colabs in the `colab` field.\n\nIf you get stuck, check out one of the existing chapters -- this will often show you the expected syntax.\n\nOnce you are happy with the content, open a pull request and tag [@lewtun](https:\u002F\u002Fgithub.com\u002Flewtun) for a review. We recommend adding the first chapter draft as a single pull request -- the team will then provide feedback internally to iterate on the content 🤗!\n\n## Deploying to hf.co\u002Fcourse (for HF staff)\n\nThe course content is deployed to [hf.co\u002Fcourse](https:\u002F\u002Fhuggingface.co\u002Flearn\u002Fnlp-course\u002Fchapter1\u002F1) by triggering the [GitHub CI](.github\u002Fworkflows\u002Fbuild_documentation.yml) from the `release` branch. To trigger the build, first create a new branch from `main` that will be used to update the current state on `release`:\n\n```shell\ngit checkout main\ngit checkout -b bump_release\n```\n\nNext, resolve any conflicts between the `release` and `bump_release` branches. Since this is tiresome to do manually, we can do the following to accept the latest changes:\n\n```shell\ngit checkout bump_release\ngit merge -s ours release\n```\n\nNext, push the `bump_release` branch and open a PR against `release` (not `main`!). Here is an example [PR](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Fpull\u002F768). Once the CI is green, merge the PR and this will trigger the GitHub CI to build the new course content. This takes around 10-15 minutes, after which the latest changes will be visible on [hf.co\u002Fcourse](https:\u002F\u002Fhuggingface.co\u002Flearn\u002Fnlp-course\u002Fchapter1\u002F1)!\n\n\n## 🙌 Acknowledgements\n\nThe structure of this repo and README are inspired by the wonderful [Advanced NLP with spaCy](https:\u002F\u002Fgithub.com\u002Fines\u002Fspacy-course) course.\n","# Hugging Face 课程\n\n此仓库包含用于创建 **[Hugging Face 课程](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fchapter1\u002F1)** 的内容。该课程教你如何将 Transformer 模型应用于自然语言处理及其他领域的各种任务。在学习过程中，你将掌握如何使用 Hugging Face 生态系统——[🤗 Transformers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers)、[🤗 Datasets](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdatasets)、[🤗 Tokenizers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers) 和 [🤗 Accelerate](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Faccelerate)——以及 [Hugging Face Hub](https:\u002F\u002Fhuggingface.co\u002Fmodels)。本课程完全免费且开源！\n\n## 🌎 语言与翻译\n\n| 语言                                                                      | 来源                                                                             | 作者                                                                                                                                                                                                                                                                                                                                                  |\n|:------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [英语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fen\u002Fchapter1\u002F1)                        | [`chapters\u002Fen`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fen)       | [@sgugger](https:\u002F\u002Fgithub.com\u002Fsgugger), [@lewtun](https:\u002F\u002Fgithub.com\u002Flewtun), [@LysandreJik](https:\u002F\u002Fgithub.com\u002FLysandreJik), [@Rocketknight1](https:\u002F\u002Fgithub.com\u002FRocketknight1), [@sashavor](https:\u002F\u002Fgithub.com\u002Fsashavor), [@osanseviero](https:\u002F\u002Fgithub.com\u002Fosanseviero), [@SaulLu](https:\u002F\u002Fgithub.com\u002FSaulLu), [@lvwerra](https:\u002F\u002Fgithub.com\u002Flvwerra) |\n| [孟加拉语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fbn\u002Fchapter1\u002F1) (进行中)                  | [`chapters\u002Fbn`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fbn)       | [@avishek-018](https:\u002F\u002Fgithub.com\u002Favishek-018), [@eNipu](https:\u002F\u002Fgithub.com\u002FeNipu)                                                                                                                                                                                                                                                                       |\n| [德语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fde\u002Fchapter1\u002F1) (进行中)                   | [`chapters\u002Fde`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fde)       | [@JesperDramsch](https:\u002F\u002Fgithub.com\u002FJesperDramsch), [@MarcusFra](https:\u002F\u002Fgithub.com\u002FMarcusFra), [@fabridamicelli](https:\u002F\u002Fgithub.com\u002Ffabridamicelli)                                                                                                                                                                                                                                                          |\n| [西班牙语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fes\u002Fchapter1\u002F1) (进行中)                  | [`chapters\u002Fes`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fes)       | [@camartinezbu](https:\u002F\u002Fgithub.com\u002Fcamartinezbu), [@munozariasjm](https:\u002F\u002Fgithub.com\u002Fmunozariasjm), [@fordaz](https:\u002F\u002Fgithub.com\u002Ffordaz)                                                                                                                                                                                                                 |\n| [波斯语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Ffa\u002Fchapter1\u002F1) (进行中)                  | [`chapters\u002Ffa`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Ffa)       | [@jowharshamshiri](https:\u002F\u002Fgithub.com\u002Fjowharshamshiri), [@schoobani](https:\u002F\u002Fgithub.com\u002Fschoobani)                                                                                                                                                                                                                                                       |\n| [法语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Ffr\u002Fchapter1\u002F1)                         | [`chapters\u002Ffr`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Ffr)       | [@lbourdois](https:\u002F\u002Fgithub.com\u002Flbourdois), [@ChainYo](https:\u002F\u002Fgithub.com\u002FChainYo), [@melaniedrevet](https:\u002F\u002Fgithub.com\u002Fmelaniedrevet), [@abdouaziz](https:\u002F\u002Fgithub.com\u002Fabdouaziz)                                                                                                                                                                       |\n| [古吉拉特语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fgu\u002Fchapter1\u002F1) (进行中)                 | [`chapters\u002Fgu`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fgu)       | [@pandyaved98](https:\u002F\u002Fgithub.com\u002Fpandyaved98)                                                                                                                                                                                                                                                                                                           |\n| [希伯来语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fhe\u002Fchapter1\u002F1) (进行中)                   | [`chapters\u002Fhe`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fhe)       | [@omer-dor](https:\u002F\u002Fgithub.com\u002Fomer-dor)                                                                                                                                                                                                                                                                                                                 |\n| [印地语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fhi\u002Fchapter1\u002F1) (进行中)                    | [`chapters\u002Fhi`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fhi)       | [@pandyaved98](https:\u002F\u002Fgithub.com\u002Fpandyaved98)                                                                                                                                                                                                                                                                                                           |\n| [印尼语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fid\u002Fchapter1\u002F1) (进行中)                   | [`chapters\u002Fid`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fid)       | [@gstdl](https:\u002F\u002Fgithub.com\u002Fgstdl)                                                                                                                                                                                                                                                                                                           |\n| [意大利语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fit\u002Fchapter1\u002F1) (进行中)                  | [`chapters\u002Fit`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fit)       | [@CaterinaBi](https:\u002F\u002Fgithub.com\u002FCaterinaBi), [@ClonedOne](https:\u002F\u002Fgithub.com\u002FClonedOne),    [@Nolanogenn](https:\u002F\u002Fgithub.com\u002FNolanogenn), [@EdAbati](https:\u002F\u002Fgithub.com\u002FEdAbati), [@gdacciaro](https:\u002F\u002Fgithub.com\u002Fgdacciaro)                                                                                                                                                                  |\n| [日语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fja\u002Fchapter1\u002F1) (进行中)                 | [`chapters\u002Fja`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fja)       | [@hiromu166](https:\u002F\u002Fgithub.com\u002F@hiromu166), [@younesbelkada](https:\u002F\u002Fgithub.com\u002F@younesbelkada), [@HiromuHota](https:\u002F\u002Fgithub.com\u002F@HiromuHota)                                                                                                                                                                                                       |\n| [韩语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fko\u002Fchapter1\u002F1) (进行中)                   | [`chapters\u002Fko`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fko)       | [@Doohae](https:\u002F\u002Fgithub.com\u002FDoohae), [@wonhyeongseo](https:\u002F\u002Fgithub.com\u002Fwonhyeongseo), [@dlfrnaos19](https:\u002F\u002Fgithub.com\u002Fdlfrnaos19), [@nsbg](https:\u002F\u002Fgithub.com\u002Fnsbg)                                                                                                                                                                                                                                                                                                                     |\n| [葡萄牙语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fpt\u002Fchapter1\u002F1) (进行中)               | [`chapters\u002Fpt`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fpt)       | [@johnnv1](https:\u002F\u002Fgithub.com\u002Fjohnnv1), [@victorescosta](https:\u002F\u002Fgithub.com\u002Fvictorescosta), [@LincolnVS](https:\u002F\u002Fgithub.com\u002FLincolnVS)                                                                                                                                                                                                                   |\n| [俄语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fru\u002Fchapter1\u002F1) (进行中)                  | [`chapters\u002Fru`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fru)       | [@pdumin](https:\u002F\u002Fgithub.com\u002Fpdumin), [@svv73](https:\u002F\u002Fgithub.com\u002Fsvv73), [@blademoon](https:\u002F\u002Fgithub.com\u002Fblademoon)                                                                                                                                                                                                                                                                                 |\n| [泰卢固语]( https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fte\u002Fchapter0\u002F1 ) (进行中)                                                             | [`chapters\u002Fte`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fte)       | [@Ajey95](https:\u002F\u002Fgithub.com\u002FAjey95), [@RahulKonda18](https:\u002F\u002Fgithub.com\u002FRahulKonda18)\n| [泰语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fth\u002Fchapter1\u002F1) (进行中)                     | [`chapters\u002Fth`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fth)       | [@peeraponw](https:\u002F\u002Fgithub.com\u002Fpeeraponw), [@a-krirk](https:\u002F\u002Fgithub.com\u002Fa-krirk), [@jomariya23156](https:\u002F\u002Fgithub.com\u002Fjomariya23156), [@ckingkan](https:\u002F\u002Fgithub.com\u002Fckingkan)                                                                                                                                                                         |\n| [土耳其语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Ftr\u002Fchapter1\u002F1) (进行中)                  | [`chapters\u002Ftr`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Ftr)       | [@tanersekmen](https:\u002F\u002Fgithub.com\u002Ftanersekmen), [@mertbozkir](https:\u002F\u002Fgithub.com\u002Fmertbozkir), [@ftarlaci](https:\u002F\u002Fgithub.com\u002Fftarlaci), [@akkasayaz](https:\u002F\u002Fgithub.com\u002Fakkasayaz)                                                                                                                                                                       |\n| [越南语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fvi\u002Fchapter1\u002F1)               | [`chapters\u002Fvi`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fvi)       | [@honghanhh](https:\u002F\u002Fgithub.com\u002Fhonghanhh)                                                                                                                                                                                                                                                                                                               |\n| [简体中文](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fzh-CN\u002Fchapter1\u002F1)  | [`chapters\u002Fzh-CN`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fzh-CN) | [@zhlhyx](https:\u002F\u002Fgithub.com\u002Fzhlhyx), [petrichor1122](https:\u002F\u002Fgithub.com\u002Fpetrichor1122), [@1375626371](https:\u002F\u002Fgithub.com\u002F1375626371)                                                                                                                                                                                                                    |\n| [繁体中文](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fzh-TW\u002Fchapter1\u002F1) (进行中) | [`chapters\u002Fzh-TW`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fzh-TW) | [@davidpeng86](https:\u002F\u002Fgithub.com\u002Fdavidpeng86), [@thliang01](https:\u002F\u002Fgithub.com\u002Fthliang01)                                                                                                                                                                                                                                                                                                           |\n| [罗马尼亚语](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fro\u002Fchapter1\u002F1) (进行中) | [`chapters\u002Fro`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fro) | [@Sigmoid](https:\u002F\u002Fgithub.com\u002FSigmoidAI), [@eduard-balamatiuc](https:\u002F\u002Fgithub.com\u002Feduard-balamatiuc), [@FriptuLudmila](https:\u002F\u002Fgithub.com\u002FFriptuLudmila), [@tokyo-s](https:\u002F\u002Fgithub.com\u002Ftokyo-s), [@hbkdesign](https:\u002F\u002Fgithub.com\u002Fhbkdesign), [@grumpycatyo-collab](https:\u002F\u002Fgithub.com\u002Fgrumpycatyo-collab), [@Angroys](https:\u002F\u002Fgithub.com\u002FAngroys)                                                                                                                                                                                                                                                                                                             |\n\n### 将课程翻译成您的语言\n\n作为我们推动机器学习普及化使命的一部分，我们非常希望课程能够提供更多的语言版本！如果您愿意帮助将课程翻译成您的语言，请按照以下步骤操作 🙏。\n\n**🗞️ 打开一个议题**\n\n首先，前往本仓库的[_Issues_](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Fissues)页面，查看是否已有人为您的语言提交了议题。如果没有，请点击“New issue”按钮，选择“Translation template”来创建一个新的议题。\n\n议题创建完成后，请在评论区说明您希望参与翻译的章节，我们会将您的名字添加到列表中。\n\n**🗣 加入我们的 Discord 服务器**\n\n由于通过 GitHub 议题快速讨论翻译细节可能不太方便，我们在 Discord 服务器上为每种语言都设立了专门的频道。如果您想加入，请按照该频道中的说明操作 👉：[https:\u002F\u002Fdiscord.gg\u002FJfAtkvEtRb](https:\u002F\u002Fdiscord.gg\u002FJfAtkvEtRb)\n\n**🍴 分支仓库**\n\n接下来，您需要[分叉这个仓库](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fget-started\u002Fquickstart\u002Ffork-a-repo)。只需点击本仓库页面右上角的“Fork”按钮即可。\n\n分叉完成后，您需要将文件克隆到本地以便编辑。可以使用 Git 克隆分叉后的仓库，命令如下：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FYOUR-USERNAME\u002Fcourse\n```\n\n**📋 复制英文文件并使用新的语言代码重命名**\n\n课程文件组织在一个主目录下：\n\n* [`chapters`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters)：包含课程的所有文本和代码片段。\n\n您只需要复制 [`chapters\u002Fen`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Ftree\u002Fmain\u002Fchapters\u002Fen) 目录下的文件。首先导航到您的分叉仓库，然后运行以下命令：\n\n```bash\ncd ~\u002Fpath\u002Fto\u002Fcourse\ncp -r chapters\u002Fen\u002FCHAPTER-NUMBER chapters\u002FLANG-ID\u002FCHAPTER-NUMBER\n```\n\n其中，“CHAPTER-NUMBER”是指您想要翻译的章节编号，“LANG-ID”应为 ISO 639-1 或 ISO 639-2 的语言代码——您可以参考[这里](https:\u002F\u002Fwww.loc.gov\u002Fstandards\u002Fiso639-2\u002Fphp\u002Fcode_list.php)的便捷表格。\n\n**✍️ 开始翻译**\n\n现在到了最有趣的部分——翻译文本！我们建议您首先翻译与您负责章节对应的 `_toctree.yml` 文件部分。该文件用于在网站上渲染目录，并提供 Colab 笔记本的链接。您只需修改 `title` 字段即可。例如，对于 [Chapter 0](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fchapter0\u002F1?fw=pt)，我们需要翻译的部分如下：\n\n```yaml\n- title: 0. Setup # 翻译这一行！\n  sections:\n  - local: chapter0\u002F1 # 不要更改这一行！\n    title: Introduction # 翻译这一行！\n```\n\n> 🚨 请确保 `_toctree.yml` 文件中仅包含已翻译的章节！否则您将无法在网站或本地构建内容（详见下文）。\n\n完成 `_toctree.yml` 文件的翻译后，您可以开始翻译与该章节相关的 [MDX](https:\u002F\u002Fmdxjs.com\u002F) 文件。\n\n> 🙋 如果您的语言尚未存在 `_toctree.yml` 文件，您可以直接从英文版复制一份，删除与您负责章节无关的部分。只需确保该文件位于 `chapters\u002FLANG-ID\u002F` 目录中！\n\n**👷‍♂️ 在本地构建课程**\n\n当您对所做的更改感到满意时，可以通过安装我们用于 Hugging Face 所有文档构建的工具 [`doc-builder`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdoc-builder) 来预览效果：\n\n```bash\npython -m venv .venv\nsource .venv\u002Fbin\u002Factivate\npython -m pip install --upgrade pip\npython -m pip install \"git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdoc-builder.git\"\n```\n\n```bash\ndoc-builder preview course .\u002Fchapters\u002FLANG-ID --not_python_module\n```\n\n如果 `LANG-ID` 的内容是部分的，请确保 `_toctree.yml` 仅引用 `chapters\u002FLANG-ID` 中存在的文件。\n\n如果预览启动但所有路由都返回 `404` 错误，这可能是 Python 包与 SvelteKit 模板之间的 `doc-builder` 本地版本不匹配所致：\n\n```bash\npython -m pip uninstall -y hf-doc-builder\npython -m pip install \"git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdoc-builder.git\"\n```\n\n然后重新运行 `doc-builder preview`。\n\n> `preview` 命令在 Windows 上无法使用。\n\n这将会在 [http:\u002F\u002Flocalhost:5173\u002F](http:\u002F\u002Flocalhost:5173\u002F) 上构建并渲染课程。尽管在 Hugging Face 官网上内容看起来会更美观，但这一步仍然可以帮助您检查格式是否正确。\n\n**🚀 提交拉取请求**\n\n如果本地翻译效果良好，最后一步就是准备提交拉取请求。首先需要检查文件格式是否正确，可以运行以下命令：\n\n```bash\npip install -r requirements.txt\nmake style\n```\n\n运行完毕后，提交所有更改，打开拉取请求，并标记 [@lewtun](https:\u002F\u002Fgithub.com\u002Flewtun) 和 [@stevhliu](https:\u002F\u002Fgithub.com\u002Fstevhliu) 进行审核。如果您还知道其他能审查翻译的母语人士，也可以一并标记他们以获得帮助。恭喜您，您已经完成了第一次翻译 🥳！\n\n> 🚨 若要在网站上构建课程，请务必确认您的语言代码已存在于 `.github` 文件夹中的 `build_documentation.yml` 和 `build_pr_documentation.yml` 文件的 `languages` 字段中。如果不存在，请按字母顺序将其添加进去。\n\n## 📔 Jupyter 笔记本\n\n包含课程所有代码的 Jupyter 笔记本托管在 [`huggingface\u002Fnotebooks`](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fnotebooks) 仓库中。如果您希望在本地生成这些笔记本，首先需要安装所需的依赖项：\n\n```bash\npython -m pip install -r requirements.txt\n```\n\n然后运行以下脚本：\n\n```bash\npython utils\u002Fgenerate_notebooks.py --output_dir nbs\n```\n\n该脚本会从各章节中提取所有代码片段，并将其保存为笔记本文件，存放在 `nbs` 文件夹中（默认会被 Git 忽略）。\n\n## ✍️ 贡献新章节\n\n> 注意：我们目前不接受社区提交的新章节。这些说明仅供 Hugging Face 的作者使用。\n\n为课程添加新章节非常简单：\n\n1. 在 `chapters\u002Fen\u002FchapterX` 目录下创建一个新目录，其中 `chapterX` 是您想要添加的章节名称。\n2. 为每个小节添加编号的 MDX 文件 `sectionX.mdx`。如果您需要插入图片，请将图片上传到 [huggingface-course\u002Fdocumentation-images](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface-course\u002Fdocumentation-images) 仓库，并使用 [HTML 图片语法](https:\u002F\u002Fwww.w3schools.com\u002Fhtml\u002Fhtml_images.asp)，路径为 `https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface-course\u002Fdocumentation-images\u002Fresolve\u002Fmain\u002F{langY}\u002F{chapterX}\u002F{your-image.png}`。\n3. 更新 `_toctree.yml` 文件，加入您的章节内容——这些信息将用于在网站上生成目录。如果您的小节同时涉及 `transformers` 库的 PyTorch 和 TensorFlow API，请务必在 `colab` 字段中分别提供两个 Colab 笔记本的链接。\n\n如果您遇到困难，可以参考现有的章节，这通常能帮助您了解预期的语法格式。\n\n当您对内容满意后，打开一个拉取请求，并标记 [@lewtun](https:\u002F\u002Fgithub.com\u002Flewtun) 进行审核。我们建议将第一章的初稿作为一个单独的拉取请求提交——团队会在内部提供反馈并迭代完善内容 🤗！\n\n## 部署到 hf.co\u002Fcourse（仅限 HF 工作人员）\n\n课程内容通过触发 `release` 分支上的 [GitHub CI](.github\u002Fworkflows\u002Fbuild_documentation.yml) 流水线，部署到 [hf.co\u002Fcourse](https:\u002F\u002Fhuggingface.co\u002Flearn\u002Fnlp-course\u002Fchapter1\u002F1)。要触发构建，首先从 `main` 分支创建一个新的分支，用于更新 `release` 分支的状态：\n\n```shell\ngit checkout main\ngit checkout -b bump_release\n```\n\n接下来，解决 `release` 和 `bump_release` 分支之间的任何冲突。由于手动解决这些冲突比较繁琐，我们可以执行以下操作来接受最新的更改：\n\n```shell\ngit checkout bump_release\ngit merge -s ours release\n```\n\n然后，推送 `bump_release` 分支，并针对 `release` 分支（而非 `main`）打开一个拉取请求。这里有一个示例 [PR](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcourse\u002Fpull\u002F768)。当 CI 流水线显示绿色时，合并该 PR，这将触发 GitHub CI 构建新的课程内容。整个过程大约需要 10–15 分钟，之后最新更改将在 [hf.co\u002Fcourse](https:\u002F\u002Fhuggingface.co\u002Flearn\u002Fnlp-course\u002Fchapter1\u002F1) 上可见！\n\n\n## 🙌 致谢\n\n本仓库的结构和 README 受到精彩的 [Advanced NLP with spaCy](https:\u002F\u002Fgithub.com\u002Fines\u002Fspacy-course) 课程的启发。","# Hugging Face Course 快速上手指南\n\n本指南旨在帮助中国开发者快速开始学习 Hugging Face 官方课程，掌握 Transformer 模型在自然语言处理（NLP）及其他领域的应用。\n\n## 环境准备\n\n在开始之前，请确保你的开发环境满足以下要求：\n\n*   **操作系统**：Windows、macOS 或 Linux 均可。\n*   **Python 版本**：推荐 Python 3.8 或更高版本。\n*   **前置知识**：具备基础的 Python 编程能力，了解基本的机器学习概念更佳。\n*   **账号准备**：建议注册一个 [Hugging Face 账号](https:\u002F\u002Fhuggingface.co\u002Fjoin)，以便使用 Model Hub 和社区功能。\n\n> **国内网络提示**：由于 Hugging Face 服务器位于海外，国内访问可能较慢。建议在代码中配置国内镜像源或使用代理加速下载模型和数据集。\n\n## 安装步骤\n\n你需要安装 Hugging Face 生态系统的核心库。推荐使用 `pip` 进行安装。\n\n### 1. 基础安装\n安装 Transformers、Datasets、Tokenizers 和 Accelerate 库：\n\n```bash\npip install transformers datasets tokenizers accelerate\n```\n\n### 2. 可选：使用国内镜像加速\n如果下载速度较慢，可以使用清华大学或阿里云的 PyPI 镜像源：\n\n```bash\npip install transformers datasets tokenizers accelerate -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 3. 验证安装\n运行以下 Python 代码验证是否安装成功：\n\n```python\nfrom transformers import pipeline\n\n# 测试加载一个简单的模型\nclassifier = pipeline(\"sentiment-analysis\")\nprint(classifier(\"I love using Hugging Face!\"))\n```\n\n## 基本使用\n\n本课程的核心是通过实践学习。你可以直接访问中文版课程网站开始学习，或在本地克隆仓库查看源码。\n\n### 方式一：在线学习（推荐）\n直接访问 Hugging Face 中文课程页面，无需配置本地环境即可阅读教程并运行部分代码示例（通过 Google Colab 或 Spaces）：\n\n*   **中文课程地址**：[https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fzh-CN\u002Fchapter1\u002F1](https:\u002F\u002Fhuggingface.co\u002Fcourse\u002Fzh-CN\u002Fchapter1\u002F1)\n\n### 方式二：本地运行示例\n以下是一个最简单的使用示例，展示如何使用 `transformers` 加载预训练模型进行文本分类（情感分析）：\n\n```python\nfrom transformers import pipeline\n\n# 初始化情感分析管道\n# 首次运行会自动从 Hugging Face Hub 下载模型\n# 国内用户若下载失败，可设置环境变量 HF_ENDPOINT=https:\u002F\u002Fhf-mirror.com\nclassifier = pipeline(\"sentiment-analysis\")\n\n# 执行预测\nresult = classifier(\"这门课程非常实用，让我快速掌握了 Transformer！\")\n\n# 输出结果\nprint(result)\n# 预期输出类似：[{'label': 'POSITIVE', 'score': 0.9998}]\n```\n\n### 进阶：加载中文模型\n针对中文任务，可以指定具体的中文预训练模型：\n\n```python\nfrom transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline\n\nmodel_name = \"bert-base-chinese\" # 或者使用其他中文模型，如 \"hfl\u002Fchinese-roberta-wwm-ext\"\n\ntokenizer = AutoTokenizer.from_pretrained(model_name)\nmodel = AutoModelForSequenceClassification.from_pretrained(model_name)\n\nclassifier = pipeline(\"sentiment-analysis\", model=model, tokenizer=tokenizer)\nprint(classifier(\"人工智能技术正在改变世界\"))\n```\n\n现在你已经准备好了环境并运行了第一个示例，接下来请前往中文课程网站系统性地学习后续章节。","某初创公司的 NLP 工程师需要在两周内为客服系统构建一个能准确识别用户意图的 Transformer 模型，但团队缺乏相关实战经验。\n\n### 没有 course 时\n- 面对 🤗 Transformers、Datasets 和 Tokenizers 等多个独立库，不知如何串联使用，文档查阅零散且耗时。\n- 在数据预处理和模型微调环节频繁遇到维度不匹配或显存溢出错误，调试过程如同“盲人摸象”。\n- 不清楚如何将训练好的模型上传至 Hugging Face Hub 进行共享和部署，导致项目交付延期。\n- 缺乏对 Accelerate 等加速工具的了解，本地训练速度极慢，无法快速验证想法。\n\n### 使用 course 后\n- 通过课程系统的章节指引，顺畅掌握了从数据加载、分词到模型调用的完整流水线，开发效率显著提升。\n- 借助实战代码示例，迅速定位并解决了数据对齐与显存优化问题，模型一次性训练成功。\n- 学会了利用 Hub 托管模型版本并生成推理 API，轻松实现了内部测试环境的快速集成。\n- 运用 Accelerate 技术灵活配置多卡训练，将迭代周期从数天缩短至几小时，按时完成了交付。\n\ncourse 将零散的生态工具整合为一条清晰的学习路径，帮助开发者从理论迷茫快速跨越到工程落地。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_course_9d3e8401.png","huggingface","Hugging Face","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fhuggingface_90da21a4.png","The AI community building the future.",null,"https:\u002F\u002Fhuggingface.co\u002F","https:\u002F\u002Fgithub.com\u002Fhuggingface",[81,85,89],{"name":82,"color":83,"percentage":84},"MDX","#fcb32c",99.9,{"name":86,"color":87,"percentage":88},"Python","#3572A5",0.1,{"name":90,"color":91,"percentage":92},"Makefile","#427819",0,3830,1302,"2026-04-10T07:33:53","Apache-2.0","","未说明",{"notes":100,"python":98,"dependencies":101},"该仓库主要包含 Hugging Face 课程的教学内容（文档和笔记），而非直接运行的软件工具。具体的代码示例和环境需求请参考课程中各章节的实际代码或官方在线课程页面。核心依赖为 Hugging Face 生态系统库（Transformers, Datasets, Tokenizers, Accelerate）。",[102,103,104,105],"transformers","datasets","tokenizers","accelerate",[35,14],[108,109,102,110],"deep-learning","nlp","hacktoberfest","2026-03-27T02:49:30.150509","2026-04-11T17:38:30.857393",[],[]]