[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-microsoft--NeuronBlocks":3,"tool-microsoft--NeuronBlocks":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 真正成长为懂上",150720,2,"2026-04-11T11:33:10",[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":78,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":95,"forks":96,"last_commit_at":97,"license":98,"difficulty_score":32,"env_os":99,"env_gpu":100,"env_ram":101,"env_deps":102,"category_tags":107,"github_topics":108,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":121,"updated_at":122,"faqs":123,"releases":164},6639,"microsoft\u002FNeuronBlocks","NeuronBlocks","NLP DNN Toolkit - Building Your NLP DNN Models Like Playing Lego","NeuronBlocks 是一款专为自然语言处理（NLP）打造的深度学习建模工具包，旨在让构建复杂的神经网络模型像搭乐高积木一样简单直观。它主要解决了 NLP 领域模型开发成本高、重复造轮子以及训练与推理流程繁琐的痛点，帮助使用者快速搭建端到端的模型流水线。\n\n这款工具非常适合从事 NLP 算法开发的工程师和研究人员使用。无论是需要快速验证想法的学术探索，还是追求高效落地的工业场景，NeuronBlocks 都能提供强有力的支持。其核心亮点在于独特的“双动物园”架构：Block Zoo（组件库）提供了丰富的常用神经网络模块作为基础积木，允许用户自由组合定制新模型；Model Zoo（模型库）则内置了多种成熟任务的 JSON 配置文件，涵盖文本分类、情感分析、机器阅读理解及知识蒸馏等常见场景。\n\n用户无需从零编写底层代码，只需通过修改配置文件或直接调用现有模型，即可在几分钟内启动训练、测试或预测任务。NeuronBlocks 基于 PyTorch 构建，支持中英文处理，兼容 GPU 与 CPU 环境，并提供了交互式预测模式，极大地降低了深度学习模型的开发门槛，让创作者能将更多精力聚焦于算","NeuronBlocks 是一款专为自然语言处理（NLP）打造的深度学习建模工具包，旨在让构建复杂的神经网络模型像搭乐高积木一样简单直观。它主要解决了 NLP 领域模型开发成本高、重复造轮子以及训练与推理流程繁琐的痛点，帮助使用者快速搭建端到端的模型流水线。\n\n这款工具非常适合从事 NLP 算法开发的工程师和研究人员使用。无论是需要快速验证想法的学术探索，还是追求高效落地的工业场景，NeuronBlocks 都能提供强有力的支持。其核心亮点在于独特的“双动物园”架构：Block Zoo（组件库）提供了丰富的常用神经网络模块作为基础积木，允许用户自由组合定制新模型；Model Zoo（模型库）则内置了多种成熟任务的 JSON 配置文件，涵盖文本分类、情感分析、机器阅读理解及知识蒸馏等常见场景。\n\n用户无需从零编写底层代码，只需通过修改配置文件或直接调用现有模型，即可在几分钟内启动训练、测试或预测任务。NeuronBlocks 基于 PyTorch 构建，支持中英文处理，兼容 GPU 与 CPU 环境，并提供了交互式预测模式，极大地降低了深度学习模型的开发门槛，让创作者能将更多精力聚焦于算法创新而非工程实现。","\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002FIanH6xI.png\" width=\"450\"> \n\n## Building Your NLP DNN Models Like Playing Lego\n\n[![language](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguage-en%20%7C%20中文-brightgreen.svg)](#language-supported)\n[![python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.6%20%7C%203.7-blue.svg)](https:\u002F\u002Fwww.python.org)\n[![pytorch](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpytorch-0.4%20%7C%201.x-orange.svg)](https:\u002F\u002Fpytorch.org)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n\n[简体中文](README_zh_CN.md)\n\n[Tutorial](Tutorial.md) [中文教程](Tutorial_zh_CN.md) [Demo Video](https:\u002F\u002Fyoutu.be\u002Fx6cOpVSZcdo)\n\n\n# Table of Contents\n* [Overview](#Overview)\n* [Get Started in 60 Seconds](#Get-Started-in-60-Seconds)\n* [Who should consider using NeuronBlocks](#Who-should-consider-using-NeuronBlocks)\n* [Contribute](#Contribute)\n* [Reference](#Reference)\n* [Related Project](#Related-Project)\n* [License](#License) \n* [Contact](#Contact)\n\n\n\n# Overview\nNeuronBlocks is a **NLP deep learning modeling toolkit** that helps engineers\u002Fresearchers to build end-to-end pipelines for neural network model training for NLP tasks. The main goal of this toolkit is to minimize developing cost for NLP deep neural network model building, including both training and inference stages.\n\nNeuronBlocks consists of two major components: ***Block Zoo*** and ***Model Zoo***. \n- In ***Block Zoo***, we provide commonly used neural network components as building blocks for model architecture design.  \n- In ***Model Zoo***, we provide a suite of NLP models for common NLP tasks, in the form of **JSON configuration** files. \n \n\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002FLMD0PFQ.png\" width=\"250\">\n\n### \u003Cspan id=\"language-supported\">Language Supported\u003C\u002Fspan>\n- English\n- Chinese\n\n### NLP Tasks Supported\n- Sentence Classification \n- Sentiment Analysis \n- Question Answering Matching\n- Textual Entailment\n- Slot tagging\n- Machine Reading Comprehension\n- Knowledge Distillation for Model Compression\n- *More on-going*\n\n### Toolkit Usage\nUsers can either pick existing models (config files) in *Model Zoo* to start model training or create new models by leveraging neural network blocks in *Block Zoo* just like playing with Lego. \n\n\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002Fq0p6Wvz.png\" width=\"300\">\n\n\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002FlFaBtnh.png\" width=\"700\">\n\n\n\n# Get Started in 60 Seconds\n## \u003Cspan id=\"installation\">Installation\u003C\u002Fspan>\n\n*Note: NeuronBlocks requires **Python 3.6*** and above.\n\n1. Clone this project. \n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FNeuronBlocks\n    ```\n\n2. Install Python packages in requirements.txt by the following command.\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n3. Install PyTorch (*NeuronBlocks supports **PyTorch 0.4.1** and above*).\n    \n    For **Linux**, run the following command:\n    ```bash\n    pip install \"torch>=0.4.1\"\n    ```\n    \n    For **Windows**, we suggest you to install PyTorch via *Conda* by following the instruction of [PyTorch](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F).\n    \n\n## \u003Cspan id=\"quick-start\">Quick Start\u003C\u002Fspan>\n\nGet started by trying the given examples. Both **Linux\u002FWindows, GPU\u002FCPU** are supported. For **Windows**, we suggest you to use PowerShell instead of CMD.\n\n*Tips: in the following instruction, PROJECTROOT denotes the root directory of this project.*\n\n```bash\n# train\ncd PROJECT_ROOT\npython train.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json\n\n# test\npython test.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json\n\n# predict\npython predict.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json\n```\n\nFor prediction, NeuronBlocks have two modes: **Interactive** and **Batch**.\n- *Interactive Prediction Mode:* The interactive mode provides interactive interface, users can input case according to corresponding prompt message and get realtime prediction result from trained model, and input \"exit\" to exit interactive interface.\n```bash\n# use the above example\n# interactive prediction\npython predict.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json --predict_mode='interactive'\n```\n- *Batch Prediction Mode:* For batched cases prediction, NeuronBlocks provides batch prediction mode which receives a cases file as input and write the prediction results in the prediction file.\n```bash\n# use the above example\n# batch prediction\npython predict.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json --predict_mode='batch' --predict_data_path=dataset\u002Fdemo\u002Fpredict.tsv\n```\n\nFor more details, please refer to [Tutorial.md](Tutorial.md) and [Code documentation](https:\u002F\u002Fmicrosoft.github.io\u002FNeuronBlocks\u002F).\n\n# Who should consider using NeuronBlocks\nEngineers or researchers who face the following challenges when using neural network models to address NLP problems: \n+ Many frameworks to choose and high framework studying cost. \n+ Heavy coding cost. A lot of details make it hard to debug.\n+ Fast Model Architecture Evolution. It is difficult for engineers to understand the mathematical principles behind them.\n+ Model Code optimization requires deep expertise.\n+ Model Platform Compatibility Requirement.  It requires extra coding work for the model to run on different platforms, such as Linux\u002FWindows, GPU\u002FCPU. \n\n\nThe advantages of leveraging NeuronBlocks for NLP neural network model training includes:\n- ***Model Building***: for model building and parameter tuning, users only need to write simple JSON config files, which greatly minimize the effort of implementing new ideas.\n- ***Model Sharing*** It is super easy to share models just through JSON files, instead of nasty codes. For different models or tasks, our users only need to maintain one single centralized source code base.\n- ***Code Reusability***: Common blocks can be easily shared across various models or tasks, reducing duplicate coding work.  \n- ***Platform Flexibility***: NeuronBlocks can run both on Linux and Windows machines, using both CPU and GPU. It also supports training on GPU platforms like Philly and PAI.\n\n    \u003Ctable align=\"center\">\n        \u003Ctr>\u003Ctd align=\"center\">\u003C\u002Ftd>\u003Ctd align=\"center\">CPU inference\u003C\u002Ftd>\u003Ctd align=\"center\">Single-GPU inference\u003C\u002Ftd>\u003Ctd align=\"center\">Multi-GPU inference\u003C\u002Ftd>\u003C\u002Ftr>\n        \u003Ctr>\u003Ctd align=\"center\">CPU train\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003C\u002Ftr>\n        \u003Ctr>\u003Ctd align=\"center\">Single-GPU train\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003C\u002Ftr>\n        \u003Ctr>\u003Ctd align=\"center\">Multi-GPU train\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003C\u002Ftr>\n    \u003C\u002Ftable>\n- ***Model Visualization***: A model visualizer is provided for visualization and configure correctness checking, which helps users to visualize the model architecture easily during debugging. \n- ***Extensibility***: NeuronBlocks is extensible, allowing users to contribute new blocks or contributing novel models (JSON files).\n\n# Contribute\nNeuronBlocks operates in an open model. It is designed and developed by **STCA NLP Group, Microsoft**. Contributions from academia and industry are also highly welcome. For more details, please refer to [Contributing.md](Contributing.md).\n\n## Ongoing Work and Call for Contributions\nAnyone who are familiar with are highly encouraged to contribute code.\n* Knowledge Distillation for Model Compression. Knowledge distillation for heavy models such as BERT, OpenAI Transformer. Teacher-Student based knowledge distillation is one common method for model compression. \n* Multi-Lingual Support\n* NER Model Support \n* Multi-Task Training Support \n\n# Reference\n**NeuronBlocks -- Building Your NLP DNN Models Like Playing Lego. EMNLP 2019**, at https:\u002F\u002Farxiv.org\u002Fabs\u002F1904.09535.\n```\n@article{gong2019neuronblocks,\n  title={NeuronBlocks--Building Your NLP DNN Models Like Playing Lego},\n  author={Gong, Ming and Shou, Linjun and Lin, Wutao and Sang, Zhijie and Yan, Quanjia and Yang, Ze, Cheng, Feixiang and Jiang, Daxin},\n  journal={arXiv preprint arXiv:1904.09535},\n  year={2019}\n}\n```\n\n# Related Project\n* [OpenPAI](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002Fpai) is an open source platform that provides complete AI model training and resource management capabilities, it is easy to extend and supports on-premise, cloud and hybrid environments in various scale.\n* [Samples for AI](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002Fsamples-for-ai):  a deep learning samples and projects collection. It contains a lot of classic deep learning algorithms and applications with different frameworks, which is a good entry for the beginners to get started with deep learning.\n\n# License\n\nCopyright (c) Microsoft Corporation. All rights reserved.\n\nLicensed under the [MIT](LICENSE) License.\n\n# Contact\nIf you have any questions, please contact NeuronBlocks@microsoft.com\n\nIf you have wechat, you can also add the following account:\n\n\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002FUfOYvt1.jpg\" width=\"200\">\n\n","\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002FIanH6xI.png\" width=\"450\"> \n\n## 像搭积木一样构建你的NLP深度神经网络模型\n\n[![language](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguage-en%20%7C%20中文-brightgreen.svg)](#language-supported)\n[![python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.6%20%7C%203.7-blue.svg)](https:\u002F\u002Fwww.python.org)\n[![pytorch](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpytorch-0.4%20%7C%201.x-orange.svg)](https:\u002F\u002Fpytorch.org)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n\n[简体中文](README_zh_CN.md)\n\n[Tutorial](Tutorial.md) [中文教程](Tutorial_zh_CN.md) [Demo Video](https:\u002F\u002Fyoutu.be\u002Fx6cOpVSZcdo)\n\n\n# 目录\n* [概述](#Overview)\n* [60秒快速上手](#Get-Started-in-60-Seconds)\n* [哪些人适合使用NeuronBlocks](#Who-should-consider-using-NeuronBlocks)\n* [贡献](#Contribute)\n* [参考文献](#Reference)\n* [相关项目](#Related-Project)\n* [许可证](#License) \n* [联系我们](#Contact)\n\n\n\n# 概述\nNeuronBlocks是一个**NLP深度学习建模工具包**，旨在帮助工程师和研究人员为NLP任务构建端到端的神经网络模型训练流水线。该工具包的主要目标是最大限度地降低NLP深度神经网络模型开发的成本，涵盖训练和推理两个阶段。\n\nNeuronBlocks由两大核心组件组成：***Block Zoo*** 和 ***Model Zoo***。\n- 在***Block Zoo***中，我们提供了常用的神经网络组件，作为模型架构设计的积木模块。\n- 在***Model Zoo***中，我们提供了一系列针对常见NLP任务的模型，以**JSON配置文件**的形式呈现。\n\n\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002FLMD0PFQ.png\" width=\"250\">\n\n### \u003Cspan id=\"language-supported\">支持的语言\u003C\u002Fspan>\n- 英语\n- 中文\n\n### 支持的NLP任务\n- 句子分类\n- 情感分析\n- 问答匹配\n- 文本蕴含\n- 实体识别\n- 机器阅读理解\n- 知识蒸馏用于模型压缩\n- *更多任务正在开发中*\n\n### 工具包使用方式\n用户可以选择*Model Zoo*中的现有模型（配置文件）来开始模型训练，也可以利用*Block Zoo*中的神经网络模块像搭积木一样创建新模型。\n\n\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002Fq0p6Wvz.png\" width=\"300\">\n\n\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002FlFaBtnh.png\" width=\"700\">\n\n\n\n# 60秒快速上手\n## \u003Cspan id=\"installation\">安装\u003C\u002Fspan>\n\n*注意：NeuronBlocks需要Python 3.6及以上版本。*\n\n1. 克隆该项目。\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FNeuronBlocks\n    ```\n\n2. 使用以下命令安装requirements.txt中的Python包。\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n3. 安装PyTorch（*NeuronBlocks支持PyTorch 0.4.1及以上版本*）。\n\n    对于**Linux**系统，运行以下命令：\n    ```bash\n    pip install \"torch>=0.4.1\"\n    ```\n    \n    对于**Windows**系统，建议您通过*Conda*按照[PyTorch官网](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F)的指引进行安装。\n    \n\n## \u003Cspan id=\"quick-start\">快速入门\u003C\u002Fspan>\n\n从提供的示例开始尝试。**Linux\u002FWindows、GPU\u002FCPU**均支持。对于**Windows**系统，建议使用PowerShell而非CMD。\n\n*提示：在以下说明中，PROJECTROOT表示该项目的根目录。*\n\n```bash\n# 训练\ncd PROJECT_ROOT\npython train.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json\n\n# 测试\npython test.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json\n\n# 预测\npython predict.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json\n```\n\n对于预测功能，NeuronBlocks有两种模式：**交互式**和**批量式**。\n- *交互式预测模式：* 交互式模式提供了一个交互界面，用户可以根据提示信息输入案例，并从训练好的模型中获得实时预测结果，输入“exit”即可退出交互界面。\n```bash\n# 使用上述示例\n# 交互式预测\npython predict.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json --predict_mode='interactive'\n```\n- *批量式预测模式：* 对于批量案例的预测，NeuronBlocks提供了批量预测模式，该模式接收一个案例文件作为输入，并将预测结果写入预测文件。\n```bash\n# 使用上述示例\n# 按批量预测\npython predict.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json --predict_mode='batch' --predict_data_path=dataset\u002Fdemo\u002Fpredict.tsv\n```\n\n更多详细信息，请参阅[Tutorial.md](Tutorial.md)和[代码文档](https:\u002F\u002Fmicrosoft.github.io\u002FNeuronBlocks\u002F)。\n\n# 哪些人适合使用NeuronBlocks\n当使用神经网络模型解决NLP问题时，面临以下挑战的工程师或研究人员可以考虑使用NeuronBlocks：\n+ 框架众多，学习成本高。\n+ 编码工作量大，细节繁多，调试困难。\n+ 模型架构迭代迅速，工程师难以理解其背后的数学原理。\n+ 模型代码优化需要深厚的专业知识。\n+ 不同平台兼容性要求高，例如在Linux\u002FWindows、GPU\u002FCPU等不同平台上运行模型需要额外的编码工作。\n\n\n利用NeuronBlocks进行NLP神经网络模型训练的优势包括：\n- ***模型构建***：在模型构建和参数调优过程中，用户只需编写简单的JSON配置文件，从而大大减少了实现新想法的工作量。\n- ***模型共享***：通过JSON文件即可轻松共享模型，无需复杂的代码。对于不同的模型或任务，用户只需维护一个统一的源代码库。\n- ***代码复用***：常用模块可以在不同模型或任务之间轻松共享，减少重复编码工作。\n- ***平台灵活性***：NeuronBlocks可在Linux和Windows机器上运行，同时支持CPU和GPU计算。它还支持在Philly和PAI等GPU平台上进行训练。\n\n    \u003Ctable align=\"center\">\n        \u003Ctr>\u003Ctd align=\"center\">\u003C\u002Ftd>\u003Ctd align=\"center\">CPU推理\u003C\u002Ftd>\u003Ctd align=\"center\">单GPU推理\u003C\u002Ftd>\u003Ctd align=\"center\">多GPU推理\u003C\u002Ftd>\u003C\u002Ftr>\n        \u003Ctr>\u003Ctd align=\"center\">CPU训练\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003C\u002Ftr>\n        \u003Ctr>\u003Ctd align=\"center\">单GPU训练\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003C\u002Ftr>\n        \u003Ctr>\u003Ctd align=\"center\">多GPU训练\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003Ctd align=\"center\">&#10003;\u003C\u002Ftd>\u003C\u002Ftr>\n    \u003C\u002Ftable>\n- ***模型可视化***：提供了一个模型可视化工具，用于检查模型架构的正确性，帮助用户在调试过程中轻松地可视化模型结构。\n- ***可扩展性***：NeuronBlocks具有良好的可扩展性，允许用户贡献新的模块或创新的模型（JSON文件）。\n\n# 贡献\nNeuronBlocks 采用开放模式运行。它由 **STCA NLP Group, Microsoft** 设计和开发。我们也非常欢迎来自学术界和工业界的贡献。更多详情，请参阅 [Contributing.md](Contributing.md)。\n\n## 正在进行的工作及贡献号召\n熟悉相关领域的人员均被鼓励贡献代码。\n* 模型压缩中的知识蒸馏。针对 BERT、OpenAI Transformer 等重型模型的知识蒸馏。基于教师-学生架构的知识蒸馏是模型压缩的一种常用方法。\n* 多语言支持\n* NER 模型支持\n* 多任务训练支持\n\n# 参考文献\n**NeuronBlocks -- 像搭乐高积木一样构建你的 NLP DNN 模型。EMNLP 2019**, 见 https:\u002F\u002Farxiv.org\u002Fabs\u002F1904.09535。\n```\n@article{gong2019neuronblocks,\n  title={NeuronBlocks--Building Your NLP DNN Models Like Playing Lego},\n  author={Gong, Ming and Shou, Linjun and Lin, Wutao and Sang, Zhijie and Yan, Quanjia and Yang, Ze, Cheng, Feixiang and Jiang, Daxin},\n  journal={arXiv preprint arXiv:1904.09535},\n  year={2019}\n}\n```\n\n# 相关项目\n* [OpenPAI](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002Fpai) 是一个开源平台，提供完整的 AI 模型训练和资源管理能力，易于扩展，并支持各种规模的本地、云端及混合环境。\n* [AI 示例库](https:\u002F\u002Fgithub.com\u002FMicrosoft\u002Fsamples-for-ai)：一个深度学习示例和项目集合。其中包含大量使用不同框架的经典深度学习算法和应用，是初学者入门深度学习的良好起点。\n\n# 许可证\n\n版权所有 © 微软公司。保留所有权利。\n\n根据 [MIT](LICENSE) 许可证授权。\n\n# 联系方式\n如有任何问题，请联系 NeuronBlocks@microsoft.com。\n\n如果您有微信，也可以添加以下账号：\n\n\u003Cimg src=\"https:\u002F\u002Fi.imgur.com\u002FUfOYvt1.jpg\" width=\"200\">","# NeuronBlocks 快速上手指南\n\nNeuronBlocks 是一款由微软开发的 NLP 深度学习建模工具包，旨在让开发者像“搭乐高”一样，通过简单的 JSON 配置文件快速构建、训练和部署 NLP 深度神经网络模型。\n\n## 1. 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：支持 Linux 或 Windows（Windows 用户建议使用 PowerShell）。\n*   **Python 版本**：Python 3.6 或更高版本。\n*   **深度学习框架**：PyTorch 0.4.1 或更高版本。\n*   **硬件支持**：支持 CPU 及 GPU（单卡\u002F多卡）训练与推理。\n\n## 2. 安装步骤\n\n### 第一步：克隆项目\n将 NeuronBlocks 代码库克隆到本地：\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FMicrosoft\u002FNeuronBlocks\ncd NeuronBlocks\n```\n\n### 第二步：安装依赖包\n安装项目所需的 Python 依赖库：\n```bash\npip install -r requirements.txt\n```\n> **提示**：国内用户若下载缓慢，可添加清华源加速：\n> `pip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n### 第三步：安装 PyTorch\n根据操作系统选择安装方式：\n\n*   **Linux 用户**：\n    ```bash\n    pip install \"torch>=0.4.1\"\n    ```\n    > **提示**：国内用户推荐使用清华源：\n    > `pip install \"torch>=0.4.1\" -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n*   **Windows 用户**：\n    建议通过 Conda 安装，请访问 [PyTorch 官网](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F) 获取适合您环境的命令，或使用以下通用命令（需已安装 conda）：\n    ```bash\n    conda install pytorch torchvision torchaudio cpuonly -c pytorch\n    ```\n\n## 3. 基本使用\n\n安装完成后，您可以直接使用项目自带的示例模型进行训练、测试和预测。假设 `PROJECT_ROOT` 为您刚才克隆的项目根目录。\n\n### 训练模型 (Train)\n使用默认的演示配置文件启动训练：\n```bash\ncd PROJECT_ROOT\npython train.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json\n```\n\n### 测试模型 (Test)\n训练完成后，使用测试集评估模型效果：\n```bash\npython test.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json\n```\n\n### 模型预测 (Predict)\nNeuronBlocks 提供两种预测模式：\n\n**1. 交互式预测 (Interactive)**\n输入数据后实时获取预测结果，输入 `exit` 退出：\n```bash\npython predict.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json --predict_mode='interactive'\n```\n\n**2. 批量预测 (Batch)**\n读取文件中的批量数据进行预测，并将结果输出到文件：\n```bash\npython predict.py --conf_path=model_zoo\u002Fdemo\u002Fconf.json --predict_mode='batch' --predict_data_path=dataset\u002Fdemo\u002Fpredict.tsv\n```\n\n---\n*更多高级用法（如自定义模型结构、修改超参数等），请参考项目内的 [Tutorial_zh_CN.md](Tutorial_zh_CN.md) 文档。*","某电商公司的算法团队正急需构建一个多语言（中英文）商品评论情感分析系统，以实时监控用户反馈并优化推荐策略。\n\n### 没有 NeuronBlocks 时\n- **重复造轮子成本高**：每次尝试新模型架构（如从 CNN 切换到 LSTM），工程师都需从零编写大量底层 PyTorch 代码，开发周期长达数周。\n- **实验配置管理混乱**：超参数和网络结构硬编码在脚本中，调整实验需反复修改代码，难以复现之前的最佳结果或进行快速对比。\n- **多任务适配困难**：面对情感分析、槽位填充等不同 NLP 任务，需要为每个任务单独维护一套独立的训练流水线，资源浪费严重。\n- **新人上手门槛高**：新加入的研究员需花费大量时间理解复杂的模型实现细节，而非专注于业务逻辑和算法创新。\n\n### 使用 NeuronBlocks 后\n- **像搭积木般构建模型**：利用 Block Zoo 中预置的神经网络组件，团队通过组合现有模块即可快速搭建新架构，将模型原型开发时间缩短至几天。\n- **配置驱动灵活实验**：通过修改 Model Zoo 中的 JSON 配置文件即可调整模型结构和超参数，无需触碰核心代码，轻松实现实验的版本管理和快速迭代。\n- **统一框架支持多任务**：同一套工具链即可覆盖情感分析、文本蕴含等多个场景，只需切换配置文件即可复用训练和推理流程，大幅降低维护成本。\n- **专注核心算法创新**：研究人员不再被底层代码束缚，可直接调用成熟模块验证想法，显著提升了团队的整体研发效率。\n\nNeuronBlocks 通过将复杂的 NLP 深度学习建模转化为可视化的“乐高式”组装，极大地降低了开发门槛并加速了模型从实验到落地的全过程。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_NeuronBlocks_e05177a5.png","microsoft","Microsoft","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmicrosoft_4900709c.png","Open source projects and samples from Microsoft",null,"opensource@microsoft.com","OpenAtMicrosoft","https:\u002F\u002Fopensource.microsoft.com","https:\u002F\u002Fgithub.com\u002Fmicrosoft",[83,87,91],{"name":84,"color":85,"percentage":86},"Python","#3572A5",99.3,{"name":88,"color":89,"percentage":90},"Shell","#89e051",0.4,{"name":92,"color":93,"percentage":94},"HTML","#e34c26",0.3,1454,193,"2026-03-16T09:23:01","MIT","Linux, Windows","非必需，支持 CPU 和 GPU 模式。GPU 具体型号、显存大小及 CUDA 版本未说明（支持单卡和多卡训练\u002F推理）。","未说明",{"notes":103,"python":104,"dependencies":105},"Windows 用户建议通过 Conda 安装 PyTorch 并使用 PowerShell 而非 CMD 运行脚本。该工具旨在降低 NLP 模型构建成本，支持通过 JSON 配置文件进行模型训练和推理，无需大量编码。","3.6+",[106],"torch>=0.4.1",[14,35],[109,110,111,112,113,114,115,116,117,118,119,120],"question-answering","deep-learning","pytorch","natural-language-processing","text-classification","artificial-intelligence","dnn","qna","text-matching","knowledge-distillation","model-compression","sequence-labeling","2026-03-27T02:49:30.150509","2026-04-11T23:21:17.226886",[124,129,134,139,144,149,154,159],{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},29964,"运行训练时遇到 'IndexError: tuple index out of range' 错误怎么办？","该问题通常是由 Python 3.5.x 版本引起的。请将 Python 环境升级到 3.6.x 或更高版本，目前项目主要支持 Python 3.6。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FNeuronBlocks\u002Fissues\u002F19",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},29965,"遇到 'RuntimeError: set_storage is not allowed on Tensor created from .data or .detach()' 错误如何解决？","这是由 PyTorch 版本不兼容导致的。PyTorch 1.1.0 会引发此问题，请卸载当前版本并安装 PyTorch 0.4.1 即可解决。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FNeuronBlocks\u002Fissues\u002F13",{"id":135,"question_zh":136,"answer_zh":137,"source_url":138},29966,"程序运行时出现 'Segmentation fault'（段错误）是什么原因？","这通常与 PyTorch 版本有关。尝试卸载 PyTorch 0.4.1 并重新安装 PyTorch 1.0.1 可能解决问题。此外，确保系统环境（如 GCC 版本）兼容，有时减少 batch size 也可能有帮助，但根本原因多为库版本冲突。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FNeuronBlocks\u002Fissues\u002F56",{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},29967,"如何处理数据倾斜（Data Skew）导致少数类别被误分类的问题？","可以在配置文件的 losses 部分为不同类别设置权重来解决。例如，在 CrossEntropyLoss 配置中添加 \"weight\": [0.1, 0.9]。具体示例可参考项目中的 question_answer_matching 配置文件。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FNeuronBlocks\u002Fissues\u002F63",{"id":145,"question_zh":146,"answer_zh":147,"source_url":148},29968,"运行 'pip install -r requirements.txt' 时提示找不到文件怎么办？","请确保您当前所在的目录是 NeuronBlocks 项目的根目录。需要先进入根文件夹，然后再执行安装命令。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FNeuronBlocks\u002Fissues\u002F54",{"id":150,"question_zh":151,"answer_zh":152,"source_url":153},29969,"NeuronBlocks 是否支持中文处理及字向量机制？","是的，目前完全支持中文。您可以查看 Tutorial.md 教程，其中包含了两个中文任务的示例作为参考。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FNeuronBlocks\u002Fissues\u002F23",{"id":155,"question_zh":156,"answer_zh":157,"source_url":158},29970,"NeuronBlocks 是否支持 TensorFlow 框架？","目前不支持。该项目仅基于 PyTorch 构建，尚未提供对 TensorFlow 的支持。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FNeuronBlocks\u002Fissues\u002F72",{"id":160,"question_zh":161,"answer_zh":162,"source_url":163},29971,"内存充足但训练大文本数据时模型无法工作怎么办？","即使内存充足，也需检查数据预处理和配置。如果之前有相关修复提交（如 @chengfx 的更改），请尝试应用这些更改。同时确认输入数据的最大长度是否在模型允许范围内，过长的序列可能导致隐式错误。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FNeuronBlocks\u002Fissues\u002F53",[165,170,175,179],{"id":166,"version":167,"summary_zh":168,"released_at":169},206581,"v0.4","更好地支持知识蒸馏任务。  \r\n支持加载大规模数据的标签。  \r\n为拉取请求添加自动化测试。","2019-08-04T14:21:36",{"id":171,"version":172,"summary_zh":173,"released_at":174},206582,"v0.3","支持序列标注。  \n支持知识蒸馏任务。","2019-06-22T04:17:04",{"id":176,"version":177,"summary_zh":77,"released_at":178},206583,"v0.2","2019-05-09T09:51:11",{"id":180,"version":181,"summary_zh":77,"released_at":182},206584,"v0.1","2019-04-28T10:49:22"]