[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-Conchylicultor--DeepQA":3,"tool-Conchylicultor--DeepQA":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 真正成长为懂上",142651,2,"2026-04-06T23:34:12",[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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[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},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":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":72,"owner_avatar_url":73,"owner_bio":74,"owner_company":75,"owner_location":76,"owner_email":77,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":110,"forks":111,"last_commit_at":112,"license":113,"difficulty_score":114,"env_os":115,"env_gpu":116,"env_ram":117,"env_deps":118,"category_tags":130,"github_topics":131,"view_count":32,"oss_zip_url":78,"oss_zip_packed_at":78,"status":17,"created_at":136,"updated_at":137,"faqs":138,"releases":169},4881,"Conchylicultor\u002FDeepQA","DeepQA","My tensorflow implementation of \"A neural conversational model\", a Deep learning based chatbot","DeepQA 是一个基于 TensorFlow 开源实现的智能对话机器人项目，旨在复现谷歌著名的“神经对话模型”研究成果。它利用循环神经网络（RNN）中的序列到序列（seq2seq）架构，让机器能够理解上下文并生成自然流畅的回复，从而解决传统规则式聊天机器人回答生硬、缺乏灵活性的问题。\n\n该项目支持多种高质量对话语料库，包括默认的康奈尔电影对白数据集，以及 OpenSubtitles、最高法院辩论记录和 Ubuntu 技术问答数据等，用户也可以轻松导入自定义数据进行训练。为了提升效率，DeepQA 还兼容预训练词向量，并提供了从命令行交互到 Django Web 界面的多种运行方式，甚至支持 Docker 一键部署。\n\nDeepQA 特别适合人工智能开发者、深度学习研究人员以及希望探索自然语言处理（NLP）的学生使用。通过它，用户可以深入研究端到端的对话生成机制，快速搭建自己的聊天机器人原型，或对比不同语料对模型效果的影响。作为一个结构清晰的教育级项目，DeepQA 为理解现代神经对话系统提供了宝贵的实践入口。","# Deep Q&A\n[![Join the chat at https:\u002F\u002Fgitter.im\u002Fchatbot-pilots\u002FDeepQA](https:\u002F\u002Fbadges.gitter.im\u002Fchatbot-pilots\u002FDeepQA.svg)](https:\u002F\u002Fgitter.im\u002Fchatbot-pilots\u002FDeepQA?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n#### Table of Contents\n\n* [Presentation](#presentation)\n* [Installation](#installation)\n* [Running](#running)\n    * [Chatbot](#chatbot)\n    * [Web interface](#web-interface)\n* [Results](#results)\n* [Pretrained model](#pretrained-model)\n* [Improvements](#improvements)\n* [Upgrade](#upgrade)\n\n## Presentation\n\nThis work tries to reproduce the results of [A Neural Conversational Model](http:\u002F\u002Farxiv.org\u002Fabs\u002F1506.05869) (aka the Google chatbot). It uses a RNN (seq2seq model) for sentence predictions. It is done using python and TensorFlow.\n\nThe loading corpus part of the program is inspired by the Torch [neuralconvo](https:\u002F\u002Fgithub.com\u002Fmacournoyer\u002Fneuralconvo) from [macournoyer](https:\u002F\u002Fgithub.com\u002Fmacournoyer).\n\nFor now, DeepQA support the following dialog corpus:\n * [Cornell Movie Dialogs](http:\u002F\u002Fwww.cs.cornell.edu\u002F~cristian\u002FCornell_Movie-Dialogs_Corpus.html) corpus (default). Already included when cloning the repository.\n * [OpenSubtitles](http:\u002F\u002Fopus.lingfil.uu.se\u002FOpenSubtitles.php) (thanks to [Eschnou](https:\u002F\u002Fgithub.com\u002Feschnou)). Much bigger corpus (but also noisier). To use it, follow [those instructions](data\u002Fopensubs\u002F) and use the flag `--corpus opensubs`.\n * Supreme Court Conversation Data (thanks to [julien-c](https:\u002F\u002Fgithub.com\u002Fjulien-c)). Available using `--corpus scotus`. See the [instructions](data\u002Fscotus\u002F) for installation.\n * [Ubuntu Dialogue Corpus](https:\u002F\u002Farxiv.org\u002Fabs\u002F1506.08909) (thanks to [julien-c](https:\u002F\u002Fgithub.com\u002Fjulien-c)). Available using `--corpus ubuntu`. See the [instructions](data\u002Fubuntu\u002F) for installation.\n * Your own data (thanks to [julien-c](https:\u002F\u002Fgithub.com\u002Fjulien-c)) by using a simple custom conversation format (See [here](data\u002Flightweight) for more info).\n\nTo speedup the training, it's also possible to use pre-trained word embeddings (thanks to [Eschnou](https:\u002F\u002Fgithub.com\u002Feschnou)). More info [here](data\u002Fembeddings).\n\n## Installation\n\nThe program requires the following dependencies (easy to install using pip: `pip3 install -r requirements.txt`):\n * python 3.5\n * tensorflow (tested with v1.0)\n * numpy\n * CUDA (for using GPU)\n * nltk (natural language toolkit for tokenized the sentences)\n * tqdm (for the nice progression bars)\n\nYou might also need to download additional data to make nltk work.\n\n```\npython3 -m nltk.downloader punkt\n```\n\nThe Cornell dataset is already included. For the other datasets, look at the readme files into their respective folders (inside `data\u002F`).\n\nThe web interface requires some additional packages:\n * django (tested with 1.10)\n * channels\n * Redis (see [here](http:\u002F\u002Fredis.io\u002Ftopics\u002Fquickstart))\n * asgi_redis (at least 1.0)\n\nA Docker installation is also available. More detailed instructions [here](docker\u002FREADME.md).\n\n## Running\n\n### Chatbot\n\nTo train the model, simply run `main.py`. Once trained, you can test the results with `main.py --test` (results generated in 'save\u002Fmodel\u002Fsamples_predictions.txt') or `main.py --test interactive` (more fun).\n\nHere are some flags which could be useful. For more help and options, use `python main.py -h`:\n * `--modelTag \u003Cname>`: allow to give a name to the current model to differentiate between them when testing\u002Ftraining.\n * `--keepAll`: use this flag when training if when testing, you want to see the predictions at different steps (it can be interesting to see the program changes its name and age as the training progress). Warning: It can quickly take a lot of storage space if you don't increase the `--saveEvery` option.\n * `--filterVocab 20` or `--vocabularySize 30000`: Limit the vocabulary size to and optimize the performances and memory usage. Replace the words used less than 20 times by the `\u003Cunknown>` token and set a maximum vocabulary size.\n * `--verbose`: when testing, will print the sentences as they are computed.\n * `--playDataset`: show some dialogue samples from the dataset (can be use conjointly with `--createDataset` if this is the only action you want to perform).\n\nTo visualize the computational graph and the cost with [TensorBoard](https:\u002F\u002Fwww.tensorflow.org\u002Fhow_tos\u002Fsummaries_and_tensorboard\u002F), just run `tensorboard --logdir save\u002F`.\n\nBy default, the network architecture is a standard encoder\u002Fdecoder with two LSTM layers (hidden size of 256) and an embedding size for the vocabulary of 32. The network is trained using ADAM. The maximum sentence length is set to 10 words, but can be increased.\n\n### Web interface\n\nOnce trained, it's possible to chat with it using a more user friendly interface. The server will look at the model copied to `save\u002Fmodel-server\u002Fmodel.ckpt`. The first time you want to use it, you'll need to configure it with:\n\n```bash\nexport CHATBOT_SECRET_KEY=\"my-secret-key\"\ncd chatbot_website\u002F\npython manage.py makemigrations\npython manage.py migrate\n```\n\nThen, to launch the server locally, use the following commands:\n\n```bash\ncd chatbot_website\u002F\nredis-server &  # Launch Redis in background\npython manage.py runserver\n```\n\nAfter launch, the interface should be available on [http:\u002F\u002Flocalhost:8000\u002F](http:\u002F\u002Flocalhost:8000\u002F). If you want to deploy the program on a server, use `python manage.py runserver 0.0.0.0` instead. More info [here](https:\u002F\u002Fdocs.djangoproject.com\u002Fen\u002F1.10\u002Fhowto\u002Fdeployment\u002Fchecklist\u002F).\n\n[![Chatbot web interface](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FConchylicultor_DeepQA_readme_0a1a4fde02cf.png)](http:\u002F\u002Fe-pot.xyz\u002Fcv\u002Fchatbot.png)\n\n## Results\n\nSurprisingly, it's possible to get some results after only 1 or 2 hours of training (on a GeForce GT 740M), by drastically reducing the input sequence to 5 words and output to 3 (plus the `go` and `eos` tokens) and by using a small embedding size (something like 25). Since then I modified the code and now the output length has to match the input one but you can still reproduce the original results, using [this version](https:\u002F\u002Fgithub.com\u002FConchylicultor\u002FDeepQA\u002Ftree\u002F92863e2929580818f866f16969909fe2093d41d1).\nOf course, the network won't be really chatty:\n\n    Q: Hi\n    A: Hi.\n\n    Q: What is your name ?\n    A: Laura.\n\n    Q: What does that mean ?\n    A: I dunno.\n\n    Q: How old are you ?\n    A: thirty-five.\n\n    Q: Will Google hire me ?\n    A: No.\n\n    Q: Tell me the alphabet\n    A: Fuck you.\n\n    Q: That's not nice\n    A: Yeah.\n\nHere is some case where it fails:\n\n    Q: Who is Laura ?\n    A: My brother.\n\n    Q: Say 'goodbye'\n    A: Alright.\n\n    Q: What is cooking ?\n    A: A channel.\n\n    Q: Can you say no ?\n    A: No.\n\n    Q: Two plus two\n    A: Manny...\n\nWith longer sentences, the network is much slower to train. After 250000 iterations with maxLength=10, the network still mainly gives evasive answers (by answering most of the open ended questions by 'I don't know') but it seems to have integrated some basic semantic:\n\n    Q: When are the fireworks ?\n    A: Tomorrow.\n\n    Q: What color ?\n    A: Gray.\n\n    Q: Which apple ?\n    A: That's the first one.\n\n    Q: What time is it ?\n    A: Eleven o'clock.\n\n    Q: Who is Skywalker ?\n    A: She's a freelance bio-exorcist.\n\n    Q: Who is John ?\n    A: The old man.\n\n    Q: Who is Jenny ?\n    A: The man who killed herself.\n\n    Q: When were you born ?\n    A: Soon.\n\nAs shown on the last questions, the network still does some confusion between the genders and the present\u002Ffuture. I also tried some deeper philosophical questions with more or less success.\n\n    Q: What is the purpose of being intelligent ?\n    A: The man are obsolete.\n\n    Q: What is immoral ?\n    A: The truth.\n\n    Q: What is morality ?\n    A: The worst.\n\n    Q: What is the purpose of existence ?\n    A: It 's private.\n\n    Q: What happens if machines can think ?\n    A: I think I'll just lie with you.\n\nThe model I trained is quite limited by the embedding size I put and by its size, and by the training corpus size. Its 'thought vector' is also probably too small to answer the kind of following:\n\n    Q: My name is David. What is my name ?\n    A: Debbie.\n\n    Q: My name is John. What is my name ?\n    A: Carl Smith.\n\n    Q: How many legs does a cat have ?\n    A: Four.\n\n    Q: How many legs does a spider have ?\n    A: Four.\n\n    Q: Do you prefer football or soccer ?\n    A: Whiskey.\n\nIt also seems to overfit as sometimes it will just pop out sentences from its training set unrelated to the question. Adding some dropout should reduce the issue.\n\n    Q: I play tennis. What do I play ?\n    A: I'm going to get laid.\n\n    Q: What color is the sky ?\n    A: One of the deputies is everywhere.\n\n## Pretrained model (not working)\n\nNote: Links do not work anymore.\n\n~~You can find a pre-trained model [here](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F0Bw-phsNSkq23OXRFTkNqN0JGUU0\u002Fview?usp=sharing)~~, trained of the default corpus. To use it:\n 1. Extract the zip file inside `DeepQA\u002Fsave\u002F`\n 2. Copy the preprocessed dataset from `save\u002Fmodel-pretrainedv2\u002Fdataset-cornell-old-lenght10-filter0-vocabSize0.pkl` to `data\u002Fsamples\u002F`.\n 3. Run `.\u002Fmain.py --modelTag pretrainedv2 --test interactive`.\n\nThanks to Nicholas C., [here](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F0Bw-phsNSkq23c29ZQ2N6X3lyc1U?resourcekey=0-u1yOQjC701db6O9FfCW9EA&usp=sharing) ([original](https:\u002F\u002Fmcastedu-my.sharepoint.com\u002Fpersonal\u002Fnicholas_cutajar_a100636_mcast_edu_mt\u002F_layouts\u002F15\u002Fguestaccess.aspx?folderid=077576c4cf9854642a968f67909380f45&authkey=AVt2JWMPkf2R_mWBpI1eAUY)) are some additional pre-trained models (compatible with TF 1.2) for diverse datasets. The folder also contains the pre-processed dataset for Cornell, OpenSubtitles, Ubuntu and Scotus (to move inside `data\u002Fsamples\u002F`). Those are required is you don't want to process the datasets yourself.\n\nIf you have a high-end GPU, don't hesitate to play with the hyper-parameters\u002Fcorpus to train a better model. From my experiments, it seems that the learning rate and dropout rate have the most impact on the results. Also if you want to share your models, don't hesitate to contact me and I'll add it here.\n\n## Improvements\n\nIn addition to trying larger\u002Fdeeper model, there are a lot of small improvements which could be tested. Don't hesitate to send a pull request if you implement one of those. Here are some ideas:\n\n* For now, the predictions are deterministic (the network just take the most likely output) so when answering a question, the network will always gives the same answer. By adding a sampling mechanism, the network could give more diverse (and maybe more interesting) answers. The easiest way to do that is to sample the next predicted word from the SoftMax probability distribution. By combining that with the `loop_function` argument of `tf.nn.seq2seq.rnn_decoder`, it shouldn't be too difficult to add. After that, it should be possible to play with the SoftMax temperature to get more conservative or exotic predictions.\n* Adding attention could potentially improve the predictions, especially for longer sentences. It should be straightforward by replacing `embedding_rnn_seq2seq` by `embedding_attention_seq2seq` on `model.py`.\n* Having more data usually don't hurt. Training on a bigger corpus should be beneficial. [Reddit comments dataset](https:\u002F\u002Fwww.reddit.com\u002Fr\u002Fdatasets\u002Fcomments\u002F59039y\u002Fupdated_reddit_comment_dataset_up_to_201608\u002F) seems the biggest for now (and is too big for this program to support it). Another trick to artificially increase the dataset size when creating the corpus could be to split the sentences of each training sample (ex: from the sample `Q:Sentence 1. Sentence 2. => A:Sentence X. Sentence Y.` we could generate 3 new samples: `Q:Sentence 1. Sentence 2. => A:Sentence X.`, `Q:Sentence 2. => A:Sentence X. Sentence Y.` and `Q:Sentence 2. => A:Sentence X.`. Warning: other combinations like `Q:Sentence 1. => A:Sentence X.` won't work because it would break the transition `2 => X` which links the question to the answer)\n* The testing curve should really be monitored as done in my other [music generation](https:\u002F\u002Fgithub.com\u002FConchylicultor\u002FMusicGenerator) project. This would greatly help to see the impact of dropout on overfitting. For now it's just done empirically by manually checking the testing prediction at different training steps.\n* For now, the questions are independent from each other. To link questions together, a straightforward way would be to feed all previous questions and answer to the encoder before giving the answer. Some caching could be done on the final encoder stated to avoid recomputing it each time. To improve the accuracy, the network should be retrain on entire dialogues instead of just individual QA. Also when feeding the previous dialogue to the encoder, new tokens `\u003CQ>` and `\u003CA>` could be added so the encoder knows when the interlocutor is changing. I'm not sure though that the simple seq2seq model would be sufficient to capture long term dependencies between sentences. Adding a bucket system to group similar input lengths together could greatly improve training speed.\n","# 深度问答\n[![加入聊天 https:\u002F\u002Fgitter.im\u002Fchatbot-pilots\u002FDeepQA](https:\u002F\u002Fbadges.gitter.im\u002Fchatbot-pilots\u002FDeepQA.svg)](https:\u002F\u002Fgitter.im\u002Fchatbot-pilots\u002FDeepQA?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n#### 目录\n\n* [简介](#presentation)\n* [安装](#installation)\n* [运行](#running)\n    * [聊天机器人](#chatbot)\n    * [Web 界面](#web-interface)\n* [结果](#results)\n* [预训练模型](#pretrained-model)\n* [改进](#improvements)\n* [升级](#upgrade)\n\n## 简介\n\n本项目旨在复现 [A Neural Conversational Model](http:\u002F\u002Farxiv.org\u002Fabs\u002F1506.05869)（即谷歌聊天机器人）的研究成果。它使用 RNN（seq2seq 模型）进行句子预测，开发语言为 Python，框架为 TensorFlow。\n\n程序中的语料加载部分受到 Torch 的 [neuralconvo](https:\u002F\u002Fgithub.com\u002Fmacournoyer\u002Fneuralconvo) 项目的启发，该项目由 [macournoyer](https:\u002F\u002Fgithub.com\u002Fmacournoyer) 开发。\n\n目前，DeepQA 支持以下对话语料库：\n * [康奈尔电影对话数据集](http:\u002F\u002Fwww.cs.cornell.edu\u002F~cristian\u002FCornell_Movie-Dialogs_Corpus.html)（默认）。克隆仓库时已包含。\n * [OpenSubtitles](http:\u002F\u002Fopus.lingfil.uu.se\u002FOpenSubtitles.php)（感谢 [Eschnou](https:\u002F\u002Fgithub.com\u002Feschnou)）。该语料库规模更大，但噪声也更多。要使用它，请按照 [这些说明](data\u002Fopensubs\u002F)操作，并使用 `--corpus opensubs` 标志。\n * 美国最高法院对话数据集（感谢 [julien-c](https:\u002F\u002Fgithub.com\u002Fjulien-c)）。可通过 `--corpus scotus` 使用。安装说明请参见 [这里](data\u002Fscotus\u002F)。\n * [Ubuntu 对话数据集](https:\u002F\u002Farxiv.org\u002Fabs\u002F1506.08909)（感谢 [julien-c](https:\u002F\u002Fgithub.com\u002Fjulien-c)）。可通过 `--corpus ubuntu` 使用。安装说明请参见 [这里](data\u002Fubuntu\u002F)。\n * 自定义数据集（感谢 [julien-c](https:\u002F\u002Fgithub.com\u002Fjulien-c)），只需采用简单的自定义对话格式即可（更多信息请参见 [这里](data\u002Flightweight)）。\n\n为了加快训练速度，还可以使用预训练的词嵌入（感谢 [Eschnou](https:\u002F\u002Fgithub.com\u002Feschnou)）。更多信息请参见 [这里](data\u002Fembeddings)。\n\n## 安装\n\n该程序需要以下依赖项（可使用 pip 轻松安装：`pip3 install -r requirements.txt`）：\n * Python 3.5\n * TensorFlow（已测试 v1.0）\n * NumPy\n * CUDA（用于 GPU 加速）\n * NLTK（自然语言处理工具包，用于对句子进行分词）\n * tqdm（用于显示漂亮的进度条）\n\n此外，您可能还需要下载一些额外的数据以使 NLTK 正常工作。\n\n```\npython3 -m nltk.downloader punkt\n```\n\n康奈尔数据集已包含在内。对于其他数据集，请查看各自文件夹（位于 `data\u002F` 内）中的 README 文件。\n\nWeb 界面还需要一些额外的软件包：\n * Django（已测试 1.10 版）\n * Channels\n * Redis（详情请参见 [这里](http:\u002F\u002Fredis.io\u002Ftopics\u002Fquickstart)）\n * asgi_redis（至少 1.0 版）\n\n此外，还提供 Docker 安装方式。详细说明请参见 [这里](docker\u002FREADME.md)。\n\n## 运行\n\n### 聊天机器人\n\n要训练模型，只需运行 `main.py` 即可。训练完成后，您可以使用 `main.py --test` 测试结果（生成的测试结果位于 `save\u002Fmodel\u002Fsamples_predictions.txt`）或 `main.py --test interactive`（更有趣）。\n\n以下是一些可能有用的标志。如需更多帮助和选项，请使用 `python main.py -h`：\n * `--modelTag \u003Cname>`：为当前模型命名，以便在测试和训练时区分不同模型。\n * `--keepAll`：在训练时使用此标志，以便在测试时查看不同步骤的预测结果（例如，随着训练的进行，程序可能会逐渐调整其名称和年龄等信息）。注意：如果不增加 `--saveEvery` 选项，存储空间可能会迅速耗尽。\n * `--filterVocab 20` 或 `--vocabularySize 30000`：限制词汇表大小，以优化性能和内存使用。将出现频率低于 20 次的单词替换为 `\u003Cunknown>` 标记，并设置最大词汇量。\n * `--verbose`：在测试时，会打印出正在计算的句子。\n * `--playDataset`：展示来自数据集的一些对话样本（如果这是您唯一想执行的操作，可以与 `--createDataset` 结合使用）。\n\n要使用 [TensorBoard](https:\u002F\u002Fwww.tensorflow.org\u002Fhow_tos\u002Fsummaries_and_tensorboard\u002F) 可视化计算图和损失函数，只需运行 `tensorboard --logdir save\u002F` 即可。\n\n默认情况下，网络架构为标准的编码器\u002F解码器结构，包含两层 LSTM（隐藏层大小为 256），词汇表嵌入维度为 32。网络使用 ADAM 优化器进行训练。最大句子长度设置为 10 个词，但可以增加。\n\n### Web 界面\n\n训练完成后，您可以使用更友好的界面与其进行对话。服务器将读取复制到 `save\u002Fmodel-server\u002Fmodel.ckpt` 的模型文件。首次使用时，您需要先进行配置：\n\n```bash\nexport CHATBOT_SECRET_KEY=\"my-secret-key\"\ncd chatbot_website\u002F\npython manage.py makemigrations\npython manage.py migrate\n```\n\n然后，在本地启动服务器时，使用以下命令：\n\n```bash\ncd chatbot_website\u002F\nredis-server &  # 在后台启动 Redis\npython manage.py runserver\n```\n\n启动后，界面应可在 [http:\u002F\u002Flocalhost:8000\u002F](http:\u002F\u002Flocalhost:8000\u002F) 访问。如果您想将程序部署到服务器上，请使用 `python manage.py runserver 0.0.0.0` 替代。更多信息请参见 [这里](https:\u002F\u002Fdocs.djangoproject.com\u002Fen\u002F1.10\u002Fhowto\u002Fdeployment\u002Fchecklist\u002F)。\n\n[![聊天机器人 Web 界面](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FConchylicultor_DeepQA_readme_0a1a4fde02cf.png)](http:\u002F\u002Fe-pot.xyz\u002Fcv\u002Fchatbot.png)\n\n## 结果\n\n令人惊讶的是，仅经过1至2小时的训练（在GeForce GT 740M上），就能得到一些结果。方法是将输入序列大幅缩减至5个词、输出缩减至3个词（加上`go`和`eos`标记），并使用较小的嵌入维度（比如25）。此后我对代码进行了修改，现在要求输入和输出长度一致，但仍然可以通过[这个版本](https:\u002F\u002Fgithub.com\u002FConchylicultor\u002FDeepQA\u002Ftree\u002F92863e2929580818f866f16969909fe2093d41d1)复现最初的效果。\n\n当然，生成的对话并不会特别流畅：\n\n    Q: 你好\n    A: 你好。\n\n    Q: 你叫什么名字？\n    A: 劳拉。\n\n    Q: 那是什么意思？\n    A: 我不知道。\n\n    Q: 你多大了？\n    A: 三十五岁。\n\n    Q: 谷歌会雇用我吗？\n    A: 不会。\n\n    Q: 给我说说字母表吧\n    A: 去你的。\n\n    Q: 这可不太礼貌\n    A: 是啊。\n\n以下是一些它表现不佳的例子：\n\n    Q: 劳拉是谁？\n    A: 我的兄弟。\n\n    Q: 说声再见\n    A: 好吧。\n\n    Q: 在煮什么？\n    A: 一个频道。\n\n    Q: 你能说“不”吗？\n    A: 不。\n\n    Q: 二加二\n    A: 曼尼……\n\n当句子变长时，网络的训练速度会显著降低。在maxLength=10、迭代次数达到25万次后，网络仍然主要给出回避性的回答（对大多数开放式问题都回答“我不知道”），不过似乎已经掌握了一些基本语义：\n\n    Q: 烟花什么时候放？\n    A: 明天。\n\n    Q: 什么颜色？\n    A: 灰色。\n\n    Q: 哪个苹果？\n    A: 那第一个。\n\n    Q: 现在几点了？\n    A: 十一点。\n\n    Q: 斯凯沃克是谁？\n    A: 她是一名自由职业的生物驱魔师。\n\n    Q: 约翰是谁？\n    A: 那位老人。\n\n    Q: 珍妮是谁？\n    A: 自杀的那个男人。\n\n    Q: 你什么时候出生的？\n    A: 很快。\n\n从最后几个问题可以看出，网络在性别以及现在\u002F未来的区分上仍存在混淆。我还尝试了一些更深层次的哲学问题，效果参差不齐：\n\n    Q: 拥有智慧的意义是什么？\n    A: 人类已经过时了。\n\n    Q: 什么是不道德的？\n    A: 真相。\n\n    Q: 什么是道德？\n    A: 最糟糕的。\n\n    Q: 存在的意义是什么？\n    A: 这是私人的。\n\n    Q: 如果机器能够思考，会发生什么？\n    A: 我想我只会和你一起躺着。\n\n我训练的模型受限于所设置的嵌入维度、模型规模以及训练数据集的大小。它的“思维向量”可能也太小，难以应对如下类型的问题：\n\n    Q: 我叫大卫。我叫什么名字？\n    A: 黛比。\n\n    Q: 我叫约翰。我叫什么名字？\n    A: 卡尔·史密斯。\n\n    Q: 猫有几条腿？\n    A: 四条。\n\n    Q: 蜘蛛有几条腿？\n    A: 四条。\n\n    Q: 你更喜欢橄榄球还是足球？\n    A: 威士忌。\n\n此外，模型似乎出现了过拟合现象，有时会直接输出与问题无关的训练集中句子。加入dropout层或许能缓解这一问题。\n\n    Q: 我打网球。我在打什么？\n    A: 我要搞到女人了。\n\n    Q: 天空是什么颜色？\n    A: 其中一名议员无处不在。\n\n## 预训练模型（已失效）\n\n注意：链接已无法访问。\n\n~~你可以[在这里](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F0Bw-phsNSkq23OXRFTkNqN0JGUU0\u002Fview?usp=sharing)找到一个基于默认语料库训练的预训练模型~~，使用方法如下：\n 1. 将压缩包解压到`DeepQA\u002Fsave\u002F`目录下。\n 2. 将预处理后的数据集从`save\u002Fmodel-pretrainedv2\u002Fdataset-cornell-old-lenght10-filter0-vocabSize0.pkl`复制到`data\u002Fsamples\u002F`目录。\n 3. 运行`.\u002Fmain.py --modelTag pretrainedv2 --test interactive`。\n\n感谢Nicholas C.，[这里](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F0Bw-phsNSkq23c29ZQ2N6X3lyc1U?resourcekey=0-u1yOQjC701db6O9FfCW9EA&usp=sharing)（[原始链接](https:\u002F\u002Fmcastedu-my.sharepoint.com\u002Fpersonal\u002Fnicholas_cutajar_a100636_mcast_edu_mt\u002F_layouts\u002F15\u002Fguestaccess.aspx?folderid=077576c4cf9854642a968f67909380f45&authkey=AVt2JWMPkf2R_mWBpI1eAUY)）提供了一些兼容TF 1.2的额外预训练模型，适用于多种数据集。该文件夹还包含Cornell、OpenSubtitles、Ubuntu和Scotus数据集的预处理版本（需移动至`data\u002Fsamples\u002F`目录）。如果你不想自行处理这些数据集，可以使用它们。\n\n如果你拥有高端GPU，不妨尝试调整超参数或更换训练语料，以训练出更好的模型。根据我的实验，学习率和dropout率对最终效果的影响最大。另外，如果你愿意分享自己的模型，请随时联系我，我会在此处补充。\n\n## 改进\n\n除了尝试更大\u002F更深的模型之外，还有很多小的改进可以尝试。如果你实现了其中任何一项，请随时提交拉取请求。以下是一些想法：\n\n* 目前，预测是确定性的（网络只是选择概率最高的输出），因此在回答问题时，网络总是给出相同的答案。通过添加采样机制，网络可以生成更加多样化（或许也更有趣）的答案。最简单的方法是从 SoftMax 概率分布中采样下一个预测的词。结合 `tf.nn.seq2seq.rnn_decoder` 的 `loop_function` 参数，实现起来应该不会太难。之后，还可以调整 SoftMax 的温度参数，以获得更保守或更具创意的预测。\n* 添加注意力机制可能会提升预测效果，尤其是在处理较长句子时。只需在 `model.py` 中将 `embedding_rnn_seq2seq` 替换为 `embedding_attention_seq2seq` 即可实现。\n* 通常来说，数据越多越好。使用更大的语料库进行训练应该会带来益处。目前看来，[Reddit 评论数据集](https:\u002F\u002Fwww.reddit.com\u002Fr\u002Fdatasets\u002Fcomments\u002F59039y\u002Fupdated_reddit_comment_dataset_up_to_201608\u002F) 是最大的（但对当前程序来说又过于庞大）。另一种人为增加数据集大小的方法是在构建语料时拆分每个训练样本中的句子。例如，对于样本 `Q:句子1. 句子2. => A:句子X. 句子Y.`，我们可以生成三个新样本：`Q:句子1. 句子2. => A:句子X.`、`Q:句子2. => A:句子X. 句子Y.` 和 `Q:句子2. => A:句子X.`。注意：其他组合如 `Q:句子1. => A:句子X.` 则行不通，因为这会破坏连接问题与答案的过渡关系 `2 => X`。\n* 应该像我在另一个 [音乐生成](https:\u002F\u002Fgithub.com\u002FConchylicultor\u002FMusicGenerator) 项目中那样，认真监控测试曲线。这将有助于更好地观察 dropout 对过拟合的影响。目前，我们只是通过手动检查不同训练步骤下的测试预测结果来经验性地判断。\n* 当前，各个问题之间是相互独立的。要将问题串联起来，一个简单的方法是在生成答案之前，将所有之前的提问和回答一并输入到编码器中。可以在最终的编码器状态上进行缓存，以避免每次都重新计算。为了提高准确性，网络应当基于完整的对话序列进行训练，而不仅仅是单独的问答对。此外，在将历史对话输入编码器时，可以加入特殊的标记 `\u003CQ>` 和 `\u003CA>`，以便编码器能够识别对话双方的切换。不过，我并不确定简单的 seq2seq 模型是否足以捕捉句子之间的长期依赖关系。引入分桶机制，将输入长度相近的数据归为一组，可以显著提升训练速度。","# DeepQA 快速上手指南\n\nDeepQA 是一个基于 TensorFlow 和 RNN（Seq2Seq 模型）的开源对话机器人项目，旨在复现谷歌神经对话模型的效果。它支持使用康奈尔电影对白、OpenSubtitles 等多种语料库进行训练。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux 或 macOS (Windows 需配置相应环境)\n*   **Python**: 3.5 及以上版本\n*   **深度学习框架**: TensorFlow (测试版本 v1.0，建议使用兼容的 1.x 版本)\n*   **GPU 加速 (可选)**: CUDA (如需使用 GPU 训练)\n*   **其他依赖**:\n    *   `numpy`\n    *   `nltk` (自然语言工具包)\n    *   `tqdm` (进度条显示)\n    *   `django`, `channels`, `Redis`, `asgi_redis` (仅当需要部署 Web 界面时)\n\n**前置数据下载**:\n安装完 `nltk` 后，需要下载分词数据：\n```bash\npython3 -m nltk.downloader punkt\n```\n\n## 安装步骤\n\n1.  **克隆项目代码**\n    ```bash\n    git clone https:\u002F\u002Fgithub.com\u002FConchylicultor\u002FDeepQA.git\n    cd DeepQA\n    ```\n    *注：默认已包含 Cornell Movie Dialogs 数据集。若需使用 OpenSubtitles 或其他大型数据集，请参考 `data\u002F` 目录下对应文件夹的说明进行额外下载。*\n\n2.  **安装 Python 依赖**\n    推荐使用国内镜像源（如清华源）加速安装：\n    ```bash\n    pip3 install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n    ```\n\n3.  **Web 界面额外依赖 (可选)**\n    如果您计划使用 Web 聊天界面，还需安装：\n    ```bash\n    pip3 install django channels redis asgi_redis -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n    ```\n    *注意：使用 Web 界面前需确保本地已安装并运行 Redis 服务。*\n\n## 基本使用\n\n### 1. 训练模型\n\n运行主脚本开始训练。默认使用 Cornell 数据集，采用 encoder-decoder 架构（2 层 LSTM）。\n\n```bash\npython3 main.py\n```\n\n**常用参数优化**:\n*   `--modelTag \u003Cname>`: 为当前模型命名，便于区分不同实验。\n*   `--filterVocab 20`: 过滤出现次数少于 20 次的词汇，优化内存和性能。\n*   `--vocabularySize 30000`: 限制最大词汇量。\n*   `--keepAll`: 保存训练过程中每一步的模型（占用空间较大，但可观察模型演变）。\n\n示例（带参数训练）：\n```bash\npython3 main.py --modelTag my_first_bot --filterVocab 20 --vocabularySize 30000\n```\n\n训练过程中，可使用 TensorBoard 可视化损失函数和计算图：\n```bash\ntensorboard --logdir save\u002F\n```\n\n### 2. 测试与交互\n\n训练完成后，您可以通过以下两种方式测试模型效果：\n\n**方式 A：生成样本文件**\n将预测结果保存到 `save\u002Fmodel\u002Fsamples_predictions.txt`：\n```bash\npython3 main.py --test --modelTag my_first_bot\n```\n\n**方式 B：交互式命令行聊天 (推荐)**\n直接在终端与机器人对话：\n```bash\npython3 main.py --test interactive --modelTag my_first_bot\n```\n\n### 3. 启动 Web 界面 (可选)\n\n如果您已安装 Django 和 Redis 相关依赖，可以启动网页版聊天室：\n\n1.  **初始化数据库**:\n    ```bash\n    export CHATBOT_SECRET_KEY=\"my-secret-key\"\n    cd chatbot_website\u002F\n    python manage.py makemigrations\n    python manage.py migrate\n    ```\n\n2.  **启动服务**:\n    确保后台已运行 Redis (`redis-server &`)，然后执行：\n    ```bash\n    cd chatbot_website\u002F\n    python manage.py runserver\n    ```\n\n3.  **访问**:\n    打开浏览器访问 [http:\u002F\u002Flocalhost:8000\u002F](http:\u002F\u002Flocalhost:8000\u002F) 即可开始聊天。","某初创团队希望为他们的在线电影社区快速构建一个能陪用户聊剧情、角色和经典台词的互动机器人，但缺乏大量标注数据和深厚的 NLP 算法积累。\n\n### 没有 DeepQA 时\n- 开发团队需从零搭建复杂的序列到序列（Seq2Seq）模型架构，耗费数周时间调试 TensorFlow 代码。\n- 缺乏现成的高质量对话语料库支持，只能手动收集或清洗少量数据，导致机器人回答生硬且语境单一。\n- 无法直观监控训练过程，难以判断模型是否收敛，经常需要盲目调整超参数，算力资源浪费严重。\n- 部署交互界面门槛高，需额外开发前端和后端接口，迟迟无法让内部测试人员体验实际效果。\n\n### 使用 DeepQA 后\n- 直接复用基于 TensorFlow 复现的成熟 RNN 架构，只需运行 `main.py` 即可启动训练，将研发周期从数周缩短至几天。\n- 内置康奈尔电影对话语料库（Cornell Movie Dialogs），机器人天生具备丰富的影视知识，能自然讨论剧情与台词。\n- 提供详细的训练进度条和中间结果预览功能，团队可实时观察模型“进化”过程，精准优化词汇过滤等参数。\n- 自带基于 Django 的 Web 接口，配置 Redis 后即可立即在浏览器中与机器人进行交互式测试，快速验证想法。\n\nDeepQA 通过提供开箱即用的深度学习对话框架和预置影视语料，让开发者无需重复造轮子，即可低成本构建具备特定领域知识的智能聊天机器人。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FConchylicultor_DeepQA_0a1a4fde.png","Conchylicultor","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FConchylicultor_d51ca92c.jpg","Research Engineer","Google","Berlin","etiennefg.pot@gmail.com",null,"http:\u002F\u002Fe-pot.xyz","https:\u002F\u002Fgithub.com\u002FConchylicultor",[82,86,90,94,98,102,106],{"name":83,"color":84,"percentage":85},"Python","#3572A5",56.7,{"name":87,"color":88,"percentage":89},"SCSS","#c6538c",21,{"name":91,"color":92,"percentage":93},"CSS","#663399",10.8,{"name":95,"color":96,"percentage":97},"JavaScript","#f1e05a",8.8,{"name":99,"color":100,"percentage":101},"HTML","#e34c26",1.8,{"name":103,"color":104,"percentage":105},"Dockerfile","#384d54",0.5,{"name":107,"color":108,"percentage":109},"Shell","#89e051",0.4,2917,1161,"2026-04-03T20:54:58","Apache-2.0",4,"未说明 (支持 Docker)","非必需，但推荐使用 NVIDIA GPU 加速训练；需安装 CUDA（README 未指定具体版本，测试环境为 TensorFlow 1.0）","未说明",{"notes":119,"python":120,"dependencies":121},"该项目基于较旧的 TensorFlow 1.0 版本。首次运行前需手动下载 NLTK 数据包（执行 'python3 -m nltk.downloader punkt'）。默认使用 Cornell 电影对话数据集，其他数据集需单独下载配置。Web 界面依赖 Redis 服务。提供 Docker 安装方式。","3.5",[122,123,124,125,126,127,128,129],"tensorflow==1.0","numpy","nltk","tqdm","django==1.10","channels","redis","asgi_redis>=1.0",[35,14],[132,133,134,135],"chatbot","deep-learning","tensorflow","seq2seq","2026-03-27T02:49:30.150509","2026-04-07T13:29:03.719708",[139,144,149,154,159,164],{"id":140,"question_zh":141,"answer_zh":142,"source_url":143},22181,"如何获取或加载预训练模型？","官方提供的预训练模型链接可能已失效。建议尝试从 Hugging Face 等平台查找社区上传的模型。如果使用官方提供的 Google Drive 链接下载模型，请确保将解压后的文件放入正确的目录（如 save\u002Fmodel-pretrainedv2），并在运行时使用 --modelTag pretrainedv2 参数指定模型标签，否则程序会提示找不到模型并从零开始初始化。","https:\u002F\u002Fgithub.com\u002FConchylicultor\u002FDeepQA\u002Fissues\u002F1",{"id":145,"question_zh":146,"answer_zh":147,"source_url":148},22182,"为什么继续训练（Continue Training）时损失曲线看起来像从头开始？","这通常是因为在恢复训练时更改了模型参数（如 maxLength），导致程序生成了新的数据集 pickle 文件或创建了新的计算图。确保持续训练时不传递 --reset 标志。如果需要使用不同参数进行训练，请使用 --modelTag 标志将模型保存到不同的文件夹中，这样 TensorBoard 会自动识别并绘制多条曲线，避免混淆。此外，尝试重新克隆仓库以排除本地代码修改的影响。","https:\u002F\u002Fgithub.com\u002FConchylicultor\u002FDeepQA\u002Fissues\u002F10",{"id":150,"question_zh":151,"answer_zh":152,"source_url":153},22183,"训练完成后，为什么 Web 服务提示清理模型文件或无法加载新训练的模型？","这是由于 TensorFlow 新版本（Saver V2）生成的检查点文件名格式与旧版不同导致的兼容性问题。维护者已更新代码以兼容 Saver V2。如果遇到此问题，请确保拉取最新的代码版本。对于预训练模型，请下载维护者更新后的版本。不要手动将旧格式的文件复制到 model-server 目录，程序可能会因校验失败而自动清理该目录。","https:\u002F\u002Fgithub.com\u002FConchylicultor\u002FDeepQA\u002Fissues\u002F23",{"id":155,"question_zh":156,"answer_zh":157,"source_url":158},22184,"无法访问 Web 界面或服务（例如在 Docker、虚拟机或 Cloud9 中）怎么办？","如果在虚拟机、Docker 或云环境（如 Cloud9）中运行，默认绑定到 127.0.0.1 会导致外部无法访问。请将监听地址改为 0.0.0.0。同时，确保宿主机器和虚拟机\u002F容器之间的端口已正确映射和开放。例如，在 Cloud9 中需确保 8080 端口对外公开，并在代码配置中将 host 设置为 0.0.0.0。","https:\u002F\u002Fgithub.com\u002FConchylicultor\u002FDeepQA\u002Fissues\u002F12",{"id":160,"question_zh":161,"answer_zh":162,"source_url":163},22185,"如何使用已有的 .ckpt 权重文件进行微调或继续迭代训练？","程序会自动检测并加载现有的 .ckpt 文件。如果看到类似 \"Warning: restoring model from ...\" 的日志，说明模型已成功恢复。注意，虽然模型权重已加载，但 epoch 计数器不会从检查点恢复，每次运行程序时 epoch 会从 1 重新开始计数，不过全局步数（global step）通常会保存在 config.ini 或检查点元数据中以维持训练状态。","https:\u002F\u002Fgithub.com\u002FConchylicultor\u002FDeepQA\u002Fissues\u002F107",{"id":165,"question_zh":166,"answer_zh":167,"source_url":168},22186,"为什么机器人输出的回答是重复的无意义词汇（如 \"Dunaway\", \"sagittarians\" 等）？","这通常是因为程序实际上没有加载到预训练模型，而是初始化了一个未训练的随机模型。请检查控制台日志，如果看到 \"WARNING: No previous model found, starting from clean directory\"，说明模型路径配置错误。解决方法是：确保模型文件位于正确的子目录中（例如 DeepQA\u002Fsave\u002Fmodel-pretrainedv2\u002F），并在运行命令中添加 --modelTag pretrainedv2 参数（即 python main.py --test interactive --modelTag pretrainedv2），以匹配文件夹名称。","https:\u002F\u002Fgithub.com\u002FConchylicultor\u002FDeepQA\u002Fissues\u002F81",[]]