[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-LeanModels--DFloat11":3,"tool-LeanModels--DFloat11":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 真正成长为懂上",143909,2,"2026-04-07T11:33:18",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":72,"owner_avatar_url":73,"owner_bio":74,"owner_company":74,"owner_location":74,"owner_email":74,"owner_twitter":74,"owner_website":74,"owner_url":75,"languages":76,"stars":85,"forks":86,"last_commit_at":87,"license":88,"difficulty_score":10,"env_os":89,"env_gpu":90,"env_ram":91,"env_deps":92,"category_tags":101,"github_topics":102,"view_count":32,"oss_zip_url":74,"oss_zip_packed_at":74,"status":17,"created_at":108,"updated_at":109,"faqs":110,"releases":140},5127,"LeanModels\u002FDFloat11","DFloat11","DFloat11 [NeurIPS '25]: Lossless Compression of LLMs and DiTs for Efficient GPU Inference","DFloat11 是一款专为大型语言模型（LLM）和扩散模型设计的无损压缩框架，旨在让高性能 AI 模型在显存有限的显卡上也能高效运行。它成功解决了大模型部署中显存占用过高、普通硬件难以加载的痛点，能够将模型体积缩减约 30%，同时保证输出结果与原始模型完全一致，无任何精度损失。\n\n这款工具非常适合需要在本地或资源受限环境中部署大模型的开发者、研究人员以及 AI 应用构建者。无论是运行 FLUX.1 图像生成模型，还是部署 Qwen、Gemma 等语言模型，DFloat11 都能显著降低硬件门槛，例如让 14B 参数的视频生成模型在 24GB 显存下流畅运行，或通过 CPU 卸载技术将峰值显存需求降低近一半。\n\n其核心技术亮点在于独特的“即时解压”机制：模型权重在 GPU 显存中始终保持压缩状态，仅在矩阵运算前瞬间解压，计算完成后立即释放。整个过程完全在 GPU 内部完成，无需经过 CPU 或频繁的数据传输，且解压开销固定，不随批次大小增加而变慢。配合优化的 CUDA 内核，DFloat11 在大幅节省内存的同时，依然保持了推理的高效与稳定。","# DFloat11: Lossless Compression of LLMs and Diffusion Models for Efficient GPU Inference\n\n[![PyPI version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fdfloat11.svg?color=blue)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fdfloat11\u002F)\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2504.11651-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.11651)\n[![Hugging Face](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FModel-%F0%9F%A4%97-yellow.svg)](https:\u002F\u002Fhuggingface.co\u002FDFloat11)\n\n**DFloat11** is a lossless compression framework that reduces the size of Large Language Models (LLMs) and diffusion models (e.g. FLUX.1, Qwen-Image, etc.) by approximately **30%** while preserving **bit-for-bit identical outputs** to the original model. It enables efficient GPU inference on resource-constrained hardware without sacrificing any accuracy.\n\n## 📰 News\n- [09\u002F18\u002F2025] Our research paper is accepted to NeurIPS 2025! Hope to see you at the San Diego Convention Center in December!\n- [08\u002F24\u002F2025] Compression code released!\n  * Reduce the size of any model by 30% with DFloat11 compression.\n  * Get started here: [examples\u002Fcompress_flux1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fcompress_flux1).\n- [07\u002F29\u002F2025] Efficient CPU Offloading Now Supported!\n  * Our latest update enables highly memory-efficient inference by keeping only one transformer block in GPU memory at a time. For example, CPU offloading reduces peak GPU memory for inference of **FLUX.1-Krea-dev from 17.5 to 9.8 GB, Qwen3-8B from 12.4 to 2.3 GB, and HiDream-I1-Full from 26.4 to 9.6 GB**.\n  * An example of using CPU offloading with FLUX.1-Krea-dev-DF11 can be found [here](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FFLUX.1-Krea-dev-DF11).\n  * To enable CPU offloading, simply set `cpu_offload=True` when calling `DFloat11Model.from_pretrained(...)`.\n- [05\u002F23\u002F2025] **Wan2.1** support is now live! [`DFloat11\u002FWan2.1-T2V-14B-Diffusers-DF11`](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FWan2.1-T2V-14B-Diffusers-DF11)\n  * Text-to-video generation with DFloat11 *Wan2.1 14B* using only 24GB VRAM!\n  * Get started here: [examples\u002Fwan2.1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fwan2.1).\n- [05\u002F06\u002F2025] **DFloat11 now supports [`FLUX.1-dev`](https:\u002F\u002Fhuggingface.co\u002Fblack-forest-labs\u002FFLUX.1-dev)**\n  * 🖼️ Generate stunning text-to-image results on GPUs with **less than 24GB VRAM** --- no quality lost!\n  * 📂 Get started here: [examples\u002Fflux.1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fflux.1).\n- [05\u002F05\u002F2025] The `dfloat11` pip package has been upgraded to `v0.2.0`! Run `pip install -U dfloat11[cuda12]` to upgrade to the latest version. We have made the following important changes:\n  * We added support for Qwen 3, Gemma 3, and Phi 4!\n  * The GPU decompression kernel is now 20-40% faster! We achieved it by improving thread occupancy and implementing tons of optimizations.\n  * The DFloat11 models are now stored in safetensors format for better safety and loading performance.\n  * When using a DFloat11 model, only the compressed model is downloaded, not the original model.\n\n## 📦 Installation\n\nRequires a CUDA-compatible GPU (with CUDA 12) and [PyTorch](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F) installed.\n\nTo install from PyPI:\n```bash\npip install -U dfloat11[cuda12]\n```\n\n[Optional] To compile the GPU kernel and install locally:\n```bash\nnvcc -O3 -ptx dfloat11\u002Fdecode.cu -o dfloat11\u002Fdecode.ptx\npip install .[cuda12]\n```\n\n## 🔍 How It Works\n\nDFloat11 compresses model weights using **Huffman coding** of BFloat16 exponent bits, combined with **hardware-aware algorithmic designs** that enable efficient on-the-fly decompression directly on the GPU. During inference, the weights remain compressed in GPU memory and are **decompressed just before matrix multiplications**, then **immediately discarded after use** to minimize memory footprint.\n\nKey benefits:\n\n* **No CPU decompression or host-device data transfer**: all operations are handled entirely on the GPU.\n* **Decompression overhead is constant** per forward pass and **independent of batch size**, making DFloat11 increasingly efficient at larger batch sizes.\n* DFloat11 is **much faster than CPU-offloading approaches**, enabling practical deployment in memory-constrained environments.\n* At batch size = 1, inference is approximately 2× slower than the original BF16 model, but the performance gap narrows significantly with larger batches.\n* The compression is **fully lossless**, guaranteeing that the model’s outputs are **bit-for-bit identical** to those of the original model.\n\n## 🚀 Quick Start\n\n1. Install the `dfloat11` pip package. See [Installation](#-installation).\n2. Run the following code in Python, which automatically downloads the DFloat11 `Qwen3-8B` model and generates a response.\n  ```python\n  import torch\n  from dfloat11 import DFloat11Model\n  from transformers import AutoTokenizer\n\n  model_id = \"DFloat11\u002FQwen3-8B-DF11\"\n\n  model = DFloat11Model.from_pretrained(model_id, device_map=\"auto\")\n\n  tokenizer = AutoTokenizer.from_pretrained(model_id)\n  tokenizer.pad_token = tokenizer.eos_token\n\n  prompt = \"Question: What is a binary tree and its applications? Answer:\"\n  inputs = tokenizer(prompt, return_tensors=\"pt\", padding=True).to(model.device)\n\n  with torch.no_grad():\n      output = model.generate(\n          **inputs,\n          max_new_tokens=256,\n          do_sample=True,\n      )\n\n  print(tokenizer.batch_decode(output, skip_special_tokens=True))\n  ```\n3. Replace the `model_id` in the script above with any pre-compressed model in the [Model Hub](#-model-hub).\n\n## 🏎️ Benchmarking Performance\n\nTo test the speed and memory consumption a DFloat11 LLM during inference:\n\n```bash\nCUDA_VISIBLE_DEVICES=0 python inference.py \\\n  --model_name_or_path DFloat11\u002FQwen3-8B-DF11 \\\n  --prompt \"Question: What is a binary tree and its applications? Answer:\" \\\n  --num_tokens 512 \\\n  --batch_size 1\n```\n\n> 💡 **Tip**: If you specify multiple CUDA devices (e.g., `CUDA_VISIBLE_DEVICES=0,1`), the model will be automatically distributed across them using 🤗 Accelerate's `device_map=\"auto\"`.\n\n### Arguments\n\n- `--model_name_or_path`: HuggingFace name or local path of the DFloat11 model (e.g., `DFloat11\u002FQwen3-8B-DF11`). See the [Model Hub](#-model-hub) section for a list of available DFloat11 models.\n- `--bf16`: *(Optional)* Turn on this flag when passing a BFloat16 model to `--model_name_or_path`\n- `--prompt`: Input prompt string for text generation\n- `--num_tokens`: Number of new tokens to generate per sample\n- `--batch_size`: Number of prompts to process in parallel\n- `--seed`: *(Optional)* Random seed for reproducible results\n\n### Output\n\nThe script prints:\n- Generated responses\n- Total decoding latency\n- Tokens per second (throughput)\n- GPU memory usage (allocated and peak)\n\n## 📚 Model Hub\n\n| Model | DFloat11 Link |\n|-------|---------------|\n| Wan2.1 T2V 14B (see [examples\u002Fwan2.1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fwan2.1)) | [DFloat11\u002FWan2.1-T2V-14B-Diffusers-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FWan2.1-T2V-14B-Diffusers-DF11) |\n| FLUX.1 dev (see [examples\u002Fflux.1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fflux.1)) | [DFloat11\u002FFLUX.1-dev-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FFLUX.1-dev-DF11) |\n| Qwen 3 32B | [DFloat11\u002FQwen3-32B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FQwen3-32B-DF11) |\n| Qwen 3 14B | [DFloat11\u002FQwen3-14B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FQwen3-14B-DF11) |\n| Qwen 3 8B | [DFloat11\u002FQwen3-8B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FQwen3-8B-DF11) |\n| Qwen 3 4B | [DFloat11\u002FQwen3-4B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FQwen3-4B-DF11) |\n| Phi 4 Reasoning Plus | [DFloat11\u002FPhi-4-reasoning-plus-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FPhi-4-reasoning-plus-DF11) |\n| Gemma 3 27B Instruct | [DFloat11\u002Fgemma-3-27b-it-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002Fgemma-3-27b-it-DF11) |\n| Gemma 3 12B Instruct | [DFloat11\u002Fgemma-3-12b-it-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002Fgemma-3-12b-it-DF11) |\n| Gemma 3 4B Instruct  | [DFloat11\u002Fgemma-3-4b-it-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002Fgemma-3-4b-it-DF11) |\n| Llama 3.1 8B Instruct | [DFloat11\u002FLlama-3.1-8B-Instruct-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FLlama-3.1-8B-Instruct-DF11) |\n| DeepSeek R1 Distill Qwen 32B | [DFloat11\u002FDeepSeek-R1-Distill-Qwen-32B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FDeepSeek-R1-Distill-Qwen-32B-DF11) |\n| DeepSeek R1 Distill Qwen 14B | [DFloat11\u002FDeepSeek-R1-Distill-Qwen-14B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FDeepSeek-R1-Distill-Qwen-14B-DF11) |\n| DeepSeek R1 Distill Qwen 7B  | [DFloat11\u002FDeepSeek-R1-Distill-Qwen-7B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FDeepSeek-R1-Distill-Qwen-7B-DF11) |\n| DeepSeek R1 Distill Llama 8B | [DFloat11\u002FDeepSeek-R1-Distill-Llama-8B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FDeepSeek-R1-Distill-Llama-8B-DF11) |\n| ... | [Discover more models on our HF page!](https:\u002F\u002Fhuggingface.co\u002FDFloat11) |\n\n### How to Use a DFloat11 Model\n\n1. Download a model using the HuggingFace command line tool:\n  ```bash\n  huggingface-cli download \\\n    DFloat11\u002FLlama-3.1-8B-Instruct-DF11 \\     # DFloat11 model name\n    --local-dir .\u002FLlama-3.1-8B-Instruct-DF11  # local path to download the DFloat11 model\n  ```\n2. Run the following in Python to load the model and tokenizer:\n  ```python\n  from dfloat11 import DFloat11Model\n  from transformers import AutoTokenizer\n\n  model_path = \".\u002FLlama-3.1-8B-Instruct-DF11\"\n  model = DFloat11Model.from_pretrained(model_path, device_map=\"auto\")\n  tokenizer = AutoTokenizer.from_pretrained(model_path)\n  ```\n\n## 🗜️ Compressing Models (BFloat16 → DFloat11)\n\nThe DFloat11 compression utility is exposed via the `compress_model` function.\n\nCheck [examples\u002Fcompress_flux1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fcompress_flux1) for a detailed example on compressing the FLUX.1 model.\n\n## 🔗 Links\n\n👉 Explore pre-compressed DFloat11 models ready to use on HuggingFace: **[https:\u002F\u002Fhuggingface.co\u002FDFloat11](https:\u002F\u002Fhuggingface.co\u002FDFloat11)**\n\n📂 Official Code Repository: [https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11)\n\n## 🧠 Contributions\n\nThis work is brought to you by the team at Rice University and [xMAD.ai](https:\u002F\u002Fxmad.ai\u002F).\n\nThe GPU kernel was designed and implemented by [Tianyi Zhang](https:\u002F\u002Fgithub.com\u002Ftonyzhang617).\n\n## 📚 Citation\n\nIf you found our work useful or interesting, please consider citing our paper:\n\n```bibtex\n@inproceedings{\n  zhang2025,\n  title={70\\% Size, 100\\% Accuracy: Lossless {LLM} Compression for Efficient {GPU} Inference via Dynamic-Length Float ({DF}loat11)},\n  author={Tianyi Zhang and Mohsen Hariri and Shaochen Zhong and Vipin Chaudhary and Yang Sui and Xia Hu and Anshumali Shrivastava},\n  booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},\n  year={2025},\n  url={https:\u002F\u002Fopenreview.net\u002Fforum?id=xdNAVP7TGy}\n}\n```\n","# DFloat11：用于高效 GPU 推理的 LLM 和扩散模型无损压缩\n\n[![PyPI version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fdfloat11.svg?color=blue)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fdfloat11\u002F)\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2504.11651-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.11651)\n[![Hugging Face](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FModel-%F0%9F%A4%97-yellow.svg)](https:\u002F\u002Fhuggingface.co\u002FDFloat11)\n\n**DFloat11** 是一种无损压缩框架，可在保持与原始模型 **逐位完全相同输出** 的前提下，将大型语言模型 (LLMs) 和扩散模型（例如 FLUX.1、Qwen-Image 等）的大小缩减约 **30%**。它能够在资源受限的硬件上实现高效的 GPU 推理，且不会损失任何精度。\n\n## 📰 最新消息\n- [2025年9月18日] 我们的研究论文已被 NeurIPS 2025 接受！期待在12月的圣地亚哥会议中心与您相见！\n- [2025年8月24日] 压缩代码已发布！\n  * 使用 DFloat11 压缩可将任意模型的大小减少 30%。\n  * 快速入门：[examples\u002Fcompress_flux1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fcompress_flux1)。\n- [2025年7月29日] 现已支持高效的 CPU 卸载！\n  * 我们的最新更新通过每次仅将一个 Transformer 块保留在 GPU 内存中，实现了极高的内存效率推理。例如，使用 CPU 卸载后，**FLUX.1-Krea-dev 的峰值 GPU 内存占用从 17.5 GB 降至 9.8 GB，Qwen3-8B 从 12.4 GB 降至 2.3 GB，HiDream-I1-Full 从 26.4 GB 降至 9.6 GB**。\n  * 使用 FLUX.1-Krea-dev-DF11 进行 CPU 卸载的示例可在此处查看：[此处](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FFLUX.1-Krea-dev-DF11)。\n  * 要启用 CPU 卸载，只需在调用 `DFloat11Model.from_pretrained(...)` 时设置 `cpu_offload=True` 即可。\n- [2025年5月23日] 现已支持 **Wan2.1**！[`DFloat11\u002FWan2.1-T2V-14B-Diffusers-DF11`](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FWan2.1-T2V-14B-Diffusers-DF11)\n  * 仅需 24GB 显存即可使用 DFloat11 *Wan2.1 14B* 进行文本到视频生成！\n  * 快速入门：[examples\u002Fwan2.1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fwan2.1)。\n- [2025年5月6日] **DFloat11 现已支持 [`FLUX.1-dev`](https:\u002F\u002Fhuggingface.co\u002Fblack-forest-labs\u002FFLUX.1-dev)**\n  * 🖼️ 在显存不足 24GB 的 GPU 上生成惊艳的文本到图像结果——质量毫无损失！\n  * 📂 快速入门：[examples\u002Fflux.1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fflux.1)。\n- [2025年5月5日] `dfloat11` pip 包已升级至 `v0.2.0`！运行 `pip install -U dfloat11[cuda12]` 升级到最新版本。我们进行了以下重要更改：\n  * 新增对 Qwen 3、Gemma 3 和 Phi 4 的支持！\n  * GPU 解压缩内核现在快了 20–40%！我们通过提高线程占用率并实施大量优化实现了这一目标。\n  * DFloat11 模型现以 safetensors 格式存储，以提升安全性和加载性能。\n  * 使用 DFloat11 模型时，仅下载压缩后的模型，而不下载原始模型。\n\n## 📦 安装\n\n需要兼容 CUDA 的 GPU（配备 CUDA 12）以及已安装的 [PyTorch](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F)。\n\n从 PyPI 安装：\n```bash\npip install -U dfloat11[cuda12]\n```\n\n[可选] 编译 GPU 内核并本地安装：\n```bash\nnvcc -O3 -ptx dfloat11\u002Fdecode.cu -o dfloat11\u002Fdecode.ptx\npip install .[cuda12]\n```\n\n## 🔍 工作原理\n\nDFloat11 使用 BFloat16 指数位的 **哈夫曼编码** 对模型权重进行压缩，并结合 **硬件感知的算法设计**，实现在 GPU 上直接进行高效的实时解压缩。在推理过程中，权重始终以压缩形式保存在 GPU 内存中，仅在 **矩阵乘法之前被解压缩**，并在使用后 **立即丢弃**，从而最大限度地减少内存占用。\n\n主要优势：\n\n* **无需 CPU 解压缩或主机与设备之间的数据传输**：所有操作完全由 GPU 处理。\n* **解压缩开销在每次前向传播中保持恒定**，且 **与批次大小无关**，因此在较大批次下 DFloat11 的效率会显著提高。\n* DFloat11 的速度 **远超 CPU 卸载方案**，使其能够在内存受限的环境中实际部署。\n* 当批次大小为 1 时，推理速度约为原始 BF16 模型的 2 倍，但随着批次增大，性能差距会显著缩小。\n* 该压缩方法 **完全无损**，确保模型的输出与原始模型的输出 **逐位完全相同**。\n\n## 🚀 快速入门\n\n1. 安装 `dfloat11` pip 包。请参阅 [安装](#-installation) 部分。\n2. 在 Python 中运行以下代码，它会自动下载 DFloat11 `Qwen3-8B` 模型并生成响应。\n  ```python\n  import torch\n  from dfloat11 import DFloat11Model\n  from transformers import AutoTokenizer\n\n  model_id = \"DFloat11\u002FQwen3-8B-DF11\"\n\n  model = DFloat11Model.from_pretrained(model_id, device_map=\"auto\")\n\n  tokenizer = AutoTokenizer.from_pretrained(model_id)\n  tokenizer.pad_token = tokenizer.eos_token\n\n  prompt = \"问题：什么是二叉树及其应用？答案：\"\n  inputs = tokenizer(prompt, return_tensors=\"pt\", padding=True).to(model.device)\n\n  with torch.no_grad():\n      output = model.generate(\n          **inputs,\n          max_new_tokens=256,\n          do_sample=True,\n      )\n\n  print(tokenizer.batch_decode(output, skip_special_tokens=True))\n  ```\n3. 将上述脚本中的 `model_id` 替换为 [模型库](#-model-hub) 中的任何预压缩模型。\n\n## 🏎️ 性能基准测试\n\n要测试 DFloat11 LLM 在推理过程中的速度和内存消耗：\n\n```bash\nCUDA_VISIBLE_DEVICES=0 python inference.py \\\n  --model_name_or_path DFloat11\u002FQwen3-8B-DF11 \\\n  --prompt \"问题：什么是二叉树及其应用？答案：\" \\\n  --num_tokens 512 \\\n  --batch_size 1\n```\n\n> 💡 **提示**：如果您指定了多个 CUDA 设备（例如 `CUDA_VISIBLE_DEVICES=0,1`），模型将使用 🤗 Accelerate 的 `device_map=\"auto\"` 自动分布在这些设备上。\n\n### 参数\n\n- `--model_name_or_path`：HuggingFace 名称或本地路径的 DFloat11 模型（例如 `DFloat11\u002FQwen3-8B-DF11`）。有关可用 DFloat11 模型的列表，请参阅 [模型库](#-model-hub) 部分。\n- `--bf16`：*(可选)* 当将 BFloat16 模型传递给 `--model_name_or_path` 时，请启用此标志。\n- `--prompt`：用于文本生成的输入提示字符串。\n- `--num_tokens`：每个样本要生成的新标记数量。\n- `--batch_size`：要并行处理的提示数量。\n- `--seed`：*(可选)* 用于获得可重复结果的随机种子。\n\n### 输出\n\n脚本将打印：\n- 生成的响应\n- 总解码延迟\n- 每秒生成的标记数（吞吐量）\n- GPU 内存使用情况（已分配和峰值）\n\n## 📚 模型中心\n\n| 模型 | DFloat11 链接 |\n|-------|---------------|\n| Wan2.1 T2V 14B（参见 [examples\u002Fwan2.1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fwan2.1)） | [DFloat11\u002FWan2.1-T2V-14B-Diffusers-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FWan2.1-T2V-14B-Diffusers-DF11) |\n| FLUX.1 dev（参见 [examples\u002Fflux.1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fflux.1)） | [DFloat11\u002FFLUX.1-dev-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FFLUX.1-dev-DF11) |\n| Qwen 3 32B | [DFloat11\u002FQwen3-32B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FQwen3-32B-DF11) |\n| Qwen 3 14B | [DFloat11\u002FQwen3-14B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FQwen3-14B-DF11) |\n| Qwen 3 8B | [DFloat11\u002FQwen3-8B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FQwen3-8B-DF11) |\n| Qwen 3 4B | [DFloat11\u002FQwen3-4B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FQwen3-4B-DF11) |\n| Phi 4 Reasoning Plus | [DFloat11\u002FPhi-4-reasoning-plus-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FPhi-4-reasoning-plus-DF11) |\n| Gemma 3 27B Instruct | [DFloat11\u002Fgemma-3-27b-it-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002Fgemma-3-27b-it-DF11) |\n| Gemma 3 12B Instruct | [DFloat11\u002Fgemma-3-12b-it-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002Fgemma-3-12b-it-DF11) |\n| Gemma 3 4B Instruct  | [DFloat11\u002Fgemma-3-4b-it-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002Fgemma-3-4b-it-DF11) |\n| Llama 3.1 8B Instruct | [DFloat11\u002FLlama-3.1-8B-Instruct-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FLlama-3.1-8B-Instruct-DF11) |\n| DeepSeek R1 Distill Qwen 32B | [DFloat11\u002FDeepSeek-R1-Distill-Qwen-32B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FDeepSeek-R1-Distill-Qwen-32B-DF11) |\n| DeepSeek R1 Distill Qwen 14B | [DFloat11\u002FDeepSeek-R1-Distill-Qwen-14B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FDeepSeek-R1-Distill-Qwen-14B-DF11) |\n| DeepSeek R1 Distill Qwen 7B  | [DFloat11\u002FDeepSeek-R1-Distill-Qwen-7B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FDeepSeek-R1-Distill-Qwen-7B-DF11) |\n| DeepSeek R1 Distill Llama 8B | [DFloat11\u002FDeepSeek-R1-Distill-Llama-8B-DF11](https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FDeepSeek-R1-Distill-Llama-8B-DF11) |\n| ... | [在我们的 HF 页面上发现更多模型！](https:\u002F\u002Fhuggingface.co\u002FDFloat11) |\n\n### 如何使用 DFloat11 模型\n\n1. 使用 HuggingFace 命令行工具下载模型：\n  ```bash\n  huggingface-cli download \\\n    DFloat11\u002FLlama-3.1-8B-Instruct-DF11 \\     # DFloat11 模型名称\n    --local-dir .\u002FLlama-3.1-8B-Instruct-DF11  # 下载 DFloat11 模型的本地路径\n  ```\n2. 在 Python 中运行以下代码以加载模型和分词器：\n  ```python\n  from dfloat11 import DFloat11Model\n  from transformers import AutoTokenizer\n\n  model_path = \".\u002FLlama-3.1-8B-Instruct-DF11\"\n  model = DFloat11Model.from_pretrained(model_path, device_map=\"auto\")\n  tokenizer = AutoTokenizer.from_pretrained(model_path)\n  ```\n\n## 🗜️ 模型压缩（BFloat16 → DFloat11）\n\nDFloat11 压缩工具通过 `compress_model` 函数提供。\n\n请参阅 [examples\u002Fcompress_flux1](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Ftree\u002Fmaster\u002Fexamples\u002Fcompress_flux1)，了解关于压缩 FLUX.1 模型的详细示例。\n\n## 🔗 链接\n\n👉 在 HuggingFace 上探索可直接使用的预压缩 DFloat11 模型：**[https:\u002F\u002Fhuggingface.co\u002FDFloat11](https:\u002F\u002Fhuggingface.co\u002FDFloat11)**\n\n📂 官方代码仓库：[https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11](https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11)\n\n## 🧠 贡献\n\n本工作由莱斯大学团队和 [xMAD.ai](https:\u002F\u002Fxmad.ai\u002F) 共同完成。\n\nGPU 内核由 [Tianyi Zhang](https:\u002F\u002Fgithub.com\u002Ftonyzhang617) 设计并实现。\n\n## 📚 引用\n\n如果您觉得我们的工作有用或有趣，请考虑引用我们的论文：\n\n```bibtex\n@inproceedings{\n  zhang2025,\n  title={70\\% Size, 100\\% Accuracy: Lossless {LLM} Compression for Efficient {GPU} Inference via Dynamic-Length Float ({DF}loat11)},\n  author={Tianyi Zhang and Mohsen Hariri and Shaochen Zhong and Vipin Chaudhary and Yang Sui and Xia Hu and Anshumali Shrivastava},\n  booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},\n  year={2025},\n  url={https:\u002F\u002Fopenreview.net\u002Fforum?id=xdNAVP7TGy}\n}\n```","# DFloat11 快速上手指南\n\nDFloat11 是一个无损压缩框架，可将大语言模型（LLM）和扩散模型（如 FLUX.1、Qwen 等）的体积缩减约 **30%**，同时保持输出结果与原始模型**逐位完全一致**。它专为资源受限的 GPU 环境设计，支持高效的显存优化推理。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux (推荐) 或 Windows\n*   **GPU**: 支持 CUDA 的 NVIDIA 显卡\n*   **CUDA 版本**: CUDA 12 (必须)\n*   **Python 依赖**: PyTorch (需与 CUDA 12 兼容)\n\n> **提示**: 如果您在中国大陆地区，建议在安装 PyTorch 时使用国内镜像源（如清华源或阿里源）以加速下载。\n\n## 安装步骤\n\n### 方式一：通过 PyPI 安装（推荐）\n\n直接使用 pip 安装最新版 `dfloat11`，并指定 CUDA 12 支持：\n\n```bash\npip install -U dfloat11[cuda12] -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 方式二：本地编译安装（可选）\n\n如果您需要自定义编译 GPU 内核以获得最佳性能，可执行以下命令：\n\n```bash\nnvcc -O3 -ptx dfloat11\u002Fdecode.cu -o dfloat11\u002Fdecode.ptx\npip install .[cuda12]\n```\n\n## 基本使用\n\n以下是最简单的使用示例，演示如何加载已压缩的 **Qwen3-8B** 模型并生成文本。该脚本会自动从 Hugging Face 下载压缩后的模型权重。\n\n```python\nimport torch\nfrom dfloat11 import DFloat11Model\nfrom transformers import AutoTokenizer\n\n# 指定 DFloat11 压缩后的模型 ID\nmodel_id = \"DFloat11\u002FQwen3-8B-DF11\"\n\n# 加载模型，device_map=\"auto\" 会自动分配 GPU 资源\nmodel = DFloat11Model.from_pretrained(model_id, device_map=\"auto\")\n\n# 加载分词器\ntokenizer = AutoTokenizer.from_pretrained(model_id)\ntokenizer.pad_token = tokenizer.eos_token\n\n# 准备输入提示\nprompt = \"Question: What is a binary tree and its applications? Answer:\"\ninputs = tokenizer(prompt, return_tensors=\"pt\", padding=True).to(model.device)\n\n# 生成回复\nwith torch.no_grad():\n    output = model.generate(\n        **inputs,\n        max_new_tokens=256,\n        do_sample=True,\n    )\n\n# 输出结果\nprint(tokenizer.batch_decode(output, skip_special_tokens=True))\n```\n\n### 进阶提示：启用 CPU 卸载\n如果您的显存非常紧张，可以在加载模型时启用 CPU 卸载功能，这将显著降低峰值显存占用（例如将 Qwen3-8B 的显存占用从 12.4GB 降至 2.3GB）：\n\n```python\nmodel = DFloat11Model.from_pretrained(model_id, device_map=\"auto\", cpu_offload=True)\n```\n\n### 更多模型\n您可以替换代码中的 `model_id` 来使用其他已压缩模型，包括 FLUX.1、Wan2.1、Gemma 3、Phi 4 等。完整模型列表请访问 [DFloat11 Hugging Face 主页](https:\u002F\u002Fhuggingface.co\u002FDFloat11)。","一家拥有单张 24GB 显存显卡的独立开发者，试图在本地部署最新的 FLUX.1-dev 图像生成模型以进行商业创作。\n\n### 没有 DFloat11 时\n- **显存爆满无法运行**：原始模型加载后峰值显存需求超过 24GB，直接导致 CUDA 内存溢出（OOM），程序无法启动。\n- **被迫降级牺牲画质**：为了强行运行，不得不使用量化版本（如 FP8 或 INT4），导致生成图像出现色彩断层或细节丢失，无法满足商用标准。\n- **依赖昂贵云端资源**：若坚持使用高精度原版模型，只能租用昂贵的多卡云服务器，大幅压缩了个人项目的利润空间。\n- **推理速度受限于传输**：若尝试 CPU 卸载方案，频繁的宿主与设备间数据拷贝使得单张图片生成耗时极长，效率低下。\n\n### 使用 DFloat11 后\n- **轻松适配消费级显卡**：DFloat11 将模型体积无损压缩约 30%，使 FLUX.1-dev 能在 24GB 显存内流畅运行，无需任何硬件升级。\n- **保持比特级完美画质**：采用霍夫曼编码与 GPU 即时解压技术，输出结果与原始大模型完全一致（bit-for-bit identical），确保商业交付质量。\n- **纯 GPU 加速零延迟**：所有解压操作直接在显存中完成，消除了 CPU 通信瓶颈，解码内核优化更带来 20-40% 的速度提升。\n- **降低部署门槛与成本**：开发者仅需下载压缩后的 Safetensors 文件即可启动，彻底摆脱了对高价云算力的依赖。\n\nDFloat11 通过硬件感知的无损压缩技术，让顶级大模型在消费级显卡上实现了“既省显存又不失真”的高效推理。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FLeanModels_DFloat11_cb1b7497.png","LeanModels","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FLeanModels_b25931a6.png",null,"https:\u002F\u002Fgithub.com\u002FLeanModels",[77,81],{"name":78,"color":79,"percentage":80},"Python","#3572A5",80.4,{"name":82,"color":83,"percentage":84},"Cuda","#3A4E3A",19.6,617,38,"2026-04-02T17:23:27","Apache-2.0","Linux","必需 NVIDIA GPU，支持 CUDA 12。显存需求取决于模型大小，但通过压缩和 CPU Offloading 技术可显著降低（例如：运行 FLUX.1-Krea-dev 峰值显存可从 17.5GB 降至 9.8GB，Qwen3-8B 可从 12.4GB 降至 2.3GB）。支持多卡自动分布。","未说明（但支持高效的 CPU Offloading，可将部分权重卸载至系统内存以节省显存）",{"notes":93,"python":94,"dependencies":95},"1. 必须安装 CUDA 12 版本的 PyTorch。2. 核心功能为无损压缩（约减少 30% 体积），保证输出与原始模型比特级一致。3. 支持 CPU Offloading 模式，只需在加载模型时设置 `cpu_offload=True` 即可大幅降低峰值显存占用。4. 推理时权重在 GPU 上即时解压，批量越大效率越高；单批次推理速度约为原始 BF16 模型的一半，但随批次增加差距缩小。5. 模型文件以 safetensors 格式存储。6. 若需本地编译优化内核，需安装 NVIDIA CUDA Toolkit (nvcc)。","未说明",[96,97,98,99,100],"torch","transformers","accelerate","safetensors","nvcc (用于编译可选的 GPU 内核)",[14,35,15],[103,104,105,106,107],"compression","gpu","llm","lossless-compression-algorithm","diffusion-models","2026-03-27T02:49:30.150509","2026-04-08T00:57:53.600000",[111,116,121,126,131,136],{"id":112,"question_zh":113,"answer_zh":114,"source_url":115},23276,"如何压缩我自己的模型？编码代码在哪里？","压缩代码已经发布。您可以查看仓库中的 `examples\u002Fcompress_flux1` 目录，那里提供了压缩 FLUX.1 模型的具体示例代码和流程。","https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Fissues\u002F18",{"id":117,"question_zh":118,"answer_zh":119,"source_url":120},23277,"是否可以将 DFloat11 (DF11) 应用于激活值（activations）而不仅仅是权重？","目前主要瓶颈在于需要实时进行压缩和解压。虽然 BF16 激活值的指数分布与权重相似，但在应用前需验证激活值分布是否适合 DF11 压缩（权重已被证明可无损压缩至 11 bpw）。此外，当前实现硬编码针对 PyTorch `nn.Module` 结构，若要用于任意张量（如激活值），需要自行修改代码以适应。在硬件层面，只有当有专门的量化数据类型加速支持时，激活值量化才有意义。","https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Fissues\u002F37",{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},23278,"如何在多 GPU 环境（如 H200 HGX）下解决解压吞吐量在 GPU 0 上显著下降的问题？","这是一个由用户调试错误引起的假象。原因是在其他 GPU 执行解压内核时，错误地同步了 GPU 0，导致测量数据不准。原始代码库本身没有问题，无需特殊配置即可在多卡环境下正常运行。","https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Fissues\u002F36",{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},23279,"哪里可以下载 FLUX.2-klein-9B 及其 base 版本的 DF11 量化模型？","社区成员已上传了基于 `diffusers` 原生版本的模型，解决了 ComfyUI 版本中存在的 Bug。下载地址如下：\n- FLUX.2-klein-9B: https:\u002F\u002Fhuggingface.co\u002Fmingyi456\u002FFLUX.2-klein-9B-DF11\n- FLUX.2-klein-base-9B: https:\u002F\u002Fhuggingface.co\u002Fmingyi456\u002FFLUX.2-klein-base-9B-DF11","https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Fissues\u002F34",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},23280,"哪里可以获取 FLUX.1-Krea-dev 的 DF11 压缩版本？","该模型的 DF11 压缩版本已发布在 Hugging Face 上，地址为：https:\u002F\u002Fhuggingface.co\u002FDFloat11\u002FFLUX.1-Krea-dev-DF11。它被视为原始 dev 模型的原位替代品，完全兼容现有的压缩代码。","https:\u002F\u002Fgithub.com\u002FLeanModels\u002FDFloat11\u002Fissues\u002F20",{"id":137,"question_zh":138,"answer_zh":139,"source_url":135},23281,"DFloat11 项目是否还在维护？压缩脚本是否已公开？","是的，项目处于活跃状态，压缩代码已经发布。用户可以参考 `examples\u002Fcompress_flux1` 目录中的示例来使用这些脚本压缩自己的模型（如 FLUX.1）。",[]]