[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-AvaLovelace1--BrickGPT":3,"tool-AvaLovelace1--BrickGPT":64},[4,17,27,35,48,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},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 真正成长为懂上",145895,2,"2026-04-08T11:32:59",[13,14,15],"开发框架","Agent","语言模型","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,3,"2026-04-06T11:19:32",[15,26,14,13],"图像",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":10,"last_commit_at":33,"category_tags":34,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":10,"last_commit_at":41,"category_tags":42,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85052,"2026-04-08T11:03:08",[26,43,44,45,14,46,15,13,47],"数据工具","视频","插件","其他","音频",{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":23,"last_commit_at":54,"category_tags":55,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[14,26,13,15,46],{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":23,"last_commit_at":62,"category_tags":63,"status":16},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",75149,"2026-04-08T11:09:19",[15,26,13,46],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":80,"owner_email":79,"owner_twitter":79,"owner_website":81,"owner_url":82,"languages":83,"stars":92,"forks":93,"last_commit_at":94,"license":95,"difficulty_score":96,"env_os":97,"env_gpu":98,"env_ram":97,"env_deps":99,"category_tags":110,"github_topics":79,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":111,"updated_at":112,"faqs":113,"releases":162},5613,"AvaLovelace1\u002FBrickGPT","BrickGPT","Official repository for BrickGPT, the first approach for generating physically stable toy brick models from text prompts.","BrickGPT 是一款革命性的 AI 工具，能够直接将文字描述转化为物理结构稳定且可实际搭建的乐高积木模型。作为该领域的首个解决方案，它有效解决了传统生成式 AI 往往只关注外观而忽略重力与连接逻辑，导致生成的模型在现实中无法拼搭或容易倒塌的核心痛点。\n\n这项技术由卡内基梅隆大学团队研发，并荣获 ICCV 2025 最佳论文奖（Marr Prize）。其独特亮点在于引入了基于物理的稳定性分析机制（支持 Gurobi 求解器），确保每一块积木的堆叠都符合力学原理，同时还能自动生成丰富的纹理与色彩。用户只需输入如“一座带花园的城堡”等提示词，即可获得详细的搭建方案。\n\nBrickGPT 非常适合多类人群使用：创意设计师可利用它快速原型化构思；教育者与研究人员能借此探索具身智能与物理常识的结合；即使是普通乐高爱好者，也能通过它将天马行空的想象变为手中可触摸的现实作品。目前项目已开源，提供了从模型推理到可视化渲染的完整流程，欢迎各界开发者与创作者体验这一连接数字创意与物理世界的桥梁。","# BrickGPT\n\n***Generating Physically Stable and Buildable Brick Structures from Text***  \n**ICCV 2025 (Best Paper, Marr Prize)**  \n[Ava Pun*](https:\u002F\u002Favapun.com\u002F),\n[Kangle Deng*](https:\u002F\u002Fdunbar12138.github.io\u002F),\n[Ruixuan Liu*](https:\u002F\u002Fwaynekyrie.github.io\u002F),\n[Deva Ramanan](https:\u002F\u002Fwww.cs.cmu.edu\u002F~deva\u002F),\n[Changliu Liu](https:\u002F\u002Fwww.ri.cmu.edu\u002Fri-faculty\u002Fchangliu-liu\u002F),\n[Jun-Yan Zhu](https:\u002F\u002Fwww.cs.cmu.edu\u002F~junyanz\u002F)  \nCarnegie Mellon University\n\n[![Paper](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2505.05469-b5212f.svg?logo=arxiv)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2505.05469)\n[![Project Page](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWebsite-Project%20Page-0369a1?logo=googlechrome&logoColor=white)](https:\u002F\u002Favalovelace1.github.io\u002FBrickGPT\u002F)\n[![Demo](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGradio-Demo-F97316?logo=gradio)](https:\u002F\u002Favalovelace1.github.io\u002FBrickGPT\u002Fdemo\u002F)\n[![Dataset](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHugging%20Face-Dataset-FFD21E?logo=huggingface)](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FAvaLovelace\u002FStableText2Brick)\n[![Licence](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FAvaLovelace1\u002FBrickGPT?color=15803d&label=%F0%9F%93%84%20License)](https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fblob\u002Fmain\u002FLICENSE)\n\n---\n\nThis is the official repository for **BrickGPT**, the first approach for generating physically stable toy\nbrick models from text prompts.\n\n\u003Cvideo src='https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F6760f55c-a413-4baf-abf1-2ad61bb1a427' width=480\u002F>\u003C\u002Fvideo>\n\n## Results\n\nExamples of generated brick structures assembled by humans:\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAvaLovelace1_BrickGPT_readme_96dabc53ebfb.jpg\" alt=\"Examples of generated brick models assembled by humans\"\u002F>\n\nExamples of textured and colored brick models:\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAvaLovelace1_BrickGPT_readme_fc7fef9b336c.jpg\" alt=\"Examples of brick models generated with textures and colors\"\u002F>\n\n## Installation\n\n### Prerequisites\n\n- **Llama-3.2-1B-Instruct:** BrickGPT is fine-tuned from meta-llama\u002FLlama-3.2-1B-Instruct, a gated\n  model. [Request access to the model](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-3.2-1B-Instruct), then generate\n  a [Hugging Face user access token](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Fen\u002Fsecurity-tokens) and set it as an environment\n  variable: `export HF_TOKEN=\u003Cyour_token>`. The model will be automatically downloaded upon running the code.\n- **Gurobi (optional but recommended):** Running stability analysis requires\n  a [Gurobi license](https:\u002F\u002Fwww.gurobi.com\u002Fdownloads\u002F) to use Gurobi. Academics may request a free license from the\n  [Gurobi website](https:\u002F\u002Fwww.gurobi.com\u002Facademia\u002Facademic-program-and-licenses\u002F); after obtaining the license,\n  place it in your *home directory* or\n  another [recommended location](https:\u002F\u002Fsupport.gurobi.com\u002Fhc\u002Fen-us\u002Farticles\u002F360013417211-Where-do-I-place-the-Gurobi-license-file-gurobi-lic).\n    - If you do not have access to Gurobi, you can run the code with the option `--use_gurobi False` to use a simpler\n      but less accurate connectivity-based method instead of physics-based stability analysis.\n\n### Installing as a standalone project\n\nThis repo uses the Python project manager [uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F). To install this repo as a standalone\nproject, first install all prerequisites. Then,\n\n1. Clone the repo: `git clone https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT.git && cd BrickGPT`.\n2. *(Optional, required for running the `infer` script and texturing)* Follow these instructions to install ImportLDraw,\n   required for rendering brick structure visualizations:\n    - Install the ImportLDraw submodule with `git submodule update --init`.\n    - Download\n      this [background exr file](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1Yux0sEqWVpXGMT9Z5J094ISfvxhH-_5K\u002Fview?usp=share_link)\n      and place it in the `ImportLDraw\u002Floadldraw` subdirectory.\n    - Download the [LDraw parts library](https:\u002F\u002Flibrary.ldraw.org\u002Flibrary\u002Fupdates\u002Fcomplete.zip) and\n      extract it in your *home directory*:\n      `(cd ~ && wget https:\u002F\u002Flibrary.ldraw.org\u002Flibrary\u002Fupdates\u002Fcomplete.zip && unzip complete.zip)`.\n        - If you wish to put the LDraw parts library in a different directory, set the environment variable\n          `LDRAW_LIBRARY_PATH` to the path of the `ldraw` directory: `export LDRAW_LIBRARY_PATH=path\u002Fto\u002Fldraw`.\n3. Finally, [install uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fgetting-started\u002Finstallation\u002F), and run `uv sync` to create a Python\n   virtual environment with all dependencies installed. Python dependencies are defined in `pyproject.toml`.\n\n### Installing as a package\n\nTo install this repo as a package in your own Python project, first install all prerequisites. Then, run\n\n```zsh\nuv add \"https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT.git\"\n```\n\nif using uv, or\n\n```zsh\npip install \"https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT.git\"\n```\n\nif using pip.\n\n## Running inference interactively\n\n### Gradio demo\n\n**[A Gradio demo is available here.](https:\u002F\u002Favalovelace1.github.io\u002FBrickGPT\u002Fdemo\u002F)** Its source code is provided in the subdirectory [src\u002Fdemo](src\u002Fdemo).\n\n### Command line interface (CLI)\n\nYou can run BrickGPT inference through the command line with the following command:\n\n```zsh\nuv run infer\n```\n\nThis script starts an interactive session where you can input a prompt and get a response from the model.\nThe [model weights](https:\u002F\u002Fhuggingface.co\u002FAvaLovelace\u002FBrickGPT) will automatically be downloaded from Hugging Face.\n\nIf you wish to run inference with a different set of model weights, specify them using the `--model_name_or_path`\noption. See `uv run infer -h` for a full list of options.\n\n#### Example interaction\n\nHere is an example interaction using the `infer` script:\n\n```text\n> uv run infer\nEnter a prompt, or \u003CReturn> to exit: Table featuring a flat rectangular surface over four evenly spaced legs.\nEnter a filename to save the output image (default=output.png): output.png\nEnter a generation seed (default=42): 42\nGenerating...\nSet parameter Username\nAcademic license - for non-commercial use only - expires 2026-02-19\n--------------------\nFinished generating in 63.53s.\nTotal # bricks: 59\nTotal # brick rejections: 98\nBrick rejection reasons: {'collision': 5, 'already_rejected': 93}\nTotal # regenerations: 4\nSaved results to \u002Fhome\u002Fapun\u002FBrickGPT\u002Foutput.txt, \u002Fhome\u002Fapun\u002FBrickGPT\u002Foutput.ldr, and \u002Fhome\u002Fapun\u002FBrickGPT\u002Foutput.png\n--------------------\nEnter another prompt, or \u003CReturn> to exit:\n```\n\nThree output files are created: `output.png`, `output.txt`, and `output.ldr`.\n\n`output.png` contains a rendered image of the generated brick structure:\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAvaLovelace1_BrickGPT_readme_648cbe9151f6.png\" alt=\"Rendered brick structure output image\" width=\"256\"\u002F>\n\n`output.txt` contains the brick structure in brick-by-brick text format, where each line of the form `hxw (x,y,z)`\nrepresents a brick of height `h` and width `w` at position `(x,y,z)`:\n\n```text\n1x2 (16,18,0)\n1x2 (16,13,0)\n2x2 (0,18,0)\n2x2 (0,13,0)\n1x2 (16,18,1)\n[...]\n```\n\nAnd finally, `output.ldr` contains the brick structure in LDraw format, which can be opened with any LDraw-compatible\nsoftware.\n\n## Running texturing\n\nThe subdirectory `src\u002Ftexture` contains the code for generating the UV texture or per-brick color given a brick design.\nTo run texturing, `cd` into [src\u002Ftexture](src\u002Ftexture) and follow the instructions in the `README.md` file there.\n\n## Running mesh-to-brick\n\nThe subdirectory `src\u002Fmesh2brick` contains the code for converting a 3D object mesh into a brick structure.\nTo run mesh-to-brick, `cd` into [src\u002Fmesh2brick](src\u002Fmesh2brick) and follow the instructions in the `README.md` file\nthere.\n\n## Running fine-tuning\n\nBrickGPT was created by\nfine-tuning [Llama-3.2-1B-Instruct](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-3.2-1B-Instruct)\non the custom brick structure dataset [StableText2Brick](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FAvaLovelace\u002FStableText2Brick),\nconverted\ninto instructional format. We used Hugging Face [TRL](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Findex)\nwith [Accelerate](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Faccelerate\u002Findex) for fine-tuning.\n\nTo replicate the fine-tuning process, first install additional Python dependencies with `uv sync --extra finetuning`.\nThen, follow these instructions:\n\n1. Prepare the brick structure dataset for fine-tuning with\n   `uv run prepare_finetuning_dataset --input_path AvaLovelace\u002FStableText2Brick --output_path [FINETUNING_DATASET_PATH]`.\n   This converts the dataset into the instructional format required for fine-tuning LLaMA.\n    - If you wish to run fine-tuning with your own brick structure dataset, replace `AvaLovelace\u002FStableText2Brick` with\n      the path to\n      your dataset. This dataset should have the fields \"captions\" and \"bricks\". The \"bricks\" field should contain a\n      brick\n      structure in the text format described in the paper, and the \"captions\" field should contain a list of one or more\n      descriptions of the brick structure.\n2. Download the pretrained [Llama-3.2-1B-Instruct model](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-3.2-1B-Instruct) to\n   some directory `[PRETRAINED_DIR]`.\n   **IMPORTANT:** Replace the `config.json`, `special_tokens_map.json`, and `tokenizer_config.json` files with the ones\n   in the `finetuning_config_files` directory. This specifies the `pad_token` to be different from the `eos_token`,\n   fixing a fine-tuning [issue](https:\u002F\u002Fgithub.com\u002Funslothai\u002Funsloth\u002Fissues\u002F416) where the model will not learn to\n   output EOS tokens properly.\n3. Initialize the Accelerate config file with `uv run accelerate config`.\n4. Run fine-tuning with\n   `uv run .\u002Fscripts\u002Ffinetune.zsh [PRETRAINED_DIR] [OUTPUT_DIR] [RUN_NAME] [FINETUNING_DATASET_PATH]`. The\n   fine-tuned model will be saved to `[OUTPUT_DIR]\u002F[RUN_NAME]`.\n\n## License\n\nThe BrickGPT model, StableText2Brick dataset, and majority of the BrickGPT code are licensed under\nthe [MIT License](https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fblob\u002Fmain\u002FLICENSE). The following submodules may have\ndifferent licenses:\n\n- **[ImportLDraw](https:\u002F\u002Fgithub.com\u002FTobyLobster\u002FImportLDraw)**: For visualizing brick structures, we used ImportLDraw,\n  available under the [LICENSE](https:\u002F\u002Fgithub.com\u002FTobyLobster\u002FImportLDraw\u002Fblob\u002Fmaster\u002FLICENSE).\n- **[FlashTex](https:\u002F\u002Fgithub.com\u002FRoblox\u002FFlashTex)**: For texturing and coloring, we used FlashTex, available under\n  the [LICENSE](https:\u002F\u002Fgithub.com\u002FRoblox\u002FFlashTex\u002Fblob\u002Fmain\u002FLICENSE).\n\n## Citation\n\nIf you find this repository useful for your research, please cite the following work.\n\n```bibtex\n@inproceedings{pun2025brickgpt,\n    title     = {Generating Physically Stable and Buildable Brick Structures from Text},\n    author    = {Pun, Ava and Deng, Kangle and Liu, Ruixuan and Ramanan, Deva and Liu, Changliu and Zhu, Jun-Yan},\n    booktitle = {ICCV},\n    year      = {2025}\n}\n```\n\n## Acknowledgements\n\nWe thank Minchen Li, Ken Goldberg, Nupur Kumari, Ruihan Gao, and Yihao Shi for their discussions and help.  \nWe also thank Jiaoyang Li, Philip Huang, and Shobhit Aggarwal for developing the bimanual robotic system.\nThis work is partly supported by the Packard Foundation, Cisco Research Grant, and Amazon Faculty Award. This work is\nalso in part supported by the Manufacturing Futures Institute, Carnegie Mellon University, through a grant from the\nRichard King Mellon Foundation. KD is supported by the Microsoft Research PhD Fellowship.\n\nOur codebase is built upon several amazing repos:  Hugging\nFace [TRL](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Findex), [Accelerate](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Faccelerate\u002Findex), [ImportLDraw](https:\u002F\u002Fgithub.com\u002FTobyLobster\u002FImportLDraw).\n","# BrickGPT\n\n***从文本生成物理稳定且可搭建的积木结构***  \n**ICCV 2025（最佳论文，马尔奖）**  \n[Ava Pun*](https:\u002F\u002Favapun.com\u002F)，\n[Kangle Deng*](https:\u002F\u002Fdunbar12138.github.io\u002F)，\n[Ruixuan Liu*](https:\u002F\u002Fwaynekyrie.github.io\u002F)，\n[Deva Ramanan](https:\u002F\u002Fwww.cs.cmu.edu\u002F~deva\u002F)，\n[Changliu Liu](https:\u002F\u002Fwww.ri.cmu.edu\u002Fri-faculty\u002Fchangliu-liu\u002F)，\n[Jun-Yan Zhu](https:\u002F\u002Fwww.cs.cmu.edu\u002F~junyanz\u002F)  \n卡内基梅隆大学\n\n[![论文](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2505.05469-b5212f.svg?logo=arxiv)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2505.05469)\n[![项目主页](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWebsite-Project%20Page-0369a1?logo=googlechrome&logoColor=white)](https:\u002F\u002Favalovelace1.github.io\u002FBrickGPT\u002F)\n[![演示](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGradio-Demo-F97316?logo=gradio)](https:\u002F\u002Favalovelace1.github.io\u002FBrickGPT\u002Fdemo\u002F)\n[![数据集](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHugging%20Face-Dataset-FFD21E?logo=huggingface)](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FAvaLovelace\u002FStableText2Brick)\n[![许可证](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002FAvaLovelace1\u002FBrickGPT?color=15803d&label=%F0%9F%93%84%20License)](https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fblob\u002Fmain\u002FLICENSE)\n\n---\n\n这是 **BrickGPT** 的官方仓库，它是首个能够根据文本提示生成物理稳定的玩具积木模型的方法。\n\n\u003Cvideo src='https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F6760f55c-a413-4baf-abf1-2ad61bb1a427' width=480\u002F>\u003C\u002Fvideo>\n\n## 结果\n\n由人类组装的生成积木结构示例：\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAvaLovelace1_BrickGPT_readme_96dabc53ebfb.jpg\" alt=\"由人类组装的生成积木模型示例\"\u002F>\n\n带有纹理和颜色的积木模型示例：\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAvaLovelace1_BrickGPT_readme_fc7fef9b336c.jpg\" alt=\"带有纹理和颜色的生成积木模型示例\"\u002F>\n\n## 安装\n\n### 先决条件\n\n- **Llama-3.2-1B-Instruct：** BrickGPT 基于 meta-llama\u002FLlama-3.2-1B-Instruct 进行微调，该模型属于受控访问模型。请先 [申请访问权限](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-3.2-1B-Instruct)，然后生成一个 [Hugging Face 用户访问令牌](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Fen\u002Fsecurity-tokens)，并将其设置为环境变量：`export HF_TOKEN=\u003Cyour_token>`。运行代码时，模型将自动下载。\n- **Gurobi（可选但推荐）：** 运行稳定性分析需要使用 Gurobi 的许可证。学术用户可以从 [Gurobi 官网](https:\u002F\u002Fwww.gurobi.com\u002Facademia\u002Facademic-program-and-licenses\u002F) 申请免费许可证；获得许可证后，请将其放置在您的 *主目录* 或其他 [推荐位置](https:\u002F\u002Fsupport.gurobi.com\u002Fhc\u002Fen-us\u002Farticles\u002F360013417211-Where-do-I-place-the-Gurobi-license-file-gurobi-lic)。\n    - 如果您无法使用 Gurobi，可以使用 `--use_gurobi False` 选项来运行代码，此时将采用一种更简单但准确性较低的基于连通性的方法，而非基于物理的稳定性分析。\n\n### 作为独立项目安装\n\n本仓库使用 Python 项目管理工具 [uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F)。要将本仓库作为独立项目安装，请先完成所有先决条件。然后：\n\n1. 克隆仓库：`git clone https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT.git && cd BrickGPT`。\n2. *(可选，运行 `infer` 脚本和纹理化功能时必需)* 按照以下步骤安装 ImportLDraw，这是渲染积木结构可视化效果所必需的：\n    - 使用 `git submodule update --init` 初始化 ImportLDraw 子模块。\n    - 下载此 [背景 exr 文件](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1Yux0sEqWVpXGMT9Z5J094ISfvxhH-_5K\u002Fview?usp=share_link)，并将其放置在 `ImportLDraw\u002Floadldraw` 子目录中。\n    - 下载 [LDraw 部件库](https:\u002F\u002Flibrary.ldraw.org\u002Flibrary\u002Fupdates\u002Fcomplete.zip)，并将其解压到您的 *主目录*：\n      `(cd ~ && wget https:\u002F\u002Flibrary.ldraw.org\u002Flibrary\u002Fupdates\u002Fcomplete.zip && unzip complete.zip)`。\n        - 如果您希望将 LDraw 部件库放在其他目录，请设置环境变量 `LDRAW_LIBRARY_PATH`，指向 `ldraw` 目录的路径：`export LDRAW_LIBRARY_PATH=path\u002Fto\u002Fldraw`。\n3. 最后，[安装 uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fgetting-started\u002Finstallation\u002F)，并运行 `uv sync` 创建一个包含所有依赖项的 Python 虚拟环境。Python 依赖项定义在 `pyproject.toml` 中。\n\n### 作为包安装\n\n要将本仓库作为包安装到您自己的 Python 项目中，请先完成所有先决条件。然后，如果您使用 uv：\n\n```zsh\nuv add \"https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT.git\"\n```\n\n或者如果您使用 pip：\n\n```zsh\npip install \"https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT.git\"\n```\n\n## 交互式推理\n\n### Gradio 演示\n\n**[Gradio 演示在此处可用。](https:\u002F\u002Favalovelace1.github.io\u002FBrickGPT\u002Fdemo\u002F)** 其源代码位于子目录 `src\u002Fdemo` 中。\n\n### 命令行界面 (CLI)\n\n您可以通过命令行运行 BrickGPT 推理，命令如下：\n\n```zsh\nuv run infer\n```\n\n该脚本会启动一个交互式会话，您可以输入提示并从模型中获取响应。模型权重将自动从 Hugging Face 下载。\n\n如果您希望使用不同的模型权重进行推理，可以使用 `--model_name_or_path` 选项指定。有关完整选项列表，请参阅 `uv run infer -h`。\n\n#### 示例交互\n\n以下是使用 `infer` 脚本的示例交互：\n\n```text\n> uv run infer\n请输入提示，或按回车退出：一张桌子，具有平坦的矩形桌面，由四条均匀分布的腿支撑。\n请输入保存输出图像的文件名（默认为 output.png）：output.png\n请输入生成种子（默认为 42）：42\n正在生成...\n设置参数 Username\n学术许可证——仅限非商业用途——有效期至 2026 年 2 月 19 日\n--------------------\n生成完成，耗时 63.53 秒。\n总砖块数：59\n总拒绝砖块数：98\n拒绝原因：{'collision': 5, 'already_rejected': 93}\n总重试次数：4\n结果已保存到 \u002Fhome\u002Fapun\u002FBrickGPT\u002Foutput.txt、\u002Fhome\u002Fapun\u002FBrickGPT\u002Foutput.ldr 和 \u002Fhome\u002Fapun\u002FBrickGPT\u002Foutput.png\n--------------------\n请输入另一个提示，或按回车退出：\n```\n\n将生成三个输出文件：`output.png`、`output.txt` 和 `output.ldr`。\n\n`output.png` 包含生成的积木结构渲染图像：\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAvaLovelace1_BrickGPT_readme_648cbe9151f6.png\" alt=\"渲染的积木结构输出图像\" width=\"256\"\u002F>\n\n`output.txt` 以逐砖文本格式记录积木结构，每行格式为 `hxw (x,y,z)`，表示高度为 `h`、宽度为 `w` 的砖块位于位置 `(x,y,z)`：\n\n```text\n1x2 (16,18,0)\n1x2 (16,13,0)\n2x2 (0,18,0)\n2x2 (0,13,0)\n1x2 (16,18,1)\n[...]\n```\n\n最后，`output.ldr` 以 LDraw 格式存储积木结构，可使用任何兼容 LDraw 的软件打开。\n\n## 运行纹理化\n\n子目录 `src\u002Ftexture` 包含根据砖块设计生成 UV 纹理或每块砖颜色的代码。\n要运行纹理化，请进入 [src\u002Ftexture](src\u002Ftexture) 目录，并按照该目录下的 `README.md` 文件中的说明操作。\n\n## 运行网格转砖块\n\n子目录 `src\u002Fmesh2brick` 包含将 3D 对象网格转换为砖块结构的代码。\n要运行网格转砖块，请进入 [src\u002Fmesh2brick](src\u002Fmesh2brick) 目录，并按照该目录下的 `README.md` 文件中的说明操作。\n\n## 运行微调\n\nBrickGPT 是通过对 [Llama-3.2-1B-Instruct](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-3.2-1B-Instruct) 模型在自定义砖块结构数据集 [StableText2Brick](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FAvaLovelace\u002FStableText2Brick) 上进行微调而创建的，该数据集已被转换为指令格式。我们使用了 Hugging Face 的 [TRL](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Findex) 结合 [Accelerate](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Faccelerate\u002Findex) 库来进行微调。\n\n要复现微调过程，首先使用 `uv sync --extra finetuning` 安装额外的 Python 依赖包。然后按照以下步骤操作：\n\n1. 使用 `uv run prepare_finetuning_dataset --input_path AvaLovelace\u002FStableText2Brick --output_path [FINETUNING_DATASET_PATH]` 准备用于微调的砖块结构数据集。这会将数据集转换为 LLaMA 微调所需的指令格式。\n   - 如果您希望使用自己的砖块结构数据集进行微调，请将 `AvaLovelace\u002FStableText2Brick` 替换为您数据集的路径。该数据集应包含 “captions” 和 “bricks” 两个字段。“bricks” 字段应包含论文中描述的文本格式的砖块结构，“captions” 字段则应包含对该砖块结构的一个或多个描述。\n2. 将预训练的 [Llama-3.2-1B-Instruct 模型](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-3.2-1B-Instruct) 下载到某个目录 `[PRETRAINED_DIR]` 中。\n   **重要提示：** 请用 `finetuning_config_files` 目录中的 `config.json`、`special_tokens_map.json` 和 `tokenizer_config.json` 文件替换原有文件。这样做是为了将 `pad_token` 设置为不同于 `eos_token`，从而解决一个微调过程中可能出现的问题——模型无法正确学习输出 EOS 标记。\n3. 使用 `uv run accelerate config` 初始化 Accelerate 配置文件。\n4. 使用 `uv run .\u002Fscripts\u002Ffinetune.zsh [PRETRAINED_DIR] [OUTPUT_DIR] [RUN_NAME] [FINETUNING_DATASET_PATH]` 进行微调。微调后的模型将保存到 `[OUTPUT_DIR]\u002F[RUN_NAME]` 目录下。\n\n## 许可证\n\nBrickGPT 模型、StableText2Brick 数据集以及 BrickGPT 代码的大部分内容均采用 [MIT 许可证](https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fblob\u002Fmain\u002FLICENSE) 许可。以下子模块可能采用不同的许可证：\n\n- **[ImportLDraw](https:\u002F\u002Fgithub.com\u002FTobyLobster\u002FImportLDraw)**：用于可视化砖块结构，我们使用了 ImportLDraw，其许可证见 [LICENSE](https:\u002F\u002Fgithub.com\u002FTobyLobster\u002FImportLDraw\u002Fblob\u002Fmaster\u002FLICENSE)。\n- **[FlashTex](https:\u002F\u002Fgithub.com\u002FRoblox\u002FFlashTex)**：用于纹理和着色，我们使用了 FlashTex，其许可证见 [LICENSE](https:\u002F\u002Fgithub.com\u002FRoblox\u002FFlashTex\u002Fblob\u002Fmain\u002FLICENSE)。\n\n## 引用\n\n如果您发现本仓库对您的研究有所帮助，请引用以下文献。\n\n```bibtex\n@inproceedings{pun2025brickgpt,\n    title     = {从文本生成物理稳定且可搭建的砖块结构},\n    author    = {Pun, Ava 和 Deng, Kangle 和 Liu, Ruixuan 和 Ramanan, Deva 和 Liu, Changliu 和 Zhu, Jun-Yan},\n    booktitle = {ICCV},\n    year      = {2025}\n}\n```\n\n## 致谢\n\n我们感谢 Minchen Li、Ken Goldberg、Nupur Kumari、Ruihan Gao 和 Yihao Shi 提供的讨论与帮助。  \n同时，我们也感谢 Jiaoyang Li、Philip Huang 和 Shobhit Aggarwal 开发的双臂机器人系统。  \n本研究部分得到了 Packard 基金会、思科研究资助以及亚马逊教师奖的支持。此外，还得到了卡内基梅隆大学制造未来研究所通过 Richard King Mellon 基金会提供的资助支持。KD 获得了微软研究院博士生奖学金的支持。\n\n我们的代码库基于多个优秀的开源项目：Hugging Face 的 [TRL](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftrl\u002Findex)、[Accelerate](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Faccelerate\u002Findex) 以及 [ImportLDraw](https:\u002F\u002Fgithub.com\u002FTobyLobster\u002FImportLDraw)。","# BrickGPT 快速上手指南\n\nBrickGPT 是首个能够从文本提示生成物理稳定且可搭建的乐高积木结构模型的 AI 工具（ICCV 2025 最佳论文）。本指南将帮助你快速在本地部署并运行该模型。\n\n## 环境准备\n\n### 系统要求\n- **操作系统**: Linux 或 macOS (Windows 用户建议使用 WSL2)\n- **Python**: 推荐 Python 3.10+\n- **包管理器**: [uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) (项目依赖管理工具)\n\n### 前置依赖与账号配置\n1. **Hugging Face 账号与 Token**:\n   - BrickGPT 基于 `Llama-3.2-1B-Instruct` 微调，该模型受访问限制。\n   - 访问 [Llama-3.2-1B-Instruct 页面](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-3.2-1B-Instruct) 申请访问权限。\n   - 生成 [User Access Token](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhub\u002Fen\u002Fsecurity-tokens)，并在终端设置环境变量：\n     ```bash\n     export HF_TOKEN=\u003Cyour_token>\n     ```\n\n2. **Gurobi 求解器 (可选但推荐)**:\n   - 用于进行精确的物理稳定性分析。学术界可申请免费许可证。\n   - 下载并安装 [Gurobi](https:\u002F\u002Fwww.gurobi.com\u002Fdownloads\u002F)，将许可证文件 (`gurobi.lic`) 放置在用户主目录或 Gurobi 推荐的默认位置。\n   - *若无 Gurobi*: 运行时需添加 `--use_gurobi False` 参数，将使用基于连通性的简化分析方法（精度略低）。\n\n3. **渲染依赖 (仅用于生成可视化图片)**:\n   - 若需生成 `.png` 渲染图，需配置 `ImportLDraw` 和 `LDraw` 零件库（详见安装步骤中的可选部分）。\n\n## 安装步骤\n\n本项目推荐使用 `uv` 进行依赖管理。\n\n### 1. 克隆仓库\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT.git && cd BrickGPT\n```\n\n### 2. (可选) 配置渲染环境\n若只需生成积木结构数据 (.ldr\u002F.txt) 而无需渲染图片，可跳过此步。若需渲染图片：\n```bash\n# 初始化子模块\ngit submodule update --init\n\n# 下载背景贴图并放置到指定目录\n# 请手动下载 https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1Yux0sEqWVpXGMT9Z5J094ISfvxhH-_5K\u002Fview?usp=share_link \n# 并将文件重命名为 background.exr 放入 ImportLDraw\u002Floadldraw 目录\n\n# 下载 LDraw 零件库到主目录 (国内网络不佳建议使用代理或寻找国内镜像源)\ncd ~\nwget https:\u002F\u002Flibrary.ldraw.org\u002Flibrary\u002Fupdates\u002Fcomplete.zip\nunzip complete.zip\n# 若解压后目录名为 ldraw，则无需额外配置；否则需导出变量：\n# export LDRAW_LIBRARY_PATH=\u002Fpath\u002Fto\u002Fldraw\ncd -\n```\n\n### 3. 安装依赖\n安装 `uv` 工具（如未安装）：\n```bash\ncurl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh\n```\n\n同步项目依赖并创建虚拟环境：\n```bash\nuv sync\n```\n\n## 基本使用\n\n安装完成后，即可通过命令行交互式地生成积木结构。\n\n### 运行推理\n在终端执行以下命令启动交互会话：\n```bash\nuv run infer\n```\n\n### 使用示例\n启动后，按照提示输入文本描述。以下是一个完整交互流程示例：\n\n```text\n> uv run infer\nEnter a prompt, or \u003CReturn> to exit: Table featuring a flat rectangular surface over four evenly spaced legs.\nEnter a filename to save the output image (default=output.png): output.png\nEnter a generation seed (default=42): 42\nGenerating...\n--------------------\nFinished generating in 63.53s.\nTotal # bricks: 59\nSaved results to output.txt, output.ldr, and output.png\n--------------------\nEnter another prompt, or \u003CReturn> to exit: \n```\n\n### 输出文件说明\n程序将生成三个文件：\n- `output.png`: 积木结构的渲染图像。\n- `output.txt`: 积木结构的文本描述格式（每行格式为 `高 x 宽 (x,y,z)`）。\n- `output.ldr`: LDraw 格式文件，可使用任何兼容 LDraw 的软件（如 Stud.io, Blender+ImportLDraw）打开和编辑。\n\n### 高级选项\n若需指定本地模型路径或禁用 Gurobi，可使用：\n```bash\nuv run infer --model_name_or_path .\u002Flocal_model_path --use_gurobi False\n```\n更多参数请运行 `uv run infer -h` 查看。","一位独立玩具设计师正试图将脑海中“一座带有拱门和塔楼的复古城堡”创意快速转化为可实际拼搭的乐高式积木模型，用于众筹展示。\n\n### 没有 BrickGPT 时\n- **物理结构不可行**：手动设计或普通 3D 生成工具产出的模型往往违反物理规律，积木之间缺乏有效咬合，实物拼搭时极易倒塌。\n- **迭代成本高昂**：设计师需反复在 CAD 软件中调整砖块位置以测试稳定性，单个复杂结构的验证耗时数小时甚至数天。\n- **专业门槛过高**：确保大型结构稳定需要深厚的静力学知识，普通创意人员难以掌握复杂的受力分析技巧。\n- **从概念到实物断层**：文本创意无法直接映射为具体的砖块型号与坐标列表，中间依赖大量人工转换，创意流失严重。\n\n### 使用 BrickGPT 后\n- **原生物理稳定**：BrickGPT 基于 ICCV 最佳论文算法，直接生成符合重力与连接约束的模型，确保输出的每一块砖都能稳固咬合。\n- **秒级方案生成**：只需输入“复古城堡”等自然语言提示，几分钟内即可获得完整的、可执行的积木搭建指令，大幅缩短研发周期。\n- **自动化受力分析**：内置（或可选配 Gurobi）物理引擎自动校验结构强度，无需用户具备工程学背景即可得到专业级的稳固方案。\n- **端到端创意落地**：直接将文本描述转化为带纹理、颜色的具体砖块清单（LDraw 格式），无缝衔接 3D 预览与实物采购。\n\nBrickGPT 的核心价值在于打破了文本创意与物理实体之间的壁垒，让任何人都能一键生成既美观又符合物理定律的可拼搭积木模型。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FAvaLovelace1_BrickGPT_96dabc53.jpg","AvaLovelace1","Ava Pun","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FAvaLovelace1_0311d168.jpg","Computer Science PhD @ Carnegie Mellon University. Codes things and draws things, sometimes both at the same time.",null,"Canada","https:\u002F\u002Favapun.com","https:\u002F\u002Fgithub.com\u002FAvaLovelace1",[84,88],{"name":85,"color":86,"percentage":87},"Python","#3572A5",99.5,{"name":89,"color":90,"percentage":91},"Shell","#89e051",0.5,1629,102,"2026-04-07T02:41:27","MIT",4,"未说明","未说明 (基于 Llama-3.2-1B 模型，通常建议具备 CUDA 支持的 NVIDIA GPU)",{"notes":100,"python":101,"dependencies":102},"1. 必须申请 Meta Llama-3.2-1B-Instruct 模型的访问权限并设置 HF_TOKEN 环境变量。2. 推荐安装 Gurobi 求解器以进行精确的物理稳定性分析（学术界可免费申请），否则可使用精度较低的连通性分析方法。3. 若需渲染功能，需手动下载 LDraw 零件库和背景 EXR 文件并配置相应路径。4. 项目推荐使用 'uv' 作为包管理器来同步环境和安装依赖。","未说明 (通过 uv 管理环境，依赖定义在 pyproject.toml 中)",[103,104,105,106,107,108,109],"Llama-3.2-1B-Instruct","Gurobi (可选，用于物理稳定性分析)","ImportLDraw (可选，用于渲染)","FlashTex (用于纹理生成)","Hugging Face TRL","Hugging Face Accelerate","uv",[15,46],"2026-03-27T02:49:30.150509","2026-04-09T01:25:58.210410",[114,119,124,129,133,138,142,147,152,157],{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},25493,"运行推理时遇到 'Missing file .DAT' 警告或无法生成 PNG 输出怎么办？","这通常是因为 LDraw 零件文件路径配置不正确。请检查 `\u002Fdata\u002Fworkspace\u002Fldraw\u002Fparts` 目录，并手动在代码中配置正确的路径。例如，可以编辑 `\u002Ftests\u002Ftest_infer.py` 第 6 行的 `BRICKGPT_PATH` 变量指向正确的位置。确保 `.dat` 文件已被正确索引。","https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fissues\u002F19",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},25494,"如何使用 Qwen3-8B 等非 LLaMA 系列模型进行微调？配置文件需要替换吗？","提供的 `config.json` 和 `tokenizer_config.json` 是专为解决 LLaMA 模型训练时 PAD token 等于 EOS token 导致无法学习输出 EOS 的问题而设计的，不能直接用于 Qwen。如果您使用 Qwen 默认配置文件训练正常，则无需更改。如果遇到问题，需修改 Qwen 配置文件使 PAD token 不同于 EOS token。此外，推理代码中的 logit masking 功能硬编码了 LLaMA 的分词逻辑（每个积木固定 10 个 token），若适配其他模型，建议禁用 logit masking（添加参数 `--use_logit_masking False`）并修改 `_generate_brick_no_logit_masking` 函数，或直接调整推理代码以适配新的分词方式。","https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fissues\u002F17",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},25495,"运行 `uv run infer` 时出现 '401 Client Error' 或 'gated repo' 错误如何解决？","这是因为您没有权限访问 Hugging Face 上的受限模型仓库（如 meta-llama\u002FLlama-3.2-1B-Instruct）。您需要生成一个 Hugging Face Token，并在运行时通过环境变量或代码配置提供该 token。Token 类型选择 \"Read\" 即可。同时，确保您已登录 Hugging Face 账号并接受了相关模型的使用协议。","https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fissues\u002F3",{"id":130,"question_zh":131,"answer_zh":132,"source_url":128},25496,"如何获取和使用 Gurobi 许可证？","首先需要拥有 Gurobi 账户并获取许可证文件。将许可证文件（`gurobi.lic`）放置在操作系统的用户主目录下（例如 Linux\u002FmacOS 的 `~` 目录，Windows 的 `C:\\Users\\\u003C用户名>` 目录）。具体位置可参考 Gurobi 官方文档。",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},25497,"运行 `uv run infer` 时报错 'libXrender.so.1: cannot open shared object file' 怎么办？","这是缺少系统依赖库 `libXrender` 导致的。在 Ubuntu\u002FDebian 系统上，可以通过运行命令 `sudo apt install libxrender1` 来安装该库。安装完成后重新运行推理脚本即可。","https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fissues\u002F9",{"id":139,"question_zh":140,"answer_zh":141,"source_url":137},25498,"如何使用自己微调后的模型进行推理和可视化？","在使用 `infer` 脚本时，通过添加 `--model_name_or_path` 参数指定您微调模型的本地路径即可。命令格式为：`uv run infer --model_name_or_path path\u002Fto\u002Fyour\u002Fmodel`。",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},25499,"在哪里可以找到将体素（voxel）或网格（mesh）转换为乐高积木的代码？","作者已上传了相关代码。您可以查看项目中的 `src\u002Fmesh2brick` 目录，那里包含了将网格转换为乐高积木结构的实现代码。","https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fissues\u002F12",{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},25500,"运行推理脚本时程序无报错但突然退出（特别是在 CPU 上运行）是什么原因？","这通常是内存不足导致的。在 CPU 上运行推理脚本大约需要 5GB 的 RAM。如果您的机器内存紧张，尤其是 Windows 用户，可以尝试增大页面文件（pagefile.sys）的大小（例如增加到 11GB）来解决这个问题。另外，CPU 运行速度会非常慢，建议使用 GPU 加速。","https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fissues\u002F7",{"id":153,"question_zh":154,"answer_zh":155,"source_url":156},25501,"Demo 演示页面显示 'Error' 或 'ZeroGPU illegal duration' 怎么办？","这通常是因为公共 Demo 服务的 GPU 资源受限或超时（例如请求时长超过限制的 600 秒）。如果遇到此问题，建议将项目克隆到本地，配置好环境后在本地机器上运行推理脚本，这样可以避免云端资源的限制并获得更稳定的体验。","https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fissues\u002F13",{"id":158,"question_zh":159,"answer_zh":160,"source_url":161},25502,"项目中提到的机器人组装乐高积木的控制代码开源了吗？","乐高生成的代码在本项目中，但控制机器人进行物理组装的相关代码和信息并未直接包含在此仓库中。您可以访问 APEX-MR 项目的官方网站 (https:\u002F\u002Fintelligent-control-lab.github.io\u002FAPEX-MR\u002F) 获取关于机器人控制的详细信息和代码。","https:\u002F\u002Fgithub.com\u002FAvaLovelace1\u002FBrickGPT\u002Fissues\u002F11",[]]