[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-always-further--deepfabric":3,"tool-always-further--deepfabric":62},[4,18,26,36,46,54],{"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 真正成长为懂上",159636,2,"2026-04-17T23:33:34",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"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":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"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",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":68,"readme_en":69,"readme_zh":70,"quickstart_zh":71,"use_case_zh":72,"hero_image_url":73,"owner_login":74,"owner_name":75,"owner_avatar_url":76,"owner_bio":77,"owner_company":78,"owner_location":78,"owner_email":78,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":103,"forks":104,"last_commit_at":105,"license":106,"difficulty_score":10,"env_os":107,"env_gpu":108,"env_ram":109,"env_deps":110,"category_tags":118,"github_topics":120,"view_count":32,"oss_zip_url":78,"oss_zip_packed_at":78,"status":17,"created_at":138,"updated_at":139,"faqs":140,"releases":176},8852,"always-further\u002Fdeepfabric","deepfabric","Generate High-Quality Synthetics, Train, Measure, and Evaluate in a Single Pipeline","DeepFabric 是一款专为大语言模型和智能体系统打造的数据生成与评估工具。它能在一个统一的流程中，自动生成高质量的合成训练数据，并支持后续的模型训练、度量与效果评估。\n\n在开发智能体时，获取既多样化又紧扣特定领域的高质量训练数据往往是一大难题，传统方法容易导致数据冗余或模型过拟合。DeepFabric 通过独特的“主题图”生成算法，系统地覆盖所有必要子话题，确保数据丰富且不重复。它能教会模型如何进行逻辑推理、规划步骤、正确调用工具以及遵循严格的结构化格式。此外，该工具利用隔离的 WebAssembly 环境执行真实工具调用，并结合约束解码技术，保证生成的每一条数据在语法和执行逻辑上都准确无误。\n\n生成后的数据集可直接上传至 Hugging Face，并无缝对接 TRL、Unsloth 等主流训练框架。训练完成后，DeepFabric 内置的评估引擎还能基于未见过的任务对模型表现进行验证。\n\n这款工具非常适合 AI 开发者、研究人员以及需要构建定制化智能体的团队使用。无论是希望提升模型的工具调用能力，还是需要构建符合特定 Schema 的专业数据集，DeepFabric 都能提供从","DeepFabric 是一款专为大语言模型和智能体系统打造的数据生成与评估工具。它能在一个统一的流程中，自动生成高质量的合成训练数据，并支持后续的模型训练、度量与效果评估。\n\n在开发智能体时，获取既多样化又紧扣特定领域的高质量训练数据往往是一大难题，传统方法容易导致数据冗余或模型过拟合。DeepFabric 通过独特的“主题图”生成算法，系统地覆盖所有必要子话题，确保数据丰富且不重复。它能教会模型如何进行逻辑推理、规划步骤、正确调用工具以及遵循严格的结构化格式。此外，该工具利用隔离的 WebAssembly 环境执行真实工具调用，并结合约束解码技术，保证生成的每一条数据在语法和执行逻辑上都准确无误。\n\n生成后的数据集可直接上传至 Hugging Face，并无缝对接 TRL、Unsloth 等主流训练框架。训练完成后，DeepFabric 内置的评估引擎还能基于未见过的任务对模型表现进行验证。\n\n这款工具非常适合 AI 开发者、研究人员以及需要构建定制化智能体的团队使用。无论是希望提升模型的工具调用能力，还是需要构建符合特定 Schema 的专业数据集，DeepFabric 都能提供从数据生产到效果验证的一站式解决方案，让模型训练更加高效可靠。","\u003Cdiv align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Falways-further_deepfabric_readme_60b0b89596b7.png\" \u002F>\n    \u003Cimg alt=\"DeepFabric logo\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Falways-further_deepfabric_readme_60b0b89596b7.png\" style=\"width:40%;max-width:40%;height:auto;display:block;margin:0 auto;\" \u002F>\n  \u003C\u002Fpicture>\n  \u003Ch3>Training Model Behavior in Agentic Systems\u003C\u002Fh3>\n\n  \u003C!-- CTA Buttons -->\n  \u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fissues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FContribute-Good%20First%20Issues-green?style=for-the-badge&logo=github\" alt=\"Good First Issues\"\u002F>\n    \u003C\u002Fa>\n    &nbsp;\n    \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FpPcjYzGvbS\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FChat-Join%20Discord-7289da?style=for-the-badge&logo=discord&logoColor=white\" alt=\"Join Discord\"\u002F>\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\n  \u003C!-- Badges -->\n  \u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-blue.svg\" alt=\"License\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Factions\u002Fworkflows\u002Ftest.yml\">\n      \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg\" alt=\"CI Status\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fdeepfabric\u002F\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fdeepfabric.svg\" alt=\"PyPI Version\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpepy.tech\u002Fproject\u002Fdeepfabric\">\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Falways-further_deepfabric_readme_35bc032a0d3a.png\" alt=\"Downloads\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FpPcjYzGvbS\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1384081906773131274?color=7289da&label=Discord&logo=discord&logoColor=white\" alt=\"Discord\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fwww.reddit.com\u002Fr\u002Fdeepfabric\u002F\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FReddit-r%2Fdeepfabric-FF4500?logo=reddit&logoColor=white\" alt=\"Reddit\"\u002F>\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n**DeepFabric** generates synthetic training data for language models and agent evaluations. By combining reasoning traces with tool-calling patterns, it creates high-quality, domain-specific datasets that teach models to think, plan, and act effectively, call tools correctly, and conform to strict schema structures.\n\nWhat sets DeepFabric apart from other dataset generation tools is its ability to ensure high diversity yet domain-anchored relevance through unique topic graph generation algorithms. This guides sample creation to cover all necessary subtopics while avoiding redundancy, which is where other tools often fall short, resulting in model overfit.\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Falways-further_deepfabric_readme_464c6699fc9c.gif\" width=\"100%\" height=\"100%\"\u002F>\n\nConstrained decoding and response validation, along with real tool executions within isolated webassembly environments, ensure that generated samples strictly adhere to structured schema, variable constraints, and execution correctness, ensuring datasets have exact syntax and structure for use in model training pipelines. Tool definations can be either directly imported from MCP (Model Context Protocol) server schemas and automatically mocked, real life interfaces along with a standard set of common tools (`list_files()`, `'read_file()` etc)\n\nOnce your dataset is generated, it can be automatically uploaded to Hugging Face and directly imported into popular training frameworks like TRL, Unsloth, and Axolotl. \n\nPost-training, DeepFabric's built-in evaluation engine assesses model performance, whereby models prove their capabilities on unseen tasks derived from training splits—covering evaluation-only questions, answers, and tool traces.\n\n## Quickstart\n\nDeepFabric can be used in several ways, as a library, CLI tool, or via YAML configuration. Here's a quick example using the CLI:\n\n```bash\npip install deepfabric\n```\n\n```bash\nexport OPENAI_API_KEY=\"your-api-key\"\n\ndeepfabric generate \\\n  --topic-prompt \"Python programming fundamentals\" \\\n  --generation-system-prompt \"You are a Python expert\" \\\n  --mode graph \\\n  --depth 3 \\\n  --degree 3 \\\n  --num-samples 9 \\\n  --batch-size 3 \\\n  --provider openai \\\n  --model gpt-4o \\\n  --output-save-as dataset.jsonl\n```\n\nThis generates a topic graph and creates 27 unique nodes, then generates 27 training samples saved to `dataset.jsonl`, giving you 100% topic coverage.\n\n## Configuration\n\nDeepFabric also uses YAML configuration with three main sections and optional shared LLM defaults\n\n> [!NOTE]  \n> The following uses mocked tool execution, so will require a runing Spin service, which we provide in a docker image:\n```bash\ndocker run -d -p 3000:3000 ghcr.io\u002Falways-further\u002Fdeepfabric\u002Ftools-sdk:latest`\n```\n\nSave the following as `config.yaml`:\n\n```yaml\n# Optional: Shared LLM defaults (inherited by topics and generation)\nllm:\n  provider: \"openai\"\n  model: \"gpt-4o\"\n  temperature: 0.7\n\n# TOPICS: Generate the topic tree\u002Fgraph\ntopics:\n  prompt: \"Building production-ready REST APIs with Python\"\n  mode: tree                    # tree | graph\n  depth: 3\n  degree: 3\n  save_as: \"topics.jsonl\"\n  # Optional: Override shared LLM settings\n  llm:\n    model: \"gpt-4o-mini\"        # Use cheaper model for topics\n\n# GENERATION: Create training samples from topics\ngeneration:\n  system_prompt: |\n    You are an expert Python backend developer specializing in REST API design.\n    Create practical, production-ready code examples with clear explanations.\n    Include error handling, type hints, and follow PEP 8 conventions.\n    Use the following tools to read, write, and list files in the virtual filesystem:\n    - read_file\n    - write_file\n    - list_files\n\n  # Additional instructions for sample generation\n  instructions: |\n    Focus on real-world scenarios developers encounter daily when building REST APIs with Python.\n    Include both happy path and edge case handling.\n    Provide context on when and why to use specific patterns or libraries.\n    Ensure code is modular, testable, and maintainable.\n\n  # Agent mode is implicit when tools are configured\n  conversation:\n    type: cot      # basic | cot\n    reasoning_style: agent      # freetext | agent (for cot)\n\n  # Tool configuration (enables agent mode automatically)\n  tools:\n    spin_endpoint: \"http:\u002F\u002Flocalhost:3000\"  # Spin service for tool execution\n    components:                 # Map component name to tool names\n      builtin:                  # Routes to \u002Fvfs\u002Fexecute\n        - read_file\n        - write_file\n        - list_files\n    max_per_query: 3            # Maximum tools per query\n    max_agent_steps: 5          # Max ReAct reasoning iterations\n\n  # Optional: Seed initial files into the spin before generation, used for tool calling\n    scenario_seed:\n      files:\n        \"Dockerfile\": |\n          FROM python:3.13\n          WORKDIR \u002Fusr\u002Flocal\u002Fapp\n\n          # Install the application dependencies\n          COPY requirements.txt .\u002F\n          RUN pip install --no-cache-dir -r requirements.txt\n\n          # Copy in the source code\n          COPY src .\u002Fsrc\n          EXPOSE 8080\n\n          # Setup an app user so the container doesn't run as the root user\n          RUN useradd app\n          USER app\n\n          CMD [\"uvicorn\", \"app.main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"8080\"]\n        \"main.py\": |\n          def greet(name):\n              return f\"Hello, {name}!\"\n\n          if __name__ == \"__main__\":\n              print(greet(\"World\"))\n        \"config.json\": |\n          {\n            \"version\": \"1.0.0\",\n            \"debug\": true,\n            \"max_retries\": 3\n          }\n\n  # Generation control and retry settings\n  max_retries: 3                # Retries for failed generations\n  sample_retries: 2             # Retries for validation failures\n  max_tokens: 2000              # Max tokens per generation\n\n  # Optional: Override shared LLM settings\n  llm:\n    temperature: 0.3            # Lower temp for consistent code\n\n# OUTPUT: Final dataset configuration\noutput:\n  # System prompt that goes INTO the training data\n  # This is what the trained model will see as its system message\n  system_prompt: |\n    You are a helpful Python programming assistant specialized in REST API\n    development. You provide clear, production-ready code with explanations.\n    Always consider security, error handling, and best practices.\n\n  include_system_message: true  # Whether to include system message in output\n  num_samples: 4                 # Total training samples to generate\n  batch_size: 3                 # Parallel generation batch size\n  save_as: \"api-dataset.jsonl\"\n\n Optional: Upload to Hugging Face\n huggingface:\n   repository: \"your-username\u002Fapi-dataset-training-name\"\n   tags: [\"python\", \"programming\"]\n```\n\nRun generation by sourcing the `config.yaml`:\n\n```bash\ndeepfabric generate config.yaml\n```\n\n## Generate, Train, Evaluate\n\nDeepFabric returns standard HuggingFace datasets, making it easy to integrate with any training framework.\n\n### Colab Notebooks:\n\nA quick way of seeing DeepFabric in action is via our notebooks in the [notebooks\u002F](.\u002Fnotebooks\u002F) folder or on Google Colab:\n\n**Qwen4b Blender MCP**:\n\n[![Qwen4b Blender MCP](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1EG1V40v5xkJKLf6Ra6W4378vYqlZNVWqb)\n\n### 1. Generate Dataset\n\n```bash\ndeepfabric generate config.yaml --output-save-as dataset.jsonl\n```\n\nOr upload to HuggingFace Hub:\n\n```bash\ndeepfabric upload-hf dataset.jsonl --repo your-username\u002Fmy-dataset\n```\n\n### 2. Load and Split for Training\n\n```python\nfrom datasets import load_dataset\nfrom transformers import AutoTokenizer\n\n# Load from Hub\ndataset = load_dataset(\"alwaysfurther\u002Fdeepfabric-generic-tools\", split=\"train\")\n\n# Split into train\u002Feval\nsplits = dataset.train_test_split(test_size=0.1, seed=42)\ntrain_ds = splits[\"train\"]\neval_ds = splits[\"test\"]\n\n# Format using your tokenizer\ntokenizer = AutoTokenizer.from_pretrained(\"Qwen\u002FQwen2.5-7B-Instruct\")\n\ndef format_example(example):\n    messages = [{k: v for k, v in msg.items() if v is not None}\n                for msg in example[\"messages\"]]\n    return {\"text\": tokenizer.apply_chat_template(messages, tokenize=False)}\n\nformatted_train = train_ds.map(format_example)\n```\n\n### 3. Train with TRL or Unsloth\n\n```python\nfrom trl import SFTTrainer, SFTConfig\n\ntrainer = SFTTrainer(\n    model=model,\n    tokenizer=tokenizer,\n    train_dataset=formatted_train,\n    args=SFTConfig(output_dir=\".\u002Foutput\", num_train_epochs=3),\n)\ntrainer.train()\n```\n\n### 4. Evaluate Your Model\n\n```python\nfrom deepfabric.evaluation import Evaluator, EvaluatorConfig, InferenceConfig\n\nconfig = EvaluatorConfig(\n    inference_config=InferenceConfig(\n        model_path=\".\u002Foutput\u002Fcheckpoint-final\",  # Local path or HF Hub ID\n        backend=\"transformers\",\n    ),\n)\n\nevaluator = Evaluator(config)\nresults = evaluator.evaluate(dataset=eval_ds)  # Pass HF Dataset directly\n\nprint(f\"Tool Selection Accuracy: {results.metrics.tool_selection_accuracy:.2%}\")\nprint(f\"Parameter Accuracy: {results.metrics.parameter_accuracy:.2%}\")\nprint(f\"Overall Score: {results.metrics.overall_score:.2%}\")\n```\n\n## Evaluation\n\nDeepFabric provides a comprehensive evaluation system to measure how well your fine-tuned models perform on tool-calling tasks.\n\n### Basic Evaluation\n\n```python\nfrom datasets import load_dataset\nfrom deepfabric.evaluation import Evaluator, EvaluatorConfig, InferenceConfig\n\n# Load your evaluation dataset\ndataset = load_dataset(\"your-username\u002Fyour-dataset\", split=\"test\")\n\n# Configure the evaluator\nconfig = EvaluatorConfig(\n    inference_config=InferenceConfig(\n        model_path=\".\u002Foutput\u002Fcheckpoint-final\",  # Local path or HF Hub ID\n        backend=\"transformers\",                   # \"transformers\" or \"ollama\"\n        temperature=0.1,                          # Low temp for deterministic outputs\n        max_tokens=2048,\n    ),\n    max_samples=100,           # Limit samples for quick testing (None for all)\n    save_predictions=True,     # Save individual predictions\n    output_path=\"eval_results.json\",\n)\n\n# Run evaluation\nevaluator = Evaluator(config)\nresults = evaluator.evaluate(dataset=dataset)\n\n# Print summary\nevaluator.print_summary(results.metrics)\n\n# Cleanup GPU memory\nevaluator.cleanup()\n```\n\n### Evaluation with LoRA Adapters\n\n```python\nfrom deepfabric.evaluation import Evaluator, EvaluatorConfig, InferenceConfig\n\nconfig = EvaluatorConfig(\n    inference_config=InferenceConfig(\n        model_path=\"Qwen\u002FQwen2.5-7B-Instruct\",    # Base model\n        adapter_path=\".\u002Foutput\u002Flora-adapter\",     # LoRA adapter path\n        backend=\"transformers\",\n        load_in_4bit=True,     # 4-bit quantization\n        max_seq_length=2048,\n    ),\n)\n\nevaluator = Evaluator(config)\nresults = evaluator.evaluate(dataset=eval_dataset)\n```\n\n### Understanding Evaluation Metrics\n\nThe evaluator computes several metrics for tool-calling tasks:\n\n```python\nresults = evaluator.evaluate(dataset=eval_dataset)\nmetrics = results.metrics\n\n# Core metrics\nprint(f\"Samples Evaluated: {metrics.samples_evaluated}\")\nprint(f\"Samples Processed: {metrics.samples_processed}\")\nprint(f\"Processing Errors: {metrics.processing_errors}\")\n\n# Tool-calling metrics\nprint(f\"Tool Selection Accuracy: {metrics.tool_selection_accuracy:.2%}\")\nprint(f\"Parameter Accuracy: {metrics.parameter_accuracy:.2%}\")\nprint(f\"Execution Success Rate: {metrics.execution_success_rate:.2%}\")\nprint(f\"Response Quality: {metrics.response_quality:.2%}\")\nprint(f\"Overall Score: {metrics.overall_score:.2%}\")\n```\n\n| Metric | Description |\n|--------|-------------|\n| `tool_selection_accuracy` | How often the model selects the correct tool |\n| `parameter_accuracy` | How often tool parameters match expected values |\n| `execution_success_rate` | Rate of valid, executable tool calls |\n| `response_quality` | Quality score for non-tool responses |\n| `overall_score` | Weighted combination of all metrics |\n\n### Accessing Individual Predictions\n\n```python\nresults = evaluator.evaluate(dataset=eval_dataset)\n\n# Iterate through individual sample evaluations\nfor pred in results.predictions:\n    print(f\"Sample {pred.sample_id}:\")\n    print(f\"  Query: {pred.query}\")\n    print(f\"  Expected Tool: {pred.expected_tool}\")\n    print(f\"  Predicted Tool: {pred.predicted_tool}\")\n    print(f\"  Tool Correct: {pred.tool_selection_correct}\")\n    print(f\"  Params Correct: {pred.parameters_correct}\")\n    if pred.error:\n        print(f\"  Error: {pred.error}\")\n```\n\n### Evaluation from JSONL File\n\n```python\nfrom deepfabric.evaluation import Evaluator, EvaluatorConfig, InferenceConfig\n\nconfig = EvaluatorConfig(\n    dataset_path=\"eval_dataset.jsonl\",  # Load from file instead\n    inference_config=InferenceConfig(\n        model_path=\".\u002Fmy-model\",\n        backend=\"transformers\",\n    ),\n    output_path=\"results.json\",\n)\n\nevaluator = Evaluator(config)\nresults = evaluator.evaluate()  # No dataset argument needed\n```\n\n### Using Ollama Backend\n\n```python\nfrom deepfabric.evaluation import Evaluator, EvaluatorConfig, InferenceConfig\n\nconfig = EvaluatorConfig(\n    inference_config=InferenceConfig(\n        model_path=\"llama3.2:latest\",  # Ollama model name\n        backend=\"ollama\",\n        temperature=0.1,\n    ),\n)\n\nevaluator = Evaluator(config)\nresults = evaluator.evaluate(dataset=eval_dataset)\n```\n\n## Providers\n\n| Provider | Local\u002FCloud | Best For |\n|----------|-------------|----------|\n| OpenAI | Cloud | High quality, complex tasks |\n| Anthropic | Cloud | Nuanced reasoning |\n| Google Gemini | Cloud | Cost-effective at scale |\n| Ollama | Local | Privacy, unlimited generation |\n| OpenRouter | Cloud | Flexible model choice |\n\n## Tool Tracing with Spin\n\nDeepFabric supports **real tool execution** during dataset generation using the [Spin Framework](https:\u002F\u002Fwww.fermyon.com\u002Fspin). Instead of simulating tool outputs, tools actually execute in isolated WebAssembly sandboxes, producing authentic training data.\n\n### Why Real Execution Matters\n\nTraditional synthetic data generators simulate tool outputs, which creates unrealistic training data:\n\n```\n# Simulated (problematic)\nAgent: read_file(\"config.json\")\nResult: {\"setting\": \"value\"}  # LLM hallucinated this content\n```\n\nWith Spin integration, tools execute against real state:\n\n```\n# Real execution (accurate)\nAgent: read_file(\"config.json\")\nResult: FileNotFound  # Actual filesystem state\nAgent: write_file(\"config.json\", \"{...}\")\nResult: Written 42 bytes  # Real operation\n```\n\n### ReAct-Style Execution\n\nDeepFabric uses a ReAct (Reason-Act-Observe) loop for tool calling. The agent observes real results before deciding the next action:\n\n```\nStep 1: Agent thinks \"I should check if config exists\"\n        -> Calls read_file(\"config.json\")\n        -> Observes: FileNotFound\n\nStep 2: Agent thinks \"Config doesn't exist, I'll create it\"\n        -> Calls write_file(\"config.json\", content)\n        -> Observes: Success\n```\n\nThis produces training data where decisions are based on actual observations, not hallucinated assumptions.\n\n### Configuration\n\nEnable tool tracing in your YAML config:\n\n```yaml\ngeneration:\n  conversation:\n    type: cot\n    reasoning_style: agent\n\n  tools:\n    spin_endpoint: \"http:\u002F\u002Flocalhost:3000\"  # Spin service URL\n    available:                              # Filter to specific tools\n      - read_file\n      - write_file\n      - list_files\n    max_agent_steps: 5                      # Max ReAct iterations\n\n    # Optional: Seed initial state for scenarios\n    scenario_seed:\n      files:\n        \"config.json\": '{\"debug\": true}'\n```\n\n### Built-in VFS Tools\n\nDeepFabric includes a virtual filesystem (VFS) component with these tools:\n\n| Tool | Description |\n|------|-------------|\n| `read_file` | Read content from a file |\n| `write_file` | Write content to a file |\n| `list_files` | List all files in the session |\n| `delete_file` | Delete a file |\n\nEach session gets an isolated filesystem - changes don't persist between samples.\n\n### Running Spin Locally\n\n```bash\ncd tools-sdk\nspin build\nspin up\n```\n\nThe Spin service runs at `http:\u002F\u002Flocalhost:3000` by default.\n\n### Adding Custom Tools\n\nYou can extend DeepFabric with custom tools written in Python, JavaScript, Go, or Rust. See [tool-traces.md](.\u002Ftool-traces.md) for detailed documentation on:\n\n- Creating custom Spin components\n- Tool definition schemas\n- Multi-language examples\n- Containerization and deployment\n\n## Resources\n\n- [Documentation](https:\u002F\u002Falways-further.github.io\u002Fdeepfabric\u002F)\n- [Examples](.\u002Fexamples\u002FREADME.md)\n- [Tool Tracing Guide](.\u002Ftool-traces.md)\n- [Discord](https:\u002F\u002Fdiscord.gg\u002FpPcjYzGvbS)\n- [Issues](https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fissues)\n\n## Development\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\ncd deepfabric\nuv sync --all-extras\nmake test\n```\n\n## Analytics\n\nWe collect anonymous usage metrics to improve DeepFabric. No personal data, prompts, or API keys are collected.\n\n```bash\n# Disable analytics\nexport ANONYMIZED_TELEMETRY=False\n```\n","\u003Cdiv align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Falways-further_deepfabric_readme_60b0b89596b7.png\" \u002F>\n    \u003Cimg alt=\"DeepFabric logo\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Falways-further_deepfabric_readme_60b0b89596b7.png\" style=\"width:40%;max-width:40%;height:auto;display:block;margin:0 auto;\" \u002F>\n  \u003C\u002Fpicture>\n  \u003Ch3>在代理系统中训练模型行为\u003C\u002Fh3>\n\n  \u003C!-- 行动号召按钮 -->\n  \u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fissues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FContribute-Good%20First%20Issues-green?style=for-the-badge&logo=github\" alt=\"Good First Issues\"\u002F>\n    \u003C\u002Fa>\n    &nbsp;\n    \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FpPcjYzGvbS\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FChat-Join%20Discord-7289da?style=for-the-badge&logo=discord&logoColor=white\" alt=\"Join Discord\"\u002F>\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\n  \u003C!-- 徽章 -->\n  \u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-blue.svg\" alt=\"License\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Factions\u002Fworkflows\u002Ftest.yml\">\n      \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Factions\u002Fworkflows\u002Ftest.yml\u002Fbadge.svg\" alt=\"CI Status\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fdeepfabric\u002F\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fdeepfabric.svg\" alt=\"PyPI Version\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpepy.tech\u002Fproject\u002Fdeepfabric\">\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Falways-further_deepfabric_readme_35bc032a0d3a.png\" alt=\"Downloads\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FpPcjYzGvbS\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1384081906773131274?color=7289da&label=Discord&logo=discord&logoColor=white\" alt=\"Discord\"\u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fwww.reddit.com\u002Fr\u002Fdeepfabric\u002F\">\n      \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FReddit-r%2Fdeepfabric-FF4500?logo=reddit&logoColor=white\" alt=\"Reddit\"\u002F>\n    \u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n**DeepFabric** 为语言模型和智能体评估生成合成训练数据。通过将推理轨迹与工具调用模式相结合，它能够创建高质量的领域特定数据集，教导模型如何有效思考、规划和行动，正确调用工具，并符合严格的模式结构。\n\nDeepFabric 与其他数据集生成工具的不同之处在于，它利用独特的主题图生成算法，确保高多样性的同时保持领域相关的准确性。这种方法引导样本生成覆盖所有必要的子主题，同时避免冗余，而其他工具往往在这方面做得不够，导致模型过拟合。\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Falways-further_deepfabric_readme_464c6699fc9c.gif\" width=\"100%\" height=\"100%\"\u002F>\n\n受限解码和响应验证，以及在隔离的 WebAssembly 环境中执行真实工具，确保生成的样本严格遵守结构化模式、变量约束和执行正确性，从而保证数据集具有精确的语法和结构，可用于模型训练流程。工具定义可以直接从 MCP（模型上下文协议）服务器模式导入并自动模拟，也可以使用现实生活中的接口及一组常用工具（`list_files()`、`'read_file()` 等）。\n\n一旦您的数据集生成完毕，可以自动上传到 Hugging Face，并直接导入到 TRL、Unsloth 和 Axolotl 等流行的训练框架中。\n\n训练完成后，DeepFabric 内置的评估引擎会评估模型性能，使模型能够在来自训练分割的未见任务上证明其能力——涵盖仅用于评估的问题、答案和工具调用轨迹。\n\n## 快速入门\n\nDeepFabric 可以作为库、CLI 工具或通过 YAML 配置文件使用。以下是使用 CLI 的快速示例：\n\n```bash\npip install deepfabric\n```\n\n```bash\nexport OPENAI_API_KEY=\"your-api-key\"\n\ndeepfabric generate \\\n  --topic-prompt \"Python编程基础\" \\\n  --generation-system-prompt \"你是一位Python专家\" \\\n  --mode graph \\\n  --depth 3 \\\n  --degree 3 \\\n  --num-samples 9 \\\n  --batch-size 3 \\\n  --provider openai \\\n  --model gpt-4o \\\n  --output-save-as dataset.jsonl\n```\n\n此命令会生成一个主题图，并创建 27 个唯一节点，然后生成 27 个训练样本保存到 `dataset.jsonl` 文件中，从而实现 100% 的主题覆盖。\n\n## 配置\n\nDeepFabric 还使用 YAML 配置文件，包含三个主要部分以及可选的共享 LLM 默认设置。\n\n> [!NOTE]  \n> 下面的内容使用了模拟的工具执行，因此需要运行 Spin 服务，我们提供了一个 Docker 镜像：\n```bash\ndocker run -d -p 3000:3000 ghcr.io\u002Falways-further\u002Fdeepfabric\u002Ftools-sdk:latest`\n```\n\n将以下内容保存为 `config.yaml`：\n\n```yaml\n# 可选：共享 LLM 默认设置（由主题和生成过程继承）\nllm:\n  provider: \"openai\"\n  model: \"gpt-4o\"\n  temperature: 0.7\n\n# 主题：生成主题树\u002F图\ntopics:\n  prompt: \"使用Python构建生产就绪的REST API\"\n  mode: tree                    # tree | graph\n  depth: 3\n  degree: 3\n  save_as: \"topics.jsonl\"\n  # 可选：覆盖共享 LLM 设置\n  llm:\n    model: \"gpt-4o-mini\"        # 在生成主题时使用更便宜的模型\n\n# 生成：从主题中创建训练样本\ngeneration:\n  system_prompt: |\n    您是一位精通 REST API 设计的 Python 后端开发专家。\n    请创建实用且可直接投入生产的代码示例，并附上清晰的解释。\n    示例应包含错误处理、类型提示，并遵循 PEP 8 编码规范。\n    请使用以下工具在虚拟文件系统中读取、写入和列出文件：\n    - read_file\n    - write_file\n    - list_files\n\n  # 生成样本的附加说明\n  instructions: |\n    重点关注开发者在使用 Python 构建 REST API 时日常遇到的真实场景。\n    包含正常流程和边界情况的处理。\n    提供关于何时以及为何使用特定模式或库的背景信息。\n    确保代码模块化、可测试且易于维护。\n\n  # 配置工具时，代理模式会自动启用\n  conversation:\n    type: cot      # basic | cot\n    reasoning_style: agent      # freetext | agent (for cot)\n\n  # 工具配置（自动启用代理模式）\n  tools:\n    spin_endpoint: \"http:\u002F\u002Flocalhost:3000\"  # 用于执行工具的 Spin 服务\n    components:                 # 将组件名称映射到工具名称\n      builtin:                  # 路由至 \u002Fvfs\u002Fexecute\n        - read_file\n        - write_file\n        - list_files\n    max_per_query: 3            # 每次查询允许使用的最大工具数量\n    max_agent_steps: 5          # 最大 ReAct 推理迭代次数\n\n  # 可选：在生成前将初始文件注入 Spin，用于工具调用\n    scenario_seed:\n      files:\n        \"Dockerfile\": |\n          FROM python:3.13\n          WORKDIR \u002Fusr\u002Flocal\u002Fapp\n\n          # 安装应用程序依赖项\n          COPY requirements.txt .\u002F\n          RUN pip install --no-cache-dir -r requirements.txt\n\n          # 复制源代码\n          COPY src .\u002Fsrc\n          EXPOSE 8080\n\n          # 创建应用用户，避免容器以 root 用户运行\n          RUN useradd app\n          USER app\n\n          CMD [\"uvicorn\", \"app.main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"8080\"]\n        \"main.py\": |\n          def greet(name):\n              return f\"Hello, {name}!\"\n\n          if __name__ == \"__main__\":\n              print(greet(\"World\"))\n        \"config.json\": |\n          {\n            \"version\": \"1.0.0\",\n            \"debug\": true,\n            \"max_retries\": 3\n          }\n\n  # 生成控制与重试设置\n  max_retries: 3                # 生成失败时的重试次数\n  sample_retries: 2             # 样本验证失败时的重试次数\n  max_tokens: 2000              # 每次生成的最大 token 数量\n\n  # 可选：覆盖共享的 LLM 设置\n  llm:\n    temperature: 0.3            # 较低的温度以确保代码的一致性\n\n# 输出：最终数据集配置\noutput:\n  # 将纳入训练数据的系统提示\n  # 这是训练后的模型将看到的系统消息\n  system_prompt: |\n    您是一位专注于 REST API 开发的 Python 编程助手。您提供清晰、可直接投入生产的代码及相应解释。\n    始终考虑安全性、错误处理和最佳实践。\n\n  include_system_message: true  # 是否在输出中包含系统消息\n  num_samples: 4                 # 总共要生成的训练样本数\n  batch_size: 3                 # 并行生成批次大小\n  save_as: \"api-dataset.jsonl\"\n\n 可选：上传至 Hugging Face\n huggingface:\n   repository: \"your-username\u002Fapi-dataset-training-name\"\n   tags: [\"python\", \"programming\"]\n```\n\n通过加载 `config.yaml` 文件来运行生成：\n\n```bash\ndeepfabric generate config.yaml\n```\n\n## 生成、训练、评估\n\nDeepFabric 返回标准的 Hugging Face 数据集，便于与任何训练框架集成。\n\n### Colab 笔记本：\n\n快速了解 DeepFabric 的实际操作方法，可通过 [notebooks\u002F](.\u002Fnotebooks\u002F) 文件夹中的笔记本或 Google Colab 来实现：\n\n**Qwen4b Blender MCP**:\n\n[![Qwen4b Blender MCP](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1EG1V40v5xkJKLf6Ra6W4378vYqlZNVWqb)\n\n### 1. 生成数据集\n\n```bash\ndeepfabric generate config.yaml --output-save-as dataset.jsonl\n```\n\n或者上传至 Hugging Face Hub：\n\n```bash\ndeepfabric upload-hf dataset.jsonl --repo your-username\u002Fmy-dataset\n```\n\n### 2. 加载并拆分用于训练\n\n```python\nfrom datasets import load_dataset\nfrom transformers import AutoTokenizer\n\n# 从 Hub 加载数据集\ndataset = load_dataset(\"alwaysfurther\u002Fdeepfabric-generic-tools\", split=\"train\")\n\n# 拆分为训练集和验证集\nsplits = dataset.train_test_split(test_size=0.1, seed=42)\ntrain_ds = splits[\"train\"]\neval_ds = splits[\"test\"]\n\n# 使用您的分词器进行格式化\ntokenizer = AutoTokenizer.from_pretrained(\"Qwen\u002FQwen2.5-7B-Instruct\")\n\ndef format_example(example):\n    messages = [{k: v for k, v in msg.items() if v is not None}\n                for msg in example[\"messages\"]]\n    return {\"text\": tokenizer.apply_chat_template(messages, tokenize=False)}\n\nformatted_train = train_ds.map(format_example)\n```\n\n### 3. 使用 TRL 或 Unsloth 进行训练\n\n```python\nfrom trl import SFTTrainer, SFTConfig\n\ntrainer = SFTTrainer(\n    model=model,\n    tokenizer=tokenizer,\n    train_dataset=formatted_train,\n    args=SFTConfig(output_dir=\".\u002Foutput\", num_train_epochs=3),\n)\ntrainer.train()\n```\n\n### 4. 评估您的模型\n\n```python\nfrom deepfabric.evaluation import Evaluator, EvaluatorConfig, InferenceConfig\n\nconfig = EvaluatorConfig(\n    inference_config=InferenceConfig(\n        model_path=\".\u002Foutput\u002Fcheckpoint-final\",  # 本地路径或 HF Hub ID\n        backend=\"transformers\",\n    ),\n)\n\nevaluator = Evaluator(config)\nresults = evaluator.evaluate(dataset=eval_ds)  # 直接传入 HF 数据集\n\nprint(f\"工具选择准确率: {results.metrics.tool_selection_accuracy:.2%}\")\nprint(f\"参数准确率: {results.metrics.parameter_accuracy:.2%}\")\nprint(f\"综合得分: {results.metrics.overall_score:.2%}\")\n```\n\n## 评估\n\nDeepFabric 提供了一套全面的评估体系，用于衡量您微调后的模型在工具调用任务上的表现。\n\n### 基本评估\n\n```python\nfrom datasets import load_dataset\nfrom deepfabric.evaluation import Evaluator, EvaluatorConfig, InferenceConfig\n\n# 加载您的评估数据集\ndataset = load_dataset(\"your-username\u002Fyour-dataset\", split=\"test\")\n\n# 配置评估者\nconfig = EvaluatorConfig(\n    inference_config=InferenceConfig(\n        model_path=\".\u002Foutput\u002Fcheckpoint-final\",  # 本地路径或 HF Hub ID\n        backend=\"transformers\",                   \u002F\u002F \"transformers\" 或 \"ollama\"\n        temperature=0.1,                          \u002F\u002F 低温以获得确定性输出\n        max_tokens=2048,\n    ),\n    max_samples=100,           \u002F\u002F 限制样本数量以便快速测试（None 表示全部）\n    save_predictions=True,     \u002F\u002F 保存单个预测结果\n    output_path=\"eval_results.json\",\n)\n\n\u002F\u002F 运行评估\nevaluator = Evaluator(config)\nresults = evaluator.evaluate(dataset=dataset)\n\n\u002F\u002F 打印总结\nevaluator.print_summary(results.metrics)\n\n# 清理 GPU 内存\nevaluator.cleanup()\n```\n\n### 使用 LoRA 适配器进行评估\n\n```python\nfrom deepfabric.evaluation import Evaluator, EvaluatorConfig, InferenceConfig\n\nconfig = EvaluatorConfig(\n    inference_config=InferenceConfig(\n        model_path=\"Qwen\u002FQwen2.5-7B-Instruct\",    # 基础模型\n        adapter_path=\".\u002Foutput\u002Flora-adapter\",     # LoRA 适配器路径\n        backend=\"transformers\",\n        load_in_4bit=True,     # 4位量化\n        max_seq_length=2048,\n    ),\n)\n\nevaluator = Evaluator(config)\nresults = evaluator.evaluate(dataset=eval_dataset)\n```\n\n### 理解评估指标\n\n评估器会为工具调用任务计算多个指标：\n\n```python\nresults = evaluator.evaluate(dataset=eval_dataset)\nmetrics = results.metrics\n\n# 核心指标\nprint(f\"已评估样本数: {metrics.samples_evaluated}\")\nprint(f\"已处理样本数: {metrics.samples_processed}\")\nprint(f\"处理错误数: {metrics.processing_errors}\")\n\n# 工具调用指标\nprint(f\"工具选择准确率: {metrics.tool_selection_accuracy:.2%}\")\nprint(f\"参数准确率: {metrics.parameter_accuracy:.2%}\")\nprint(f\"执行成功率: {metrics.execution_success_rate:.2%}\")\nprint(f\"响应质量: {metrics.response_quality:.2%}\")\nprint(f\"综合得分: {metrics.overall_score:.2%}\")\n```\n\n| 指标 | 描述 |\n|--------|-------------|\n| `tool_selection_accuracy` | 模型正确选择工具的频率 |\n| `parameter_accuracy` | 工具参数与预期值匹配的频率 |\n| `execution_success_rate` | 有效且可执行的工具调用比例 |\n| `response_quality` | 非工具相关响应的质量评分 |\n| `overall_score` | 所有指标的加权组合 |\n\n### 访问单个预测结果\n\n```python\nresults = evaluator.evaluate(dataset=eval_dataset)\n\n# 遍历每个样本的评估结果\nfor pred in results.predictions:\n    print(f\"样本 {pred.sample_id}:\")\n    print(f\"  查询: {pred.query}\")\n    print(f\"  预期工具: {pred.expected_tool}\")\n    print(f\"  预测工具: {pred.predicted_tool}\")\n    print(f\"  工具选择是否正确: {pred.tool_selection_correct}\")\n    print(f\"  参数是否正确: {pred.parameters_correct}\")\n    if pred.error:\n        print(f\"  错误: {pred.error}\")\n```\n\n### 从 JSONL 文件进行评估\n\n```python\nfrom deepfabric.evaluation import Evaluator, EvaluatorConfig, InferenceConfig\n\nconfig = EvaluatorConfig(\n    dataset_path=\"eval_dataset.jsonl\",  # 直接从文件加载数据集\n    inference_config=InferenceConfig(\n        model_path=\".\u002Fmy-model\",\n        backend=\"transformers\",\n    ),\n    output_path=\"results.json\",\n)\n\nevaluator = Evaluator(config)\nresults = evaluator.evaluate()  # 无需传入数据集参数\n```\n\n### 使用 Ollama 后端\n\n```python\nfrom deepfabric.evaluation import Evaluator, EvaluatorConfig, InferenceConfig\n\nconfig = EvaluatorConfig(\n    inference_config=InferenceConfig(\n        model_path=\"llama3.2:latest\",  # Ollama 模型名称\n        backend=\"ollama\",\n        temperature=0.1,\n    ),\n)\n\nevaluator = Evaluator(config)\nresults = evaluator.evaluate(dataset=eval_dataset)\n```\n\n## 服务提供商\n\n| 服务提供商 | 本地\u002F云端 | 最适合场景 |\n|----------|-------------|----------|\n| OpenAI | 云端 | 高质量、复杂任务 |\n| Anthropic | 云端 | 细致的推理能力 |\n| Google Gemini | 云端 | 大规模应用时成本效益高 |\n| Ollama | 本地 | 注重隐私、无限生成能力 |\n| OpenRouter | 云端 | 灵活的模型选择 |\n\n## 使用 Spin 进行工具追踪\n\nDeepFabric 支持在数据集生成过程中**真实执行工具**，借助 [Spin 框架](https:\u002F\u002Fwww.fermyon.com\u002Fspin)实现。不同于模拟工具输出，工具会在隔离的 WebAssembly 沙盒中真正执行，从而生成真实的训练数据。\n\n### 为什么真实执行很重要？\n\n传统的合成数据生成器会模拟工具输出，这会导致生成不真实的训练数据：\n\n```\n# 模拟（存在问题）\n代理：read_file(\"config.json\")\n结果：{\"setting\": \"value\"}  # LLM 幻觉出的内容\n```\n\n而通过集成 Spin，工具会基于真实状态执行：\n\n```\n# 真实执行（准确）\n代理：read_file(\"config.json\")\n结果：FileNotFound  # 实际文件系统状态\n代理：write_file(\"config.json\", \"{...}\")\n结果：成功写入 42 字节  # 真实操作\n```\n\n### ReAct 式执行流程\n\nDeepFabric 使用 ReAct（思考-行动-观察）循环来调用工具。代理会根据实际观察到的结果再决定下一步行动：\n\n```\n步骤 1：代理认为“应该检查配置文件是否存在”\n        -> 调用 read_file(\"config.json\")\n        -> 观察到：FileNotFound\n\n步骤 2：代理认为“配置文件不存在，需要创建它”\n        -> 调用 write_file(\"config.json\", 内容)\n        -> 观察到：成功\n```\n\n这种方式生成的训练数据是基于真实观察做出决策，而非基于幻觉假设。\n\n### 配置\n\n在 YAML 配置中启用工具追踪：\n\n```yaml\ngeneration:\n  conversation:\n    type: cot\n    reasoning_style: agent\n\n  tools:\n    spin_endpoint: \"http:\u002F\u002Flocalhost:3000\"  # Spin 服务地址\n    available:                              # 仅允许使用指定工具\n      - read_file\n      - write_file\n      - list_files\n    max_agent_steps: 5                      # 最大 ReAct 迭代次数\n\n    # 可选：为场景设置初始状态\n    scenario_seed:\n      files:\n        \"config.json\": '{\"debug\": true}'\n```\n\n### 内置 VFS 工具\n\nDeepFabric 包含一个虚拟文件系统（VFS）组件，提供以下工具：\n\n| 工具 | 描述 |\n|------|-------------|\n| `read_file` | 读取文件内容 |\n| `write_file` | 写入文件内容 |\n| `list_files` | 列出当前会话中的所有文件 |\n| `delete_file` | 删除文件 |\n\n每个会话都拥有独立的文件系统——更改不会在不同样本之间保留。\n\n### 在本地运行 Spin\n\n```bash\ncd tools-sdk\nspin build\nspin up\n```\n\nSpin 服务默认运行在 `http:\u002F\u002Flocalhost:3000`。\n\n### 添加自定义工具\n\n你可以使用 Python、JavaScript、Go 或 Rust 编写自定义工具并扩展 DeepFabric。详细文档请参阅 [tool-traces.md](.\u002Ftool-traces.md)，内容包括：\n\n- 创建自定义 Spin 组件\n- 工具定义模式\n- 多语言示例\n- 容器化与部署\n\n## 资源\n\n- [文档](https:\u002F\u002Falways-further.github.io\u002Fdeepfabric\u002F)\n- [示例](.\u002Fexamples\u002FREADME.md)\n- [工具追踪指南](.\u002Ftool-traces.md)\n- [Discord](https:\u002F\u002Fdiscord.gg\u002FpPcjYzGvbS)\n- [问题反馈](https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fissues)\n\n## 开发\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\ncd deepfabric\nuv sync --all-extras\nmake test\n```\n\n## 数据分析\n\n我们收集匿名使用数据以改进 DeepFabric。不会收集任何个人数据、提示或 API 密钥。\n\n```bash\n# 禁用数据分析\nexport ANONYMIZED_TELEMETRY=False\n```","# DeepFabric 快速上手指南\n\nDeepFabric 是一个用于生成大语言模型（LLM）和智能体（Agent）训练数据的开源工具。它通过结合推理轨迹（Reasoning Traces）和工具调用模式，生成高质量、特定领域的合成数据集，帮助模型学习思考、规划、执行工具调用并遵循严格的结构化格式。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux, macOS 或 Windows (WSL2 推荐)\n*   **Python**: 版本 3.9 或更高\n*   **Docker**: 必须安装并运行，用于启动隔离的 WebAssembly 工具执行环境（Spin 服务）。\n*   **API Key**: 需要有效的 LLM 提供商 API Key（如 OpenAI）。\n\n## 安装步骤\n\n### 1. 安装 Python 包\n\n使用 pip 安装 DeepFabric：\n\n```bash\npip install deepfabric\n```\n\n> **提示**：国内用户若下载缓慢，可使用清华源加速：\n> `pip install deepfabric -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`\n\n### 2. 启动工具执行服务 (Docker)\n\nDeepFabric 使用 mocked tool execution（模拟工具执行），需要运行一个 Spin 服务来处理文件读写等操作。请运行以下命令启动 Docker 容器：\n\n```bash\ndocker run -d -p 3000:3000 ghcr.io\u002Falways-further\u002Fdeepfabric\u002Ftools-sdk:latest\n```\n\n### 3. 配置环境变量\n\n设置您的 LLM 提供商 API Key（以 OpenAI 为例）：\n\n```bash\nexport OPENAI_API_KEY=\"your-api-key\"\n```\n\n## 基本使用\n\nDeepFabric 支持通过 CLI 命令行或 YAML 配置文件两种方式运行。以下是两种最快捷的上手方式。\n\n### 方式一：CLI 快速生成（最简单）\n\n直接使用命令行参数生成一个简单的主题图谱和训练样本。以下示例将生成关于\"Python 编程基础”的数据集：\n\n```bash\ndeepfabric generate \\\n  --topic-prompt \"Python programming fundamentals\" \\\n  --generation-system-prompt \"You are a Python expert\" \\\n  --mode graph \\\n  --depth 3 \\\n  --degree 3 \\\n  --num-samples 9 \\\n  --batch-size 3 \\\n  --provider openai \\\n  --model gpt-4o \\\n  --output-save-as dataset.jsonl\n```\n\n**说明**：\n*   该命令会生成一个包含 27 个唯一节点的主题图。\n*   最终生成 27 条训练样本并保存为 `dataset.jsonl`。\n*   `--mode graph` 确保主题覆盖的多样性，避免冗余。\n\n### 方式二：使用 YAML 配置文件（推荐用于生产场景）\n\n对于更复杂的场景（如定义具体工具、种子文件、详细系统提示词），建议使用 YAML 配置。\n\n1.  创建名为 `config.yaml` 的文件，内容如下：\n\n```yaml\nllm:\n  provider: \"openai\"\n  model: \"gpt-4o\"\n  temperature: 0.7\n\ntopics:\n  prompt: \"Building production-ready REST APIs with Python\"\n  mode: tree\n  depth: 3\n  degree: 3\n  save_as: \"topics.jsonl\"\n  llm:\n    model: \"gpt-4o-mini\"\n\ngeneration:\n  system_prompt: |\n    You are an expert Python backend developer specializing in REST API design.\n    Create practical, production-ready code examples with clear explanations.\n    Include error handling, type hints, and follow PEP 8 conventions.\n    Use the following tools to read, write, and list files in the virtual filesystem:\n    - read_file\n    - write_file\n    - list_files\n\n  instructions: |\n    Focus on real-world scenarios developers encounter daily when building REST APIs with Python.\n    Include both happy path and edge case handling.\n\n  conversation:\n    type: cot\n    reasoning_style: agent\n\n  tools:\n    spin_endpoint: \"http:\u002F\u002Flocalhost:3000\"\n    components:\n      builtin:\n        - read_file\n        - write_file\n        - list_files\n    max_per_query: 3\n    max_agent_steps: 5\n\n  scenario_seed:\n    files:\n      \"main.py\": |\n        def greet(name):\n            return f\"Hello, {name}!\"\n\noutput:\n  system_prompt: |\n    You are a helpful Python programming assistant specialized in REST API development.\n  include_system_message: true\n  num_samples: 4\n  batch_size: 3\n  save_as: \"api-dataset.jsonl\"\n```\n\n2.  运行配置生成数据：\n\n```bash\ndeepfabric generate config.yaml\n```\n\n### 后续步骤简述\n\n生成 `dataset.jsonl` 后，您可以直接将其上传至 Hugging Face 或加载到主流训练框架中：\n\n*   **上传至 Hugging Face**:\n    ```bash\n    deepfabric upload-hf dataset.jsonl --repo your-username\u002Fmy-dataset\n    ```\n*   **训练与评估**:\n    生成的数据格式兼容 HuggingFace `datasets` 库，可直接配合 **TRL**, **Unsloth**, 或 **Axolotl** 进行微调。DeepFabric 还内置了 `Evaluator` 模块，可在训练后自动评估模型的工具选择准确率和参数准确率。","某金融科技公司正在开发一个能自动执行复杂数据分析的智能体，需要模型精准掌握 Python 代码生成、文件操作及外部 API 调用的组合技能。\n\n### 没有 deepfabric 时\n- **数据质量参差不齐**：人工编写或简单生成的训练数据缺乏真实的推理链条（Reasoning Traces），导致模型只会“猜”代码而不会“规划”步骤。\n- **工具调用频繁出错**：难以构造严格符合 Schema 结构的工具调用样本，模型在真实环境中常因参数格式错误导致执行失败。\n- **场景覆盖存在盲区**：手动构建数据集容易陷入重复模式，遗漏边缘业务场景，造成模型在遇到未见过的任务时表现糟糕。\n- **验证成本高昂**：缺乏自动化的执行环境，无法在训练前确认生成的代码和工具调用是否真正可运行，调试周期漫长。\n\n### 使用 deepfabric 后\n- **推理与行动深度融合**：deepfabric 自动生成包含完整思考过程和工具调用序列的高质量合成数据，教会模型像专家一样先规划后行动。\n- **严格的格式约束保障**：利用受限解码和 WebAssembly 隔离环境实时执行验证，确保每一条训练数据的语法、参数结构绝对正确且可运行。\n- **话题图谱避免过拟合**：通过独特的话题图算法生成多样化样本，自动覆盖所有子领域并消除冗余，显著提升模型对未知任务的泛化能力。\n- **端到端流水线提效**：从数据生成、自动上传至 Hugging Face 到直接接入 TRL\u002FUnsloth 训练框架，再到训后自动化评估，全流程无缝衔接。\n\ndeepfabric 将原本需要数周的数据工程与验证工作压缩为单一管道，让团队能快速迭代出既懂思考又能精准操作工具的高可靠智能体。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Falways-further_deepfabric_28f748e9.png","always-further","Always Further","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Falways-further_530b3e69.png","New Threat Model - New Paradigm - We're Defining It",null,"alwaysfurtherAI","https:\u002F\u002Falwaysfurther.ai","https:\u002F\u002Fgithub.com\u002Falways-further",[83,87,91,95,99],{"name":84,"color":85,"percentage":86},"Python","#3572A5",75,{"name":88,"color":89,"percentage":90},"Jupyter Notebook","#DA5B0B",23.1,{"name":92,"color":93,"percentage":94},"Rust","#dea584",1.7,{"name":96,"color":97,"percentage":98},"Dockerfile","#384d54",0.2,{"name":100,"color":101,"percentage":102},"Makefile","#427819",0.1,856,81,"2026-04-16T16:54:25","Apache-2.0","Linux, macOS, Windows","未说明 (工具主要调用外部 LLM API，本地仅运行评估和轻量级逻辑)","未说明",{"notes":111,"python":112,"dependencies":113},"1. 核心功能依赖外部大模型 API（如 OpenAI），需配置 API Key。\n2. 若使用工具执行功能（Tool Execution），必须运行独立的 Spin 服务（官方提供 Docker 镜像：ghcr.io\u002Falways-further\u002Fdeepfabric\u002Ftools-sdk:latest）。\n3. 支持将生成的数据集直接上传至 Hugging Face 并使用 TRL、Unsloth 或 Axolotl 进行训练。\n4. 评估模块支持本地 Transformers 后端或 Ollama 后端。","3.8+",[114,115,116,117],"datasets","transformers","trl","pyyaml",[13,15,14,119,16],"其他",[121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137],"ai","data-science","dataset","huggingface","huggingface-datasets","machine-learning","synthetic-data","agents","distillation","evaluation","fine-tuning","python","synthetic","open","open-source","source","unsloth","2026-03-27T02:49:30.150509","2026-04-18T14:25:46.792906",[141,146,151,156,161,166,171],{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},39712,"可以使用该工具生成思维链（Chain of Thought）数据吗？","可以。维护者已确认支持生成包含问题、答案和思维链（CoT）的数据。相关功能已在 v2.4.0 版本及后续的 PR 中实现并合并，用户可以通过更新到最新版本来使用此功能。","https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fissues\u002F304",{"id":147,"question_zh":148,"answer_zh":149,"source_url":150},39713,"快速开始（Quickstart）示例中的参数无法正常工作怎么办？","这通常是因为修复 Gemini 提供商 Bug 的发布任务尚未运行导致的。维护者确认在触发发布流程（release job）后问题已解决。如果遇到此问题，请确保使用的是最新发布的版本，或者检查 GitHub Actions 中是否已完成相关的构建和发布任务。","https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fissues\u002F352",{"id":152,"question_zh":153,"answer_zh":154,"source_url":155},39714,"推送到 Hugging Face Hub 时如何添加标签以提高数据集的可发现性？","项目现已支持在推送到 Hub 时自动添加标签。代码库中已集成相关功能（参考 `promptwright\u002Fhf_hub.py`），可以自动添加如 \"promptwright\" 和 \"synthetic\" 等标签，无需用户手动编写脚本来更新 DatasetCard。","https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fissues\u002F8",{"id":157,"question_zh":158,"answer_zh":159,"source_url":160},39715,"如何将命令行中的思维链参数简写为 'cot'？","为了便于输入，项目已将 `--conversation-type chain_of_thought` 重命名为 `--conversation-type cot`。用户现在可以直接使用简短的 `cot` 参数来启用带有推理功能的对话类型。","https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fissues\u002F507",{"id":162,"question_zh":163,"answer_zh":164,"source_url":165},39716,"文档中提到的自定义模板（Custom Templates）功能如何使用？","自定义模板功能（如 `set_custom_template()`）已被弃用。目前项目不再支持该方式，而是依赖 Hugging Face 原生的 `apply_chat_template` 方法来处理模板。用户应直接使用 HF 的标准模板机制。","https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fissues\u002F351",{"id":167,"question_zh":168,"answer_zh":169,"source_url":170},39717,"如何在长时间的数据集生成过程中断点续传？","项目已实现基于检查点（Checkpoint）的恢复功能。系统会在生成指定数量的样本（例如每 500 个样本）后自动将数据转储到文件，并记录节点 UUID 作为检查点。用户可以配置检查点的频率，并在任务中断后从最近的检查点恢复生成，而无需从头开始。","https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fissues\u002F575",{"id":172,"question_zh":173,"answer_zh":174,"source_url":175},39718,"Alpaca 格式的数据集中出现了错误的 Markdown 标签怎么办？","这是一个已知问题，Alpaca 格式的 `instruction` 字段中不应包含 `### Instruction:` 或 `### Response:` 等 Markdown 标记。如果生成的数据中包含这些标签，说明模板配置有误或使用了过时的模板逻辑，应检查并更新模板以移除这些冗余标记，确保输出符合纯文本或正确的 JSON 结构。","https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fissues\u002F379",[177,182,187,192,197,202,207,212,217,222,227,232,237,242,247,252,257,262,267,272],{"id":178,"version":179,"summary_zh":180,"released_at":181},315648,"v4.12.0","## 变更内容\n* 功能新增：新增主题检查和清理命令，由 @scp7 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F598 中实现。\n* 变更：主题生成的默认模式现已改为图模式。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.11.0...v4.12.0","2026-02-03T18:31:20",{"id":183,"version":184,"summary_zh":185,"released_at":186},315649,"v4.11.0","## 变更内容\n* build(deps): 由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F594 中将 astral-sh\u002Fsetup-uv 从 7.2.0 升级至 7.2.1\n* feat: 基于 UUID 的循环生成，包含错误修复和用户体验改进，由 @scp7 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F595 中完成\n* refactor: 实时计算树状结构的主题 ID，移除持久化的 UUID，由 @scp7 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F596 中完成\n* test: 集成测试的健壮性——模拟数据、重试机制、异步处理及诊断功能，由 @scp7 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F597 中实现\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.10.1...v4.11.0","2026-02-02T17:35:10",{"id":188,"version":189,"summary_zh":190,"released_at":191},315650,"v4.10.1","## 变更内容\n* 构建（依赖）：由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F592 中将 transformers 从 5.0.0rc3 升级至 5.0.0\n* 构建（依赖）：由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F593 中将 docker\u002Flogin-action 从 3.6.0 升级至 3.7.0\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.10.0...v4.10.1","2026-01-29T21:46:52",{"id":193,"version":194,"summary_zh":195,"released_at":196},315663,"v4.4.0","## What's Changed\r\n* Multi turn tool eval by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F476\r\n* Add the ability to import spin schemas direct from an MCP server by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F477\r\n* Change Spinclass to basemodel by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F479\r\n* Dockerfiles for tools-sdk by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F480\r\n* Introduce retry failures on Graph generation by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F481\r\n* Bypass outlines for graph generating on gemini and leverage abstracted by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F482\r\n* build(deps): bump astral-sh\u002Fsetup-uv from 7.1.5 to 7.1.6 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F478\r\n* Add image build for spin by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F483\r\n* Provide latest tag on spin image by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F484\r\n* Remove deprecated variable_defaults from spin image by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F485\r\n* Multi stage build for Spin Image by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F486\r\n* Fix stream simulator by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F487\r\n* build(deps): bump docker\u002Flogin-action from 3.4.0 to 3.6.0 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F488\r\n* Stream simulator fix by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F494\r\n* Improve Graph generation and client code layout \u002F fixes by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F493\r\n* build(deps): bump actions\u002Fupload-artifact from 4.6.2 to 6.0.0 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F489\r\n* build(deps): bump sigstore\u002Fcosign-installer from 3.7.0 to 4.0.0 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F490\r\n* build(deps): bump actions\u002Fcheckout from 4.2.2 to 6.0.1 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F491\r\n* build(deps): bump docker\u002Fmetadata-action from 5.7.0 to 5.10.0 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F492\r\n* Don't auto-derive tools_endpoint when available_tools is specified by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F495\r\n* build(deps): bump docker\u002Fbuild-push-action from 6.16.0 to 6.18.0 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F496\r\n* Fix graph rendering and provide better error handling for rate limits by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F499\r\n* Improve spin configuration by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F501\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.3.1...v4.4.0","2025-12-20T17:30:26",{"id":198,"version":199,"summary_zh":200,"released_at":201},315664,"v4.3.1","## What's Changed\r\n* Account for tool schema properties that have None\u002Fnull values by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F474\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.3.0...v4.3.1","2025-12-11T20:35:47",{"id":203,"version":204,"summary_zh":205,"released_at":206},315665,"v4.3.0","## What's Changed\r\n* build(deps): bump astral-sh\u002Fsetup-uv from 7.1.4 to 7.1.5 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F466\r\n* Implement Execution Based Tool Filtering by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F468\r\n* Introduce Provider API KEY checks earlier by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F471\r\n* Training CallBack  by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F459\r\n* OpenAI schema fix and release 4.3.0 by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F473\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.2.1...v4.3.0","2025-12-11T08:19:24",{"id":208,"version":209,"summary_zh":210,"released_at":211},315666,"v4.2.1","## What's Changed\r\n* Fix missing API Key checks by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F465\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.2.0...v4.2.1","2025-12-08T08:11:20",{"id":213,"version":214,"summary_zh":215,"released_at":216},315667,"v4.2.0","## What's Changed\r\n* Universal Format by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F463\r\n* Implement Mistral Regex Flag for transformers by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F464\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.1.0...v4.2.0","2025-12-07T16:38:41",{"id":218,"version":219,"summary_zh":220,"released_at":221},315651,"v4.10.0","## 变更内容\n* docs(training): 更新关于额外训练的文档，由 @ognis1205 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F581 中完成\n* 移除多轮对话代理模式，由 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F584 中完成\n* build(deps): 将 transformers 从 5.0.0rc2 升级至 5.0.0rc3，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F582 中完成\n* chore: 添加 GitHub 问题和 PR 模板，由 @ognis1205 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F564 中完成\n* feat: 添加基于自动和百分比的 num_samples 配置选项，由 @scp7 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F585 中完成\n* 功能：检查点 v2，由 @scp7 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F589 中完成\n* build(deps): 将 actions\u002Fsetup-python 从 6.1.0 升级至 6.2.0，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F587 中完成\n* build(deps): 将 actions\u002Fcheckout 从 6.0.1 升级至 6.0.2，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F588 中完成\n* feat: 检查点改进——支持 XDG 路径、优雅停止以及用户体验优化，由 @scp7 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F590 中完成\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.9.0...v4.10.0","2026-01-26T12:35:52",{"id":223,"version":224,"summary_zh":225,"released_at":226},315652,"v4.9.0","## 变更内容\n* 由 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F580 中将 huggingface-hub 升级至 1.3.1，将 transformers 升级至 5.0\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.8.3...v4.9.0","2026-01-14T11:52:15",{"id":228,"version":229,"summary_zh":230,"released_at":231},315653,"v4.8.3","## 变更内容\n* 移除 mcp-adversarial-suite，由 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F560 中完成\n* build(deps): 将 astral-sh\u002Fsetup-uv 从 7.1.6 升级到 7.2.0，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F561 中完成\n* docs: 添加 CODE_OF_CONDUCT.md，由 @ognis1205 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F563 中完成\n* chore: 将 PostHog 迁移到欧盟托管，由 @scp7 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F540 中完成\n* docs: 添加 CONTRIBUTING.md，由 @ognis1205 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F577 中完成\n* 添加 DeepFabric 数据集生成文档及 prompt_style 配置，由 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F578 中完成\n* 在配置中引入 prompt_style，由 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F579 中完成\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.8.2...v4.8.3","2026-01-12T20:58:57",{"id":233,"version":234,"summary_zh":235,"released_at":236},315654,"v4.8.2","## 变更内容\n* 功能（依赖）：添加可选的训练依赖，由 @ognis1205 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F549 中完成\n* 修复 MCP 工具对可空 JSON Schema 类型的验证问题，由 @scp7 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F559 中完成\n* 更新训练依赖的 uv 锁，由 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F558 中完成\n\n## 新贡献者\n* @ognis1205 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F549 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.8.1...v4.8.2","2026-01-06T18:24:09",{"id":238,"version":239,"summary_zh":240,"released_at":241},315655,"v4.8.1","## 变更内容\n* 处理由 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F556 中提出的先前思维链命名问题\n* 由 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F557 中将版本号提升至 v481 以进行发布\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.8.0...v4.8.1","2026-01-05T19:44:57",{"id":243,"version":244,"summary_zh":245,"released_at":246},315656,"v4.8.0","## 变更内容\n* 由 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F547 中修复了 URL\n* 修复：在 ToolContext 中为 available_tools 添加向后兼容性…，由 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F550 中完成\n* 由 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F555 中将版本号提升至 v480 以进行发布\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.7.1...v4.8.0","2026-01-05T14:05:24",{"id":248,"version":249,"summary_zh":250,"released_at":251},315657,"v4.7.1","## 变更内容\n* 修复：通过 @lukehinds 在 https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F546 中的提交，为原生 Dataset.map() 添加了对 HuggingFace Dataset 的兼容性。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.7.0...v4.7.1","2026-01-04T14:05:47",{"id":253,"version":254,"summary_zh":255,"released_at":256},315658,"v4.7.0","## What's Changed\r\n* Enable upload via API KEY by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F545\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.6.0...v4.7.0","2026-01-04T13:32:13",{"id":258,"version":259,"summary_zh":260,"released_at":261},315659,"v4.6.0","## What's Changed\r\n* Much needed docs update, too much to mention by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F512\r\n* Mention spin needed for readme config by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F513\r\n* Add the Blender MCP notebook by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F514\r\n* Fix incorrect configs by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F515\r\n* Fix missing doc links by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F516\r\n* Use material features in docs by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F517\r\n* Better navbar, menu formatting for docs by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F518\r\n* Better homepage formatting by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F519\r\n* Improve render of steps by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F520\r\n* Extend integration changes by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F522\r\n* Add LLM client integration tests for OpenAI and Gemini by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F523\r\n* Add Graph and DataSetGenerator integration tests by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F524\r\n* Add MCP Adversarial Suite example configs by @dtang19 in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F525\r\n* Add Spin client integration tests with real container by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F527\r\n* Improve Spin Documentation by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F529\r\n* Rename chain_of_thought conversation type to cot by @itsdevrajchauhan in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F528\r\n* Introduce EXPERIMENTAL_DF flag to gate cloud features by @scp7 in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F531\r\n* Add metadata fields to graph structure by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F532\r\n* Training metrics by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F534\r\n* Fix TUI error visibility on API key failures by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F536\r\n* Add cloud upload feature for datasets and topic graphs by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F537\r\n* Add native load_dataset function and Dataset class for DeepFabric SDK by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F541\r\n* Alow upload of datasets and graphs to the cloud service by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F544\r\n\r\n## New Contributors\r\n* @dtang19 made their first contribution in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F525\r\n* @itsdevrajchauhan made their first contribution in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F528\r\n* @scp7 made their first contribution in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F531\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.5.1...v4.6.0","2026-01-03T20:55:13",{"id":263,"version":264,"summary_zh":265,"released_at":266},315660,"v4.5.1","## What's Changed\r\n* Fix ToolExecution regression by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F506\r\n* Rename upload to upload-hf inline with other providers by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F508\r\n* Improve quickstart page by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F509\r\n* Add reddit badge by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F510\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.5.0...v4.5.1","2025-12-26T12:51:41",{"id":268,"version":269,"summary_zh":270,"released_at":271},315661,"v4.5.0","## What's Changed\r\n* Increase max tokens on reasoning example by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F504\r\n* Allow API based models for evaluations by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F505\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.4.1...v4.5.0","2025-12-25T15:13:59",{"id":273,"version":274,"summary_zh":275,"released_at":276},315662,"v4.4.1","## What's Changed\r\n* build(deps): bump actions\u002Fdownload-artifact from 4.3.0 to 7.0.0 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F498\r\n* build(deps): bump docker\u002Fsetup-buildx-action from 3.10.0 to 3.12.0 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F500\r\n* Pass the correct namespace to model_rebuild() by @lukehinds in https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fpull\u002F503\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Falways-further\u002Fdeepfabric\u002Fcompare\u002Fv4.4.0...v4.4.1","2025-12-21T09:07:51"]