[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-mit-han-lab--TinyChatEngine":3,"tool-mit-han-lab--TinyChatEngine":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 真正成长为懂上",153609,2,"2026-04-13T11:34:59",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":77,"owner_email":77,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":113,"forks":114,"last_commit_at":115,"license":116,"difficulty_score":117,"env_os":118,"env_gpu":119,"env_ram":120,"env_deps":121,"category_tags":130,"github_topics":133,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":144,"updated_at":145,"faqs":146,"releases":182},7137,"mit-han-lab\u002FTinyChatEngine","TinyChatEngine","TinyChatEngine: On-Device LLM Inference Library","TinyChatEngine 是一款专为在本地设备（如笔记本电脑、汽车、机器人）上高效运行大型语言模型（LLM）和视觉语言模型（VLM）而设计的推理库。它致力于解决大模型部署难、响应慢及数据隐私泄露等痛点，让用户无需联网即可在本地获得即时、安全的智能服务，例如代码辅助、办公助手或智能回复。\n\n这款工具非常适合希望在边缘设备上部署 AI 应用的开发者、研究人员，以及关注数据隐私的极客用户。其核心优势在于“轻量”与“通用”：采用纯 C\u002FC++ 从零编写，无外部依赖，下载编译即可使用；同时广泛支持 x86、ARM（如 Apple M1\u002FM2、树莓派）及 NVIDIA GPU 等多种架构。\n\n技术层面，TinyChatEngine 深度融合了 MIT 团队研发的 SmoothQuant 和 AWQ 两大模型压缩技术。前者通过数学变换将量化难点从激活值转移至权重，后者则基于激活幅度保护关键权重通道。这些创新使得大模型能在保持高精度的同时，以低精度在消费级硬件上实现实时流畅运行。近期，该项目更荣获 MLSys 2024 最佳论文奖，并新增了对 Llama-3 及视觉模型的支持，是探索端侧大模型落地","TinyChatEngine 是一款专为在本地设备（如笔记本电脑、汽车、机器人）上高效运行大型语言模型（LLM）和视觉语言模型（VLM）而设计的推理库。它致力于解决大模型部署难、响应慢及数据隐私泄露等痛点，让用户无需联网即可在本地获得即时、安全的智能服务，例如代码辅助、办公助手或智能回复。\n\n这款工具非常适合希望在边缘设备上部署 AI 应用的开发者、研究人员，以及关注数据隐私的极客用户。其核心优势在于“轻量”与“通用”：采用纯 C\u002FC++ 从零编写，无外部依赖，下载编译即可使用；同时广泛支持 x86、ARM（如 Apple M1\u002FM2、树莓派）及 NVIDIA GPU 等多种架构。\n\n技术层面，TinyChatEngine 深度融合了 MIT 团队研发的 SmoothQuant 和 AWQ 两大模型压缩技术。前者通过数学变换将量化难点从激活值转移至权重，后者则基于激活幅度保护关键权重通道。这些创新使得大模型能在保持高精度的同时，以低精度在消费级硬件上实现实时流畅运行。近期，该项目更荣获 MLSys 2024 最佳论文奖，并新增了对 Llama-3 及视觉模型的支持，是探索端侧大模型落地的理想选择。","![tinychat_logo](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_cb01d30a5603.png)\n\n# TinyChatEngine: On-Device LLM\u002FVLM Inference Library\n\nRunning large language models (LLMs) and visual language models (VLMs) on the edge is useful: copilot services (coding, office, smart reply) on laptops, cars, robots, and more. Users can get instant responses  with better privacy, as the data is local.\n\nThis is enabled by LLM model compression technique: [SmoothQuant](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fsmoothquant) and [AWQ (Activation-aware Weight Quantization)](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fllm-awq), co-designed with TinyChatEngine that implements the compressed low-precision model. \n\nFeel free to check out our [slides](assets\u002Fslides.pdf) for more details!\n\n### Code LLaMA Demo on NVIDIA GeForce RTX 4070 laptop:\n![coding_demo_gpu](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_94199fbfe039.gif)\n\n### VILA Demo on Apple MacBook M1 Pro:\n![vlm_demo_m1](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_dd54d79c9710.gif)\n\n### LLaMA Chat Demo on Apple MacBook M1 Pro:\n![chat_demo_m1](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_a1922de2b9bd.gif)\n\n\n## Overview\n### LLM Compression: SmoothQuant and AWQ\n[SmoothQuant](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fsmoothquant): Smooth the activation outliers by migrating the quantization difficulty from activations to weights, with a mathematically equal transformation (100\\*1 = 10\\*10).\n\n![smoothquant_intuition](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_485158e0b995.png)\n\n[AWQ (Activation-aware Weight Quantization)](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fllm-awq): Protect salient weight channels by analyzing activation magnitude as opposed to the weights.\n\n### LLM Inference Engine: TinyChatEngine\n- **Universal**: x86 (Intel\u002FAMD), ARM (Apple M1\u002FM2, Raspberry Pi), CUDA (Nvidia GPU).\n- **No library dependency**: From-scratch C\u002FC++ implementation.\n- **High performance**: Real-time on Macbook & GeForce laptop.\n- **Easy to use**: Download and compile, then ready to go!\n\n![overview](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_2dc6fedc0b51.png)\n\n\n## News\n\n- **(2024\u002F05)** 🏆 AWQ and TinyChat received the **Best Paper Award** at **MLSys 2024**. 🎉\n- **(2024\u002F05)** 🔥 We released the support for the **Llama-3** model family! Check out our [example](#step-by-step-to-deploy-llama-3-8b-instruct-with-tinychatengine) and [model zoo](https:\u002F\u002Fhuggingface.co\u002Fmit-han-lab\u002Ftinychatengine-model-zoo).\n- **(2024\u002F02)** 🔥AWQ and TinyChat has been accepted to **MLSys 2024**!\n- **(2024\u002F02)** 🔥We extended the support for **vision language models (VLM)**. Feel free to try running **[VILA](#deploy-vision-language-model-vlm-chatbot-with-tinychatengine)** on your edge device.\n\u003C!-- - **(2024\u002F01)** 🔥We released TinyVoiceChat, a voice chatbot that can be deployed on your edge devices, such as MacBook and Jetson Orin Nano. Check out our [demo video](https:\u002F\u002Fyoutu.be\u002FBw5Dm3aWMnA?si=CCvZDmq3HwowEQcC) and follow the [instructions](#deploy-speech-to-speech-chatbot-with-tinychatengine-demo) to deploy it on your device! -->\n- **(2023\u002F10)** We extended the support for the coding assistant [Code Llama](#download-and-deploy-models-from-our-model-zoo). Feel free to check out our [model zoo](https:\u002F\u002Fhuggingface.co\u002Fmit-han-lab\u002Ftinychatengine-model-zoo).\n- **(2023\u002F10)** ⚡We released the new CUDA backend to support Nvidia GPUs with compute capability >= 6.1 for both server and edge GPUs. Its performance is also speeded up by ~40% compared to the previous version. Feel free to check out!\n\n\n## Prerequisites\n\n### MacOS\n\nFor MacOS, install boost and llvm by\n\n```bash\nbrew install boost\nbrew install llvm\n```\n\nFor M1\u002FM2 users, install Xcode from AppStore to enable the metal compiler for GPU support.\n\n### Windows with CPU\n\nFor Windows, download and install the GCC compiler with MSYS2. Follow this tutorial: https:\u002F\u002Fcode.visualstudio.com\u002Fdocs\u002Fcpp\u002Fconfig-mingw for installation.\n\n- Install required dependencies with MSYS2\n\n```\npacman -S --needed base-devel mingw-w64-x86_64-toolchain make unzip git\n```\n\n- Add binary directories (e.g., C:\\\\msys64\\\\mingw64\\\\bin and C:\\\\msys64\\\\usr\\\\bin) to the environment path\n\n### Windows with Nvidia GPU (Experimental)\n\n- Install CUDA toolkit for Windows ([link](https:\u002F\u002Fdeveloper.nvidia.com\u002Fcuda-toolkit)). When installing CUDA on your PC, please change the installation path to another one that does not include \"spaces\".\n\n- Install Visual Studio with C and C++ support: Follow the [Instruction](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fcpp\u002Fbuild\u002Fvscpp-step-0-installation?view=msvc-170).\n\n- Follow the instructions below and use x64 Native Tools Command Prompt from Visual Studio to compile TinyChatEngine. \n\n\n## Step-by-step to Deploy Llama-3-8B-Instruct with TinyChatEngine\n\nHere, we provide step-by-step instructions to deploy Llama-3-8B-Instruct with TinyChatEngine from scratch.\n\n- Download the repo.\n  ```bash\n  git clone --recursive https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\n  cd TinyChatEngine\n  ```\n\n- Install Python Packages\n  - The primary codebase of TinyChatEngine is written in pure C\u002FC++. The Python packages are only used for downloading (and converting) models from our model zoo.\n    ```bash\n    conda create -n TinyChatEngine python=3.10 pip -y\n    conda activate TinyChatEngine\n    pip install -r requirements.txt\n    ```\n- Download the quantized Llama model from our model zoo.\n  ```bash\n  cd llm\n  ```\n  - On an x86 device (e.g., Intel\u002FAMD laptop)\n    ```bash\n    python tools\u002Fdownload_model.py --model LLaMA_3_8B_Instruct_awq_int4 --QM QM_x86\n    ```\n  - On an ARM device (e.g., M1\u002FM2 Macbook, Raspberry Pi)\n    ```bash\n    python tools\u002Fdownload_model.py --model LLaMA_3_8B_Instruct_awq_int4 --QM QM_ARM\n    ```\n  - On a CUDA device (e.g., Jetson AGX Orin, PC\u002FServer)\n    ```bash\n    python tools\u002Fdownload_model.py --model LLaMA2_7B_chat_awq_int4 --QM QM_CUDA\n    ```\n  - Check this [table](#download-and-deploy-models-from-our-model-zoo) for the detailed list of supported models\n- *(CUDA only)* Based on the platform you are using and the compute capability of your GPU, modify the Makefile accordingly. If using Windows with Nvidia GPU, please modify `-arch=sm_xx` in [Line 54](llm\u002FMakefile#L54). If using other platforms with Nvidia GPU, please modify `-gencode arch=compute_xx,code=sm_xx` in [Line 60](llm\u002FMakefile#L60). \n- Compile and start the chat locally.\n  ```bash\n  make chat -j\n  .\u002Fchat\n\n  TinyChatEngine by MIT HAN Lab: https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\n  Using model: LLaMA_3_8B_Instruct\n  Using AWQ for 4bit quantization: https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fllm-awq\n  Loading model... Finished!\n  USER: Write a syllabus for the parallel computing course.\n  ASSISTANT: Here is a sample syllabus for a parallel computing course:\n  \n  **Course Title:** Parallel Computing\n  **Instructor:** [Name]\n  **Description:** This course covers the fundamental concepts of parallel computing, including parallel algorithms, programming models, and architectures. Students will learn how to design, implement, and optimize parallel programs using various languages and frameworks.\n  **Prerequisites:** Basic knowledge of computer science and programming concepts.\n  **Course Objectives:**\n  * Understand the principles of parallelism and its applications\n  * Learn how to write parallel programs using different languages (e.g., OpenMP, MPI)\n  ...\n  ```\n\n\n\u003C!-- ## Deploy speech-to-speech chatbot with TinyChatEngine [[Demo]](https:\u002F\u002Fyoutu.be\u002FBw5Dm3aWMnA?si=CCvZDmq3HwowEQcC)\n\nTinyChatEngine offers versatile capabilities suitable for various applications. Additionally, we introduce a sophisticated voice chatbot. Here, we provide very easy-to-follow instructions to deploy speech-to-speech chatbot (Llama-3-8B-Instruct) with TinyChatEngine. \n\n- Follow the instructions above to setup the basic environment, i.e., [Prerequisites](#prerequisites) and [Step-by-step to Deploy Llama-3-8B-Instruct with TinyChatEngine](#step-by-step-to-deploy-llama-3-8b-instruct-with-tinychatengine).\n\n- Run the shell script to set up the environment for speech-to-speech chatbot.\n  ```bash\n  cd llm\n  .\u002Fvoicechat_setup.sh\n  ```\n\n- Start the speech-to-speech chat locally.\n  ```bash\n  .\u002Fvoicechat  # chat.exe -v on Windows\n  ```\n\n- If you encounter any issues or errors during setup, please explore [here](llm\u002Fapplication\u002FREADME.md) to follow the step-by-step guide to debug.\n -->\n\n## Deploy vision language model (VLM) chatbot with TinyChatEngine\n\n\u003C!-- TinyChatEngine supports not only LLM but also VLM. We introduce a sophisticated text\u002Fvoice chatbot for VLM. Here, we provide easy-to-follow instructions to deploy vision language model chatbot (VILA-7B) with TinyChatEngine. We recommend using M1\u002FM2 MacBooks for this VLM feature. -->\nTinyChatEngine supports not only LLM but also VLM. We introduce a sophisticated chatbot for VLM. Here, we provide easy-to-follow instructions to deploy vision language model chatbot (VILA-7B) with TinyChatEngine. We recommend using M1\u002FM2 MacBooks for this VLM feature.\n\n- Follow the instructions above to setup the basic environment, i.e., [Prerequisites](#prerequisites) and [Step-by-step to Deploy Llama-3-8B-Instruct with TinyChatEngine](#step-by-step-to-deploy-llama-3-8b-instruct-with-tinychatengine).\n\n- To demonstrate images in the terminal, please download and install the following toolkit.\n  - Install [termvisage](https:\u002F\u002Fgithub.com\u002FAnonymouX47\u002Ftermvisage).\n  - (For MacOS) Install [iTerm2](https:\u002F\u002Fiterm2.com\u002Findex.html).\n  - (For other OS) Please refer to [here](https:\u002F\u002Fgithub.com\u002FAnonymouX47\u002Ftermvisage?tab=readme-ov-file#requirements) to get the appropriate terminal ready.\n\n\u003C!-- - (Optional) To enable the speech-to-speech chatbot for VLM, please follow the [instruction above](#deploy-speech-to-speech-chatbot-with-tinychatengine-demo) to run the shell script to set up the environment.\n  ```bash\n  cd llm\n  .\u002Fvoicechat_setup.sh\n  ``` -->\n\n- Download the quantized VILA-7B model from our model zoo.\n\n  - On an x86 device (e.g., Intel\u002FAMD laptop)\n    ```bash\n    python tools\u002Fdownload_model.py --model VILA_7B_awq_int4_CLIP_ViT-L --QM QM_x86\n    ```\n  - On an ARM device (e.g., M1\u002FM2 Macbook, Raspberry Pi)\n    ```bash\n    python tools\u002Fdownload_model.py --model VILA_7B_awq_int4_CLIP_ViT-L --QM QM_ARM\n    ```\n\n- (For MacOS) Start the chatbot locally. Please use an appropriate terminal (e.g., iTerm2).\n  - Image\u002FText to text\n    ```bash\n    .\u002Fvila ..\u002Fassets\u002Ffigures\u002Fvlm_demo\u002Fpedestrian.png\n    ```\n\n  \u003C!-- - Image\u002FSpeech to speech\n    ```bash\n    .\u002Fvoice_vila ..\u002Fassets\u002Ffigures\u002Fvlm_demo\u002Fpedestrian.png\n    ``` -->\n\n    - There are several images under the path `..\u002Fassets\u002Ffigures\u002Fvlm_demo`. Feel free to try different images with VILA on your device!\n\n  \u003C!-- - For other OS, please modify Line 4 in [vila.sh](llm\u002Fscripts\u002Fvila.sh) and [voice_vila.sh](llm\u002Fscripts\u002Fvoice_vila.sh) to use the correct terminal. -->\n  - For other OS, please modify Line 4 in [vila.sh](llm\u002Fscripts\u002Fvila.sh) to use the correct terminal.\n\n## Backend Support\n\n| Precision | x86\u003Cbr \u002F> (Intel\u002FAMD CPU) | ARM\u003Cbr \u002F> (Apple M1\u002FM2 & RPi) | Nvidia GPU |\n| ------ | --------------------------- | --------- | --------- |\n| FP32   |  ✅    |    ✅  |         |\n| W4A16  |      |      |  ✅  |\n| W4A32  |  ✅  |  ✅  |      |\n| W4A8   |  ✅  |  ✅  |      |\n| W8A8   |  ✅  |  ✅  |      |\n\n- For Raspberry Pi, we recommend using the board with 8GB RAM. Our testing was primarily conducted on Raspberry Pi 4 Model B Rev 1.4 with aarch64. For other versions, please feel free to try it out and let us know if you encounter any issues.\n- For Nvidia GPU, our CUDA backend can support Nvidia GPUs with compute capability >= 6.1. For the GPUs with compute capability \u003C 6.1, please feel free to try it out but we haven't tested it yet and thus cannot guarantee the results.\n\n## Quantization and Model Support\n\nThe goal of TinyChatEngine is to support various quantization methods on various devices. For example, At present, it supports the quantized weights for int8 opt models that originate from [smoothquant](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fsmoothquant) using the provided conversion script [opt_smooth_exporter.py](llm\u002Ftools\u002Fopt_smooth_exporter.py). For LLaMA models, scripts are available for converting Huggingface format checkpoints to our int4 wegiht [format](llm\u002Ftools\u002Fllama_exporter.py), and for quantizing them to specific methods [based on your device](llm\u002Ftools\u002Fmodel_quantizer.py). Before converting and quantizing your models, it is recommended to apply the fake quantization from [AWQ](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fllm-awq) to achieve better accuracy. We are currently working on supporting more models, please stay tuned!\n\n### Device-specific int4 Weight Reordering\n\nTo mitigate the runtime overheads associated with weight reordering, TinyChatEngine conducts this process offline during model conversion. In this section, we will explore the weight layouts of QM_ARM and QM_x86. These layouts are tailored for ARM and x86 CPUs, supporting 128-bit SIMD and 256-bit SIMD operations, respectively. We also support QM_CUDA for Nvidia GPUs, including server and edge GPUs.\n\n| Platforms  | ISA | Quantization methods |\n| ------------- | ------------- |  ------------- |\n| Intel & AMD |  x86-64  | QM_x86  |\n| Apple M1\u002FM2 Mac & Raspberry Pi | ARM | QM_ARM  |\n| Nvidia GPU| CUDA | QM_CUDA  |\n\n- Example layout of QM_ARM: For QM_ARM, consider the initial configuration of a 128-bit weight vector, \\[w0, w1, ... , w30, w31\\], where each wi is a 4-bit quantized weight. TinyChatEngine rearranges these weights in the sequence  \\[w0, w16, w1, w17, ..., w15, w31\\] by interleaving the lower half and upper half of the weights. This new arrangement facilitates the decoding of both the lower and upper halves using 128-bit AND and shift operations, as depicted in the subsequent figure. This will eliminate runtime reordering overheads and improve performance.\n\n## TinyChatEngine Model Zoo\n\nWe offer a selection of models that have been tested with TinyChatEngine. These models can be readily downloaded and deployed on your device. To download a model, locate the target model's ID in the table below and use the associated script. Check out our model zoo [here](https:\u002F\u002Fhuggingface.co\u002Fmit-han-lab\u002Ftinychatengine-model-zoo).\n\n\u003Ctable>\n    \u003Cthead>\n        \u003Ctr>\n            \u003Cth>Models\u003C\u002Fth>\n            \u003Cth>Precisions\u003C\u002Fth>\n            \u003Cth>ID\u003C\u002Fth>\n            \u003Cth>x86 backend\u003C\u002Fth>\n            \u003Cth>ARM backend\u003C\u002Fth>\n            \u003Cth>CUDA backend\u003C\u002Fth>\n        \u003C\u002Ftr>\n    \u003C\u002Fthead>\n    \u003Ctbody>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaMA_3_8B_Instruct\u003C\u002Ftd>\n            \u003Ctd>fp32\u003C\u002Ftd>\n            \u003Ctd>LLaMA_3_8B_Instruct_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> LLaMA_3_8B_Instruct_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaMA2_13B_chat\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> LLaMA2_13B_chat_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>LLaMA2_13B_chat_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaMA2_7B_chat\u003C\u002Ftd>\n            \u003Ctd>fp32\u003C\u002Ftd>\n            \u003Ctd>LLaMA2_7B_chat_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> LLaMA2_7B_chat_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaMA_7B\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> LLaMA_7B_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>LLaMA_7B_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">CodeLLaMA_13B_Instruct\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> CodeLLaMA_13B_Instruct_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>CodeLLaMA_13B_Instruct_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">CodeLLaMA_7B_Instruct\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> CodeLLaMA_7B_Instruct_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>CodeLLaMA_7B_Instruct_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">Mistral-7B-Instruct-v0.2\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> Mistral_7B_v0.2_Instruct_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>Mistral_7B_v0.2_Instruct_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">VILA-7B\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> VILA_7B_CLIP_ViT-L_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> VILA_7B_awq_int4_CLIP_ViT-L \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaVA-v1.5-13B\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> LLaVA_13B_CLIP_ViT-L_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> LLaVA_13B_awq_int4_CLIP_ViT-L \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaVA-v1.5-7B\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> LLaVA_7B_CLIP_ViT-L_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> LLaVA_7B_awq_int4_CLIP_ViT-L \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">StarCoder\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> StarCoder_15.5B_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>StarCoder_15.5B_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"3\">opt-6.7B\u003C\u002Ftd>\n            \u003Ctd>fp32\u003C\u002Ftd>\n            \u003Ctd>opt_6.7B_fp32\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd>int8\u003C\u002Ftd>\n            \u003Ctd>opt_6.7B_smooth_int8\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> opt_6.7B_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"3\">opt-1.3B\u003C\u002Ftd>\n            \u003Ctd>fp32\u003C\u002Ftd>\n            \u003Ctd>opt_1.3B_fp32\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd>int8\u003C\u002Ftd>\n            \u003Ctd>opt_1.3B_smooth_int8\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> opt_1.3B_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"3\">opt-125m\u003C\u002Ftd>\n            \u003Ctd>fp32\u003C\u002Ftd>\n            \u003Ctd>opt_125m_fp32\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd>int8\u003C\u002Ftd>\n            \u003Ctd>opt_125m_smooth_int8\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- No data for the first column here because it's merged with data1 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> opt_125m_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n    \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\nFor instance, to download the quantized LLaMA-2-7B-chat model: (for int4 models, use --QM  to choose the quantized model for your device)\n\n- On an Intel\u002FAMD latptop:\n  ```bash\n  python tools\u002Fdownload_model.py --model LLaMA2_7B_chat_awq_int4 --QM QM_x86\n  ```\n- On an M1\u002FM2 Macbook:\n  ```bash\n  python tools\u002Fdownload_model.py --model LLaMA2_7B_chat_awq_int4 --QM QM_ARM\n  ```\n- On an Nvidia GPU:\n  ```bash\n  python tools\u002Fdownload_model.py --model LLaMA2_7B_chat_awq_int4 --QM QM_CUDA\n  ```\n\nTo deploy a quantized model with TinyChatEngine, compile and run the chat program.\n\n- On CPU platforms\n```bash\nmake chat -j\n# .\u002Fchat \u003Cmodel_name> \u003Cprecision> \u003Cnum_threads>\n.\u002Fchat LLaMA2_7B_chat INT4 8\n```\n\n- On GPU platforms\n```bash\nmake chat -j\n# .\u002Fchat \u003Cmodel_name> \u003Cprecision>\n.\u002Fchat LLaMA2_7B_chat INT4\n```\n\n\n## Related Projects\n\n[TinyEngine: Memory-efficient and High-performance Neural Network Library for Microcontrollers](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Ftinyengine)\n\n[SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Models](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fsmoothquant)\n\n[AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fllm-awq)\n\n\n## Acknowledgement\n\n[llama.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fllama.cpp)\n\n[whisper.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fwhisper.cpp)\n\n[transformers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers)\n","![tinychat_logo](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_cb01d30a5603.png)\n\n# TinyChatEngine：设备端 LLM\u002FVLM 推理库\n\n在边缘设备上运行大型语言模型（LLM）和视觉语言模型（VLM）非常实用：例如在笔记本电脑、汽车、机器人等设备上的代码辅助、办公助手和智能回复服务。由于数据保留在本地，用户可以获得即时响应，同时隐私得到更好保护。\n\n这一能力得益于 LLM 模型压缩技术：[SmoothQuant](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fsmoothquant) 和 [AWQ（激活感知权重量化）](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fllm-awq)，它们与实现压缩后低精度模型的 TinyChatEngine 协同设计。\n\n欢迎查看我们的[演示文稿](assets\u002Fslides.pdf)，了解更多详情！\n\n### NVIDIA GeForce RTX 4070 笔记本上的 Code LLaMA 演示：\n![coding_demo_gpu](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_94199fbfe039.gif)\n\n### Apple MacBook M1 Pro 上的 VILA 演示：\n![vlm_demo_m1](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_dd54d79c9710.gif)\n\n### Apple MacBook M1 Pro 上的 LLaMA 聊天演示：\n![chat_demo_m1](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_a1922de2b9bd.gif)\n\n\n## 概述\n### LLM 压缩：SmoothQuant 和 AWQ\n[SmoothQuant](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fsmoothquant)：通过将量化难度从激活值转移到权重，平滑激活值中的异常值，实现数学上等价的转换（100*1 = 10*10）。\n\n![smoothquant_intuition](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_485158e0b995.png)\n\n[AWQ（激活感知权重量化）](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fllm-awq)：通过分析激活值的大小来保护重要的权重通道，而不是直接作用于权重本身。\n\n### LLM 推理引擎：TinyChatEngine\n- **通用性**：支持 x86（Intel\u002FAMD）、ARM（Apple M1\u002FM2、树莓派）以及 CUDA（Nvidia GPU）架构。\n- **无依赖库**：完全从零开始用 C\u002FC++ 实现。\n- **高性能**：可在 Macbook 和 GeForce 笔记本上实现实时推理。\n- **易用性**：下载并编译即可使用！\n\n![overview](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_readme_2dc6fedc0b51.png)\n\n\n## 最新消息\n\n- **(2024\u002F05)** 🏆 AWQ 和 TinyChat 在 **MLSys 2024** 大会上荣获 **最佳论文奖**。🎉\n- **(2024\u002F05)** 🔥 我们新增了对 **Llama-3** 系列模型的支持！请参阅我们的[示例](#step-by-step-to-deploy-llama-3-8b-instruct-with-tinychatengine)和[模型库](https:\u002F\u002Fhuggingface.co\u002Fmit-han-lab\u002Ftinychatengine-model-zoo)。\n- **(2024\u002F02)** 🔥 AWQ 和 TinyChat 已被 **MLSys 2024** 接收！\n- **(2024\u002F02)** 🔥 我们扩展了对 **视觉语言模型（VLM）** 的支持。欢迎在您的边缘设备上尝试运行 **[VILA](#deploy-vision-language-model-vlm-chatbot-with-tinychatengine)**。\n\u003C!-- - **(2024\u002F01)** 🔥 我们发布了 TinyVoiceChat，这是一款可以在 MacBook 和 Jetson Orin Nano 等边缘设备上部署的语音聊天机器人。请观看我们的[演示视频](https:\u002F\u002Fyoutu.be\u002FBw5Dm3aWMnA?si=CCvZDmq3HwowEQcC)，并按照[说明](#deploy-speech-to-speech-chatbot-with-tinychatengine-demo)在您的设备上部署它！ -->\n- **(2023\u002F10)** 我们扩展了对编码助手 [Code Llama](#download-and-deploy-models-from-our-model-zoo) 的支持。欢迎查看我们的[模型库](https:\u002F\u002Fhuggingface.co\u002Fmit-han-lab\u002Ftinychatengine-model-zoo)。\n- **(2023\u002F10)** ⚡我们推出了新的 CUDA 后端，支持计算能力 ≥ 6.1 的 Nvidia GPU，适用于服务器和边缘设备。其性能相比旧版本提升了约 40%。欢迎体验！\n\n\n## 先决条件\n\n### macOS\n\n对于 macOS 用户，请通过以下命令安装 boost 和 llvm：\n\n```bash\nbrew install boost\nbrew install llvm\n```\n\n对于 M1\u002FM2 用户，请从 App Store 安装 Xcode，以启用 Metal 编译器，从而支持 GPU。\n\n### Windows（仅 CPU）\n\n对于 Windows 用户，需下载并安装 MSYS2 中的 GCC 编译器。请参考此教程进行安装：https:\u002F\u002Fcode.visualstudio.com\u002Fdocs\u002Fcpp\u002Fconfig-mingw。\n\n- 使用 MSYS2 安装所需依赖项：\n\n```\npacman -S --needed base-devel mingw-w64-x86_64-toolchain make unzip git\n```\n\n- 将二进制目录（例如 C:\\\\msys64\\\\mingw64\\\\bin 和 C:\\\\msys64\\\\usr\\\\bin）添加到环境变量路径中。\n\n### Windows（配备 Nvidia GPU，实验性功能）\n\n- 安装适用于 Windows 的 CUDA 工具包（[链接](https:\u002F\u002Fdeveloper.nvidia.com\u002Fcuda-toolkit)）。安装时，请将 CUDA 的安装路径设置为不含空格的其他位置。\n\n- 安装支持 C 和 C++ 的 Visual Studio：请遵循[官方说明](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fcpp\u002Fbuild\u002Fvscpp-step-0-installation?view=msvc-170)。\n\n- 按照以下步骤操作，并使用 Visual Studio 提供的 x64 Native Tools 命令提示符来编译 TinyChatEngine。\n\n## 使用 TinyChatEngine 部署 Llama-3-8B-Instruct 的分步指南\n\n在此，我们提供从头开始使用 TinyChatEngine 部署 Llama-3-8B-Instruct 的分步说明。\n\n- 克隆仓库。\n  ```bash\n  git clone --recursive https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\n  cd TinyChatEngine\n  ```\n\n- 安装 Python 包\n  - TinyChatEngine 的主要代码库是用纯 C\u002FC++ 编写的。Python 包仅用于从我们的模型库下载（和转换）模型。\n    ```bash\n    conda create -n TinyChatEngine python=3.10 pip -y\n    conda activate TinyChatEngine\n    pip install -r requirements.txt\n    ```\n- 从我们的模型库下载量化后的 Llama 模型。\n  ```bash\n  cd llm\n  ```\n  - 在 x86 设备上（例如 Intel\u002FAMD 笔记本电脑）\n    ```bash\n    python tools\u002Fdownload_model.py --model LLaMA_3_8B_Instruct_awq_int4 --QM QM_x86\n    ```\n  - 在 ARM 设备上（例如 M1\u002FM2 MacBook、树莓派）\n    ```bash\n    python tools\u002Fdownload_model.py --model LLaMA_3_8B_Instruct_awq_int4 --QM QM_ARM\n    ```\n  - 在 CUDA 设备上（例如 Jetson AGX Orin、PC\u002F服务器）\n    ```bash\n    python tools\u002Fdownload_model.py --model LLaMA2_7B_chat_awq_int4 --QM QM_CUDA\n    ```\n  - 请参阅此[表格](#download-and-deploy-models-from-our-model-zoo)以获取支持的详细模型列表\n- *(仅限 CUDA)* 根据您使用的平台和 GPU 的计算能力，相应地修改 Makefile。如果在 Windows 上使用 Nvidia GPU，请修改 [第 54 行](llm\u002FMakefile#L54) 中的 `-arch=sm_xx`。如果在其他平台上使用 Nvidia GPU，请修改 [第 60 行](llm\u002FMakefile#L60) 中的 `-gencode arch=compute_xx,code=sm_xx`。\n- 编译并在本地启动聊天。\n  ```bash\n  make chat -j\n  .\u002Fchat\n\n  TinyChatEngine by MIT HAN Lab: https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\n  Using model: LLaMA_3_8B_Instruct\n  Using AWQ for 4bit quantization: https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fllm-awq\n  Loading model... Finished!\n  USER: Write a syllabus for the parallel computing course.\n  ASSISTANT: Here is a sample syllabus for a parallel computing course:\n  \n  **Course Title:** Parallel Computing\n  **Instructor:** [Name]\n  **Description:** This course covers the fundamental concepts of parallel computing, including parallel algorithms, programming models, and architectures. Students will learn how to design, implement, and optimize parallel programs using various languages and frameworks.\n  **Prerequisites:** Basic knowledge of computer science and programming concepts.\n  **Course Objectives:**\n  * Understand the principles of parallelism and its applications\n  * Learn how to write parallel programs using different languages (e.g., OpenMP, MPI)\n  ...\n  ```\n\n\n\u003C!-- ## 使用 TinyChatEngine 部署语音到语音聊天机器人 [[演示]](https:\u002F\u002Fyoutu.be\u002FBw5Dm3aWMnA?si=CCvZDmq3HwowEQcC)\n\nTinyChatEngine 提供适用于各种应用的多功能功能。此外，我们还推出了一款先进的语音聊天机器人。在此，我们提供非常易于遵循的说明，以使用 TinyChatEngine 部署语音到语音聊天机器人（Llama-3-8B-Instruct）。\n\n- 按照上述说明设置基本环境，即[先决条件](#prerequisites)和[使用 TinyChatEngine 部署 Llama-3-8B-Instruct 的分步指南](#step-by-step-to-deploy-llama-3-8b-instruct-with-tinychatengine)。\n\n- 运行 shell 脚本来为语音到语音聊天机器人设置环境。\n  ```bash\n  cd llm\n  .\u002Fvoicechat_setup.sh\n  ```\n\n- 在本地启动语音到语音聊天。\n  ```bash\n  .\u002Fvoicechat  # 在 Windows 上为 chat.exe -v\n  ```\n\n- 如果在设置过程中遇到任何问题或错误，请参阅[此处](llm\u002Fapplication\u002FREADME.md)以按照分步指南进行调试。\n -->\n\n## 使用 TinyChatEngine 部署视觉语言模型（VLM）聊天机器人\n\n\u003C!-- TinyChatEngine 不仅支持 LLM，还支持 VLM。我们推出了一款针对 VLM 的先进文本\u002F语音聊天机器人。在此，我们提供易于遵循的说明，以使用 TinyChatEngine 部署视觉语言模型聊天机器人（VILA-7B）。我们建议为此 VLM 功能使用 M1\u002FM2 MacBooks。 -->\nTinyChatEngine 不仅支持 LLM，还支持 VLM。我们推出了一款针对 VLM 的先进聊天机器人。在此，我们提供易于遵循的说明，以使用 TinyChatEngine 部署视觉语言模型聊天机器人（VILA-7B）。我们建议为此 VLM 功能使用 M1\u002FM2 MacBooks。\n\n- 按照上述说明设置基本环境，即[先决条件](#prerequisites)和[使用 TinyChatEngine 部署 Llama-3-8B-Instruct 的分步指南](#step-by-step-to-deploy-llama-3-8b-instruct-with-tinychatengine)。\n\n- 为了在终端中展示图像，请下载并安装以下工具包。\n  - 安装 [termvisage](https:\u002F\u002Fgithub.com\u002FAnonymouX47\u002Ftermvisage)。\n  - （适用于 MacOS）安装 [iTerm2](https:\u002F\u002Fiterm2.com\u002Findex.html)。\n  - （适用于其他操作系统）请参考[此处](https:\u002F\u002Fgithub.com\u002FAnonymouX47\u002Ftermvisage?tab=readme-ov-file#requirements)以准备好合适的终端。\n\n\u003C!-- - （可选）要启用 VLM 的语音到语音聊天机器人，请按照[上述说明](#deploy-speech-to-speech-chatbot-with-tinychatengine-demo)运行 shell 脚本来设置环境。\n  ```bash\n  cd llm\n  .\u002Fvoicechat_setup.sh\n  ``` -->\n\n- 从我们的模型库下载量化的 VILA-7B 模型。\n\n  - 在 x86 设备上（例如 Intel\u002FAMD 笔记本电脑）\n    ```bash\n    python tools\u002Fdownload_model.py --model VILA_7B_awq_int4_CLIP_ViT-L --QM QM_x86\n    ```\n  - 在 ARM 设备上（例如 M1\u002FM2 MacBook、树莓派）\n    ```bash\n    python tools\u002Fdownload_model.py --model VILA_7B_awq_int4_CLIP_ViT-L --QM QM_ARM\n    ```\n\n- （适用于 MacOS）在本地启动聊天机器人。请使用合适的终端（例如 iTerm2）。\n  - 图像\u002F文本转文本\n    ```bash\n    .\u002Fvila ..\u002Fassets\u002Ffigures\u002Fvlm_demo\u002Fpedestrian.png\n    ```\n\n  \u003C!-- - 图像\u002F语音转语音\n    ```bash\n    .\u002Fvoice_vila ..\u002Fassets\u002Ffigures\u002Fvlm_demo\u002Fpedestrian.png\n    ``` -->\n\n    - `..\u002Fassets\u002Ffigures\u002Fvlm_demo` 路径下有几张图片。欢迎您在自己的设备上尝试不同的图片与 VILA 互动！\n\n  \u003C!-- - 对于其他操作系统，请修改 [vila.sh](llm\u002Fscripts\u002Fvila.sh) 和 [voice_vila.sh](llm\u002Fscripts\u002Fvoice_vila.sh) 中的第 4 行，以使用正确的终端。 -->\n  - 对于其他操作系统，请修改 [vila.sh](llm\u002Fscripts\u002Fvila.sh) 中的第 4 行，以使用正确的终端。\n\n## 后端支持\n\n| 精度 | x86\u003Cbr \u002F>（Intel\u002FAMD CPU） | ARM\u003Cbr \u002F>（Apple M1\u002FM2 & RPi） | Nvidia GPU |\n| ------ | --------------------------- | --------- | --------- |\n| FP32   |  ✅    |    ✅  |         |\n| W4A16  |      |      |  ✅  |\n| W4A32  |  ✅  |  ✅  |      |\n| W4A8   |  ✅  |  ✅  |      |\n| W8A8   |  ✅  |  ✅  |      |\n\n- 对于树莓派，我们建议使用配备8GB内存的型号。我们的测试主要在aarch64架构的树莓派4 Model B Rev 1.4上进行。对于其他版本，请您自行尝试，并在遇到问题时告知我们。\n- 对于Nvidia GPU，我们的CUDA后端支持计算能力≥6.1的Nvidia显卡。对于计算能力低于6.1的显卡，您可以尝试使用，但我们尚未进行测试，因此无法保证运行效果。\n\n## 量化与模型支持\n\nTinyChatEngine的目标是在不同设备上支持多种量化方法。例如，目前它支持基于[smoothquant](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fsmoothquant)工具链、利用提供的转换脚本[opt_smooth_exporter.py](llm\u002Ftools\u002Fopt_smooth_exporter.py)生成的int8权重优化模型。对于LLaMA模型，我们提供了将Hugging Face格式检查点转换为我们的int4权重格式的脚本[llama_exporter.py](llm\u002Ftools\u002Fllama_exporter.py)，以及根据您的设备选择特定量化方法的脚本[model_quantizer.py](llm\u002Ftools\u002Fmodel_quantizer.py)。在转换和量化模型之前，建议先应用来自[AWQ](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fllm-awq)的伪量化技术，以获得更高的精度。我们目前正在努力支持更多模型，请持续关注！\n\n### 设备特定的int4权重重排\n为减少权重重排带来的运行时开销，TinyChatEngine会在模型转换阶段提前完成这一过程。本节将介绍QM_ARM和QM_x86的权重布局。这些布局分别针对ARM和x86 CPU设计，支持128位SIMD和256位SIMD运算。此外，我们还支持用于Nvidia GPU的QM_CUDA，涵盖服务器级和边缘级GPU。\n\n| 平台  | ISA | 量化方法 |\n| ------------- | ------------- |  ------------- |\n| Intel & AMD |  x86-64  | QM_x86  |\n| Apple M1\u002FM2 Mac & 树莓派 | ARM | QM_ARM  |\n| Nvidia GPU| CUDA | QM_CUDA  |\n\n- QM_ARM的示例布局：对于QM_ARM，假设初始的128位权重向量为\\[w0, w1, ... , w30, w31\\], 其中每个wi都是4位量化权重。TinyChatEngine会将这些权重重新排列为\\[w0, w16, w1, w17, ..., w15, w31\\]的顺序，即将权重的低半部分和高半部分交错排列。这种新的排列方式能够通过128位的AND和移位操作同时解码低半部分和高半部分的权重信息，如图所示。这将消除运行时的权重重排开销，从而提升性能。\n\n## TinyChatEngine模型库\n我们提供了一系列经过TinyChatEngine测试的模型，您可以直接下载并在自己的设备上部署。要下载某个模型，请在下表中找到目标模型的ID，并使用对应的脚本。请在此处查看我们的模型库[这里](https:\u002F\u002Fhuggingface.co\u002Fmit-han-lab\u002Ftinychatengine-model-zoo)。\n\n\u003Ctable>\n    \u003Cthead>\n        \u003Ctr>\n            \u003Cth>模型\u003C\u002Fth>\n            \u003Cth>精度\u003C\u002Fth>\n            \u003Cth>ID\u003C\u002Fth>\n            \u003Cth>x86 后端\u003C\u002Fth>\n            \u003Cth>ARM 后端\u003C\u002Fth>\n            \u003Cth>CUDA 后端\u003C\u002Fth>\n        \u003C\u002Ftr>\n    \u003C\u002Fthead>\n    \u003Ctbody>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaMA_3_8B_Instruct\u003C\u002Ftd>\n            \u003Ctd>fp32\u003C\u002Ftd>\n            \u003Ctd>LLaMA_3_8B_Instruct_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> LLaMA_3_8B_Instruct_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaMA2_13B_chat\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> LLaMA2_13B_chat_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>LLaMA2_13B_chat_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaMA2_7B_chat\u003C\u002Ftd>\n            \u003Ctd>fp32\u003C\u002Ftd>\n            \u003Ctd>LLaMA2_7B_chat_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> LLaMA2_7B_chat_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaMA_7B\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> LLaMA_7B_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>LLaMA_7B_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">CodeLLaMA_13B_Instruct\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> CodeLLaMA_13B_Instruct_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>CodeLLaMA_13B_Instruct_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">CodeLLaMA_7B_Instruct\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> CodeLLaMA_7B_Instruct_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>CodeLLaMA_7B_Instruct_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">Mistral-7B-Instruct-v0.2\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> Mistral_7B_v0.2_Instruct_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>Mistral_7B_v0.2_Instruct_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">VILA-7B\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> VILA_7B_CLIP_ViT-L_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> VILA_7B_awq_int4_CLIP_ViT-L \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaVA-v1.5-13B\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> LLaVA_13B_CLIP_ViT-L_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> LLaVA_13B_awq_int4_CLIP_ViT-L \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">LLaVA-v1.5-7B\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> LLaVA_7B_CLIP_ViT-L_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> LLaVA_7B_awq_int4_CLIP_ViT-L \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"2\">StarCoder\u003C\u002Ftd>\n            \u003Ctd> fp32\u003C\u002Ftd>\n            \u003Ctd> StarCoder_15.5B_fp32 \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd>int4\u003C\u002Ftd>\n            \u003Ctd>StarCoder_15.5B_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd> ✅ \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"3\">opt-6.7B\u003C\u002Ftd>\n            \u003Ctd>fp32\u003C\u002Ftd>\n            \u003Ctd>opt_6.7B_fp32\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd>int8\u003C\u002Ftd>\n            \u003Ctd>opt_6.7B_smooth_int8\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> opt_6.7B_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"3\">opt-1.3B\u003C\u002Ftd>\n            \u003Ctd>fp32\u003C\u002Ftd>\n            \u003Ctd>opt_1.3B_fp32\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd>int8\u003C\u002Ftd>\n            \u003Ctd>opt_1.3B_smooth_int8\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> opt_1.3B_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003Ctd rowspan=\"3\">opt-125m\u003C\u002Ftd>\n            \u003Ctd>fp32\u003C\u002Ftd>\n            \u003Ctd>opt_125m_fp32\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd>int8\u003C\u002Ftd>\n            \u003Ctd>opt_125m_smooth_int8\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n        \u003Ctr>\n            \u003C!-- 第一列无数据，因与data1合并 -->\n            \u003Ctd> int4\u003C\u002Ftd>\n            \u003Ctd> opt_125m_awq_int4\u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd> ✅  \u003C\u002Ftd>\n            \u003Ctd>  \u003C\u002Ftd>\n        \u003C\u002Ftr>\n    \u003C\u002Ftbody>\n\u003C\u002Ftable>\n\n例如，下载量化后的 LLaMA-2-7B-chat 模型：（对于 int4 模型，请使用 --QM 选项来选择适合您设备的量化模型）\n\n- 在 Intel\u002FAMD 笔记本上：\n  ```bash\n  python tools\u002Fdownload_model.py --model LLaMA2_7B_chat_awq_int4 --QM QM_x86\n  ```\n- 在 M1\u002FM2 Macbook 上：\n  ```bash\n  python tools\u002Fdownload_model.py --model LLaMA2_7B_chat_awq_int4 --QM QM_ARM\n  ```\n- 在 Nvidia GPU 上：\n  ```bash\n  python tools\u002Fdownload_model.py --model LLaMA2_7B_chat_awq_int4 --QM QM_CUDA\n  ```\n\n要使用 TinyChatEngine 部署量化模型，请编译并运行聊天程序。\n\n- 在 CPU 平台上\n```bash\nmake chat -j\n\n\n# .\u002Fchat \u003C模型名称> \u003C精度> \u003C线程数>\n.\u002Fchat LLaMA2_7B_chat INT4 8\n```\n\n- 在 GPU 平台上\n```bash\nmake chat -j\n# .\u002Fchat \u003C模型名称> \u003C精度>\n.\u002Fchat LLaMA2_7B_chat INT4\n```\n\n\n## 相关项目\n\n[TinyEngine：面向微控制器的内存高效、高性能神经网络库](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Ftinyengine)\n\n[SmoothQuant：针对大型语言模型的准确且高效的训练后量化方法](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fsmoothquant)\n\n[AWQ：面向 LLM 压缩与加速的激活感知权重量化方法](https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fllm-awq)\n\n\n## 致谢\n\n[llama.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fllama.cpp)\n\n[whisper.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fwhisper.cpp)\n\n[transformers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers)","# TinyChatEngine 快速上手指南\n\nTinyChatEngine 是一个专为边缘设备（笔记本、树莓派、车载设备等）设计的大语言模型（LLM）和多模态大模型（VLM）推理库。它基于 SmoothQuant 和 AWQ 量化技术，无需额外依赖，支持 x86、ARM (Apple M1\u002FM2) 和 CUDA 后端，可实现本地实时对话。\n\n## 环境准备\n\n### 系统要求\n- **macOS**: 支持 Intel 及 Apple Silicon (M1\u002FM2\u002FM3)。\n- **Windows**: 支持 CPU 推理；NVIDIA GPU 推理处于实验阶段（需计算能力 >= 6.1）。\n- **Linux**: 支持 x86_64 及 ARM64 (如 Raspberry Pi 4\u002F5, Jetson Orin)。\n\n### 前置依赖安装\n\n#### macOS\n使用 Homebrew 安装必要工具：\n```bash\nbrew install boost\nbrew install llvm\n```\n*注意：M1\u002FM2 用户需从 AppStore 安装 Xcode 以启用 Metal 编译器支持。*\n\n#### Windows (CPU)\n1. 下载并安装 [MSYS2](https:\u002F\u002Fwww.msys2.org\u002F)。\n2. 在 MSYS2 终端中安装开发工具链：\n```bash\npacman -S --needed base-devel mingw-w64-x86_64-toolchain make unzip git\n```\n3. 将二进制目录（如 `C:\\msys64\\mingw64\\bin` 和 `C:\\msys64\\usr\\bin`）添加到系统环境变量 `Path` 中。\n\n#### Windows (NVIDIA GPU - 实验性)\n1. 安装 [CUDA Toolkit](https:\u002F\u002Fdeveloper.nvidia.com\u002Fcuda-toolkit)（安装路径请勿包含空格）。\n2. 安装 Visual Studio 并勾选 \"C++ 桌面开发\" 组件。\n3. 后续编译请使用 \"x64 Native Tools Command Prompt for VS\"。\n\n#### Linux (Ubuntu\u002FDebian)\n通常需安装基础构建工具：\n```bash\nsudo apt-get update\nsudo apt-get install -y build-essential git cmake libboost-all-dev llvm\n```\n\n## 安装步骤\n\n### 1. 克隆项目\n```bash\ngit clone --recursive https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\ncd TinyChatEngine\n```\n\n### 2. 配置 Python 环境\n虽然核心引擎是 C\u002FC++，但需要 Python 脚本来下载和转换模型。\n```bash\nconda create -n TinyChatEngine python=3.10 pip -y\nconda activate TinyChatEngine\npip install -r requirements.txt\n```\n*(可选加速)* 如果使用国内网络，建议指定清华或阿里镜像源：\n```bash\npip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 3. 下载量化模型\n进入 `llm` 目录并根据你的硬件平台下载预量化模型（以 Llama-3-8B-Instruct 为例）：\n\n```bash\ncd llm\n```\n\n- **x86 设备 (Intel\u002FAMD CPU)**:\n```bash\npython tools\u002Fdownload_model.py --model LLaMA_3_8B_Instruct_awq_int4 --QM QM_x86\n```\n\n- **ARM 设备 (Mac M1\u002FM2, Raspberry Pi)**:\n```bash\npython tools\u002Fdownload_model.py --model LLaMA_3_8B_Instruct_awq_int4 --QM QM_ARM\n```\n\n- **CUDA 设备 (NVIDIA GPU)**:\n*注意：目前示例命令中官方提供的是 LLaMA2 模型，若需 Llama-3 请确认模型仓库是否已更新对应 CUDA 版本，或使用以下命令下载 LLaMA2 测试：*\n```bash\npython tools\u002Fdownload_model.py --model LLaMA2_7B_chat_awq_int4 --QM QM_CUDA\n```\n\n> **提示**：完整支持的模型列表请查看官方 [Model Zoo](https:\u002F\u002Fhuggingface.co\u002Fmit-han-lab\u002Ftinychatengine-model-zoo)。\n\n### 4. 编译引擎\n返回根目录或直接在 `llm` 目录下编译（根据平台自动检测）：\n```bash\nmake chat -j\n```\n\n*针对 NVIDIA GPU 的特殊配置*：\n如果编译失败或需要指定显卡架构，请编辑 `llm\u002FMakefile`：\n- Windows: 修改第 54 行的 `-arch=sm_xx` (xx 替换为你的显卡算力号，如 75, 86)。\n- Linux\u002FmacOS: 修改第 60 行的 `-gencode arch=compute_xx,code=sm_xx`。\n\n## 基本使用\n\n编译完成后，直接运行生成的可执行文件即可开始对话。\n\n### 启动文本对话\n```bash\n.\u002Fchat\n```\n\n**运行示例输出：**\n```text\nTinyChatEngine by MIT HAN Lab: https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\nUsing model: LLaMA_3_8B_Instruct\nUsing AWQ for 4bit quantization: https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002Fllm-awq\nLoading model... Finished!\nUSER: Write a syllabus for the parallel computing course.\nASSISTANT: Here is a sample syllabus for a parallel computing course:\n\n**Course Title:** Parallel Computing\n**Instructor:** [Name]\n**Description:** This course covers the fundamental concepts of parallel computing...\n```\n\n### 启动多模态对话 (VLM - 仅限部分平台推荐)\n如果你下载了 VILA 等多模态模型，并在 macOS (推荐 iTerm2) 或配置了 `termvisage` 的终端上：\n\n```bash\n.\u002Fvila ..\u002Fassets\u002Ffigures\u002Fvlm_demo\u002Fpedestrian.png\n```\n系统将加载图片并允许你针对图片内容进行提问。","一位经常出差的金融分析师需要在没有网络的高铁上，利用本地笔记本快速分析财报图表并生成摘要。\n\n### 没有 TinyChatEngine 时\n- **依赖云端且延迟高**：必须连接互联网调用云端大模型，高铁信号不稳定导致请求频繁超时或响应缓慢。\n- **数据隐私风险大**：敏感的未公开财报数据需上传至第三方服务器，存在泄露合规隐患。\n- **硬件资源浪费**：普通量化方案在 MacBook M1 或 RTX 4070 等边缘设备上运行效率低，风扇狂转且占用大量内存。\n- **环境部署复杂**：配置 Python 依赖库和深度学习框架耗时费力，不同操作系统间兼容性差，难以快速启动。\n\n### 使用 TinyChatEngine 后\n- **离线实时响应**：借助 SmoothQuant 和 AWQ 压缩技术，直接在本地运行 Llama-3 或 VILA 模型，实现毫秒级即时回复。\n- **数据完全本地化**：所有推理过程均在设备端完成，敏感财务数据不出本地，彻底消除隐私顾虑。\n- **极致性能优化**：针对 Apple Silicon 和 NVIDIA GPU 深度优化，在低功耗下流畅运行视觉语言模型，轻松处理图表分析。\n- **零依赖一键运行**：基于纯 C\u002FC++ 实现，无需安装庞大的深度学习库，下载编译后即可跨平台（Windows\u002FMac\u002FLinux）直接使用。\n\nTinyChatEngine 让高性能大模型真正走出服务器，成为用户身边安全、极速且随时待命的智能助手。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmit-han-lab_TinyChatEngine_94199fbf.gif","mit-han-lab","MIT HAN Lab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmit-han-lab_65e6a38d.png","Efficient AI Computing. PI: Song Han",null,"songhan_mit","https:\u002F\u002Fhanlab.mit.edu","https:\u002F\u002Fgithub.com\u002Fmit-han-lab",[82,86,90,94,98,102,105,109],{"name":83,"color":84,"percentage":85},"C++","#f34b7d",79.3,{"name":87,"color":88,"percentage":89},"Cuda","#3A4E3A",10.3,{"name":91,"color":92,"percentage":93},"Python","#3572A5",8.1,{"name":95,"color":96,"percentage":97},"Metal","#8f14e9",1,{"name":99,"color":100,"percentage":101},"Makefile","#427819",0.5,{"name":103,"color":104,"percentage":101},"Shell","#89e051",{"name":106,"color":107,"percentage":108},"C","#555555",0.4,{"name":110,"color":111,"percentage":112},"Roff","#ecdebe",0,952,97,"2026-04-13T09:03:03","MIT",4,"macOS, Windows","非必需。若使用 NVIDIA GPU，需计算能力 >= 6.1 (如 RTX 系列)，需安装 CUDA Toolkit；Mac M1\u002FM2 用户需安装 Xcode 以启用 Metal 编译器支持。","未说明 (树莓派建议使用 8GB RAM)",{"notes":122,"python":123,"dependencies":124},"核心推理引擎为纯 C\u002FC++ 实现，无 Python 运行时依赖（Python 仅用于模型下载和转换）。Windows GPU 版为实验性功能，安装路径不能包含空格。不同架构（x86\u002FARM\u002FCUDA）需下载对应的量化模型文件。","3.10",[125,126,127,128,129],"boost (macOS)","llvm (macOS)","GCC\u002FMinGW (Windows)","Visual Studio C++ (Windows GPU)","CUDA Toolkit (Windows\u002FNVIDIA GPU)",[16,52,14,35,15,131,13,132],"其他","音频",[134,135,136,137,138,139,140,141,142,143],"arm","c","cpp","cuda-programming","deep-learning","edge-computing","large-language-models","on-device-ai","quantization","x86-64","2026-03-27T02:49:30.150509","2026-04-13T22:44:07.907292",[147,152,157,162,167,172,177],{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},32071,"如何在 Raspberry Pi 上解决编译时的 'undefined reference' 错误？","该错误通常是因为初始版本仅支持 aarch64 架构。维护者已更新 Makefile 以支持 armv6、armv7 和 armv8 架构。请确保拉取最新代码并重新编译。此外，建议使用配备 8GB RAM 的树莓派，使用 4GB 内存可能会遇到内存不足的问题。如果问题依旧，请提供 `neofetch` 的输出以便进一步排查。","https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\u002Fissues\u002F52",{"id":153,"question_zh":154,"answer_zh":155,"source_url":156},32072,"在 Android 设备上部署模型时遇到 'Accelerate\u002FAccelerate.h not found' 或数学函数未声明的错误怎么办？","这些是已知问题，已在最新版本中修复。\n1. 对于 `tanhf` 或 `expf` 未声明的错误：在 `src\u002Fops\u002FGelu.cc` 文件开头添加 `#include \u003Ccmath>`。\n2. 对于 `Accelerate\u002FAccelerate.h` 缺失错误（这是 Apple 专属框架）：请升级到项目的最新版本，构建脚本已针对非 Apple 平台（如 Android ARM）进行了调整，不再依赖此头文件。","https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\u002Fissues\u002F101",{"id":158,"question_zh":159,"answer_zh":160,"source_url":161},32073,"下载模型时文件大小异常（如只有 106KB）且 MD5 校验失败如何解决？","这通常是由于模型托管服务（如 Dropbox）上的文件暂时损坏或丢失导致的。维护者通常会修复源文件。解决方法是：等待一段时间后，重新运行下载命令（例如：`python tools\u002Fdownload_model.py --model \u003C模型名> --QM \u003C量化后端>`）再次尝试下载。如果问题持续，请检查官方是否发布了新的下载链接或说明。","https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\u002Fissues\u002F64",{"id":163,"question_zh":164,"answer_zh":165,"source_url":166},32074,"在 Jetson Nano Orin (8GB) 上运行 LLaMA2-7B 模型时进程因内存不足被杀死怎么办？","如果在构建成功后运行 `.\u002Fchat` 时因内存不足（OOM）导致进程被杀，可以尝试以下方法：\n1. 重启设备：有用户反馈在重启 Jetson Nano Orin 后成功运行了模型，这可能释放了被占用的显存或内存。\n2. 优化交换空间：禁用 ZWAP 并将 SWAP 内存分配到高速 NVMe 存储上以提升性能（虽然这可能不足以单独解决 7B 模型的问题，但有助于稳定性）。\n注意：7B 模型对 8GB 显存\u002F内存压力较大，确保没有其他占用大量资源的应用在后台运行。","https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\u002Fissues\u002F96",{"id":168,"question_zh":169,"answer_zh":170,"source_url":171},32075,"MetalGPU 分支无法构建或编译失败是正常的吗？","是的，MetalGPU 分支目前处于开发进行中（Work in Progress），可能包含未完成的代码或构建问题，因此暂时无法直接构建。建议等待官方发布正式可用的版本，或者关注该分支的后续更新通知。","https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\u002Fissues\u002F93",{"id":173,"question_zh":174,"answer_zh":175,"source_url":176},32076,"如何在 Nvidia Jetson Orin 上解决 CUDA 编译架构参数错误？","在 Jetson Orin 上编译时，如果遇到与 `arch=compute_87,code=sm_87` 相关的错误或链接器错误，请确保您的 CUDA 工具链版本与硬件架构匹配。有用户报告通过解决具体的 `.so` 链接器错误成功编译。请检查 `Makefile` 中的 CUDA 架构设置是否正确对应 Orin 的计算能力（Orin 通常为 sm_87），并确保所有依赖库路径正确。","https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\u002Fissues\u002F72",{"id":178,"question_zh":179,"answer_zh":180,"source_url":181},32077,"TinyChatEngine 是否支持 StarCoder 模型或 AutoAWQ 生成的文件格式？","目前主要通过项目提供的 Python 脚本（`llm\u002Ftools\u002Fdownload_model.py`）来获取支持的模型。关于 Hugging Face 上的 AWQ 模型文件或 AutoAWQ 工具输出的文件兼容性，建议直接使用项目脚本下载经过验证的模型版本。如果需要使用特定模型，可能需要先将其转换为 TinyChatEngine 支持的格式，具体需参考项目文档中关于模型转换的部分。","https:\u002F\u002Fgithub.com\u002Fmit-han-lab\u002FTinyChatEngine\u002Fissues\u002F80",[]]