{"id":25474908,"url":"https://github.com/spongeengine/spongequant","last_synced_at":"2025-11-05T18:30:22.660Z","repository":{"id":276565447,"uuid":"927859876","full_name":"SpongeEngine/SpongeQuant","owner":"SpongeEngine","description":"The Oobabooga of LLM quantization.","archived":false,"fork":false,"pushed_at":"2025-02-18T09:48:07.000Z","size":165,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T10:40:49.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpongeEngine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-05T16:59:41.000Z","updated_at":"2025-02-18T09:48:11.000Z","dependencies_parsed_at":"2025-02-10T06:25:29.624Z","dependency_job_id":null,"html_url":"https://github.com/SpongeEngine/SpongeQuant","commit_stats":null,"previous_names":["basedagi/qtavern","spongeengine/qtavern","spongeengine/spongequant"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpongeEngine%2FSpongeQuant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpongeEngine%2FSpongeQuant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpongeEngine%2FSpongeQuant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpongeEngine%2FSpongeQuant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpongeEngine","download_url":"https://codeload.github.com/SpongeEngine/SpongeQuant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239467454,"owners_count":19643605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-18T11:52:07.136Z","updated_at":"2025-11-05T18:30:22.094Z","avatar_url":"https://github.com/SpongeEngine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpongeQuant\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Python Version](https://img.shields.io/badge/Python-3.10%2B-blue.svg)](https://www.python.org)\n\nWeb UI for quantizing LLMs from Hugging Face. Inspired by [Oobabooga](https://github.com/oobabooga/text-generation-webui) and the [Colab AutoQuant notebook](https://colab.research.google.com/drive/1b6nqC7UZVt8bx4MksX7s656GXPM-eWw4).  \nOnly GGUF quantization works for now. Windows is unstable.\n\n## Quick Start\n\n### Windows\n#### Install Docker Desktop\nGot to https://docs.docker.com/desktop/setup/install/windows-install/, download and install Docker Desktop.\n```\nRight click on `start_windows.ps1` and press `Run with PowerShell`.\n```\n\n### Linux\n```bash\n./start_linux.sh\n```\n\n## Features\n- **Multi-method Quantization:** Choose from GGUF, GPTQ, ExLlamaV2, AWQ, and HQQ.\n- **Unified Docker Setup:** Separate Dockerfiles for CPU-only and GPU (CUDA) builds.\n- **Dynamic Runtime Detection:** Launch the appropriate container based on hardware (via startup scripts for Linux and Windows).\n- **Easy-to-Use Web UI:** Built with Gradio, enabling interactive model quantization.\n\n# Quantization Methods Comparison\n\n| Method       | CPU Quantization       | CPU Inference         | GPU Quantization       | GPU Inference          | Tradeoffs / Notes                                                                                                      |\n|--------------|------------------------|-----------------------|------------------------|------------------------|------------------------------------------------------------------------------------------------------------------------|\n| **GGUF**     | Yes                    | Yes                   | Yes (but not rquired)  | Yes (but not rquired   | Designed for efficient CPU inference via llama.cpp; optimized for low precision on CPUs.                               |\n| **GPTQ**     | No                     | No                    | Yes                    | Yes                    | High compression \u0026 accuracy but built for CUDA; forcing CPU-only leads to very slow and unreliable processing.         |\n| **ExLlamaV2**| No                     | No                    | Yes                    | Yes                    | Optimized for GPU; CPU fallback is possible but performance is suboptimal.                                             |\n| **AWQ**      | No                     | No                    | Yes                    | Yes                    | Relies on CUDA kernels for fast quantization; CPU-only execution is generally impractical.                            |\n| **HQQ**      | No                     | No                    | Yes                    | Yes                    | Designed primarily for GPU inference with specialized kernels; CPU usage is not widely validated and may be very slow. |\n- **GPTQ**, **ExLlamaV2**, **AWQ**, and **HQQ** need a GPU for quantization (and inference). As of now, only GGUF is reliably CPU-friendly, both for quantization and inference.\n\n### Project Structure\n```\nSpongeQuant/\n├── app/\n│   ├── app.py                # Main application code (Gradio UI)\n│   ├── requirements.cpu.txt  # CPU-only dependencies\n│   ├── requirements.gpu-cuda.txt  # GPU (CUDA) dependencies\n│   └── ...                   # Other application files\n├── Dockerfile.cpu            # Dockerfile for CPU-only mode\n├── Dockerfile.gpu-cuda       # Dockerfile for GPU (CUDA) mode\n├── Dockerfile.gpu-rocm       # (Placeholder for future ROCm support)\n├── start_linux.sh            # Startup script for Linux\n├── start_windows.ps1         # Startup script for Windows\n├── README.md                 # This file\n└── ...                       # Other files (models, quantized_models, etc.)\n```\n\n### Contributing\nContributions are welcome! Please feel free to open issues or submit pull requests on GitHub.\n\n```\ndocker run --gpus all -it -p \"${PORT}:${PORT}\" \\\n      -v \"$(pwd)/app/gguf:/app/gguf\" \\\n      -v \"$(pwd)/models:/app/models\" \\\n      -v \"$(pwd)/quantized_models:/app/quantized_models\" \\\n      --rm \"${IMAGE_NAME}\"\n```\n\n```\ndocker run -it -p \"${PORT}:${PORT}\" \\\n      -v \"$(pwd)/app/gguf:/app/gguf\" \\\n      -v \"$(pwd)/models:/app/models\" \\\n      -v \"$(pwd)/quantized_models:/app/quantized_models\" \\\n      --rm \"${IMAGE_NAME}\"\n```\n\nx86-64 CPUs have AVX2/FMA support, which accelerate tensor operations in llama.cpp much faster than ARM NEON/DOTPROD.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspongeengine%2Fspongequant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspongeengine%2Fspongequant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspongeengine%2Fspongequant/lists"}