gguf-editor
GGUF metadata/tensor editor with a built-in quantizer, packaged for Python.
The editor GUI runs in your browser against a local server — files are opened
straight from disk, so multi-GB models are never uploaded or fully loaded into
memory. The quantization engine is the standalone C/C++ quantizer (its own quant
kernels, no third-party dependency), compiled during pip install and bundled
with the package.
Install
pip install gguf-editor
Building the bundled quantizer requires a C/C++ toolchain and CMake ≥ 3.15 (on Windows: MSVC Build Tools). GPU accelerators are opt-in at build time:
CMAKE_ARGS="-DQUANTIZER_CUDA=ON" pip install gguf-editor # NVIDIA (CUDA toolkit)
CMAKE_ARGS="-DQUANTIZER_HIP=ON" pip install gguf-editor # AMD (ROCm/HIP)
CMAKE_ARGS="-DQUANTIZER_METAL=ON" pip install gguf-editor # Apple (macOS)
Usage
python -m gguf_editor # launch the editor GUI in the browser
python -m gguf_editor model.gguf # …opening a file right away
python -m gguf_editor --port 8642 --no-browser
Editor features (as in the desktop editor / chrome extension):
- inspect and edit metadata (all value types incl. arrays), add/delete keys
- rename, delete, reorder (drag), merge tensors; add zero-filled tensors; import tensors from another GGUF
- find & replace across tensor names (literal or regex)
- per-tensor precision changes and/or a batch weight type — on save the file is rebuilt with your edits and then converted by the quantizer into a single output file
- streams tensor data disk-to-disk on save with live progress
CLI quantizer (mirrors the standalone quantizer binary):
python -m gguf_editor quantize -m model-f16.gguf -o model-q4_k.gguf --type q4_k
python -m gguf_editor quantize -m model.safetensors -o model-q8_0.gguf --type q8_0
python -m gguf_editor quantize -m model.gguf -o out.gguf \
--tensor-type-rules "attention.*weight=q4_k" --device auto
python -m gguf_editor devices
Supported types: f32 f16 bf16 q4_0 q4_1 q5_0 q5_1 q8_0 q1_0 q2_k q3_k q4_k q5_k q6_k iq1_s iq1_m iq2_xxs iq2_xs iq2_s iq3_xxs iq3_s iq4_nl iq4_xs tq1_0 tq2_0 mxfp4 nvfp4. Inputs may be GGUF or safetensors (auto-detected;
multi-part safetensors are merged automatically).
Python API
from gguf_editor import gguf, quantizer
parsed = gguf.parse_file("model.gguf") # header-only parse
print(parsed.version, len(parsed.tensor_infos))
quantizer.quantize("model-f16.gguf", "model-q4_k.gguf", default_type="q4_k")
License
MIT
Metadata
Release files for gguf-editor 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gguf_editor-0.1.2.tar.gz | 124.2 kB | Without provenance | Details for gguf_editor-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gguf_editor-0.1.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for gguf_editor-0.1.2-py3-none-win_amd64.whl |
Total release size: 1.1 MB
Release files / gguf_editor-0.1.2.tar.gz
| Download URL | gguf_editor-0.1.2.tar.gz |
|---|---|
| Size | 124.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6b3aa647f5f3f200b3321dda1a2a7d9892810b045481f6d295da2b1c59bb1ff
|
|
BLAKE2b-256 checksum How to use checksums |
140ac6a89f4087e8ae477be671b6f8bda502b50986a270afca3e88b88211b5e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / gguf_editor-0.1.2-py3-none-win_amd64.whl
| Download URL | gguf_editor-0.1.2-py3-none-win_amd64.whl |
|---|---|
| Size | 992.9 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
08fe577632e9658ec497323226011b14b710dd49a8f3b81bf2da181e8aca1395
|
|
BLAKE2b-256 checksum How to use checksums |
a8be471c0ff79547417f349c1573c1e6bf64db810ee5ebdc43e860429e73bcda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for gguf-editor 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.