Last active
March 12, 2026 02:39
-
-
Save cu/fde922f4cb840cd4b29ba38031009a5b to your computer and use it in GitHub Desktop.
GGUF tensor type inspector thinger!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { GGMLQuantizationType, gguf } from "@huggingface/gguf"; | |
| /* | |
| * GGUF tensor type inspector thinger! | |
| * | |
| * 1. Copypasta this whole file into a new notebook at: https://jupyterlite.github.io/javascript-kernel/ | |
| * 2. Put your URLs below. Use the "download" link to the model. | |
| * (The URL should contain "resolve" NOT "blob".) | |
| * 3. Run | |
| */ | |
| urls_unsloth_q8 = [ | |
| 'https://huggingface.co/unsloth/Qwen3-Coder-Next-GGUF/resolve/main/UD-Q8_K_XL/Qwen3-Coder-Next-UD-Q8_K_XL-00001-of-00003.gguf', | |
| 'https://huggingface.co/unsloth/Qwen3-Coder-Next-GGUF/resolve/main/UD-Q8_K_XL/Qwen3-Coder-Next-UD-Q8_K_XL-00002-of-00003.gguf', | |
| 'https://huggingface.co/unsloth/Qwen3-Coder-Next-GGUF/resolve/main/UD-Q8_K_XL/Qwen3-Coder-Next-UD-Q8_K_XL-00003-of-00003.gguf' | |
| ]; | |
| urls_qwen_q8 = [ | |
| 'https://huggingface.co/Qwen/Qwen3-Coder-Next-GGUF/resolve/main/Qwen3-Coder-Next-Q8_0/Qwen3-Coder-Next-Q8_0-00001-of-00004.gguf', | |
| 'https://huggingface.co/Qwen/Qwen3-Coder-Next-GGUF/resolve/main/Qwen3-Coder-Next-Q8_0/Qwen3-Coder-Next-Q8_0-00002-of-00004.gguf', | |
| 'https://huggingface.co/Qwen/Qwen3-Coder-Next-GGUF/resolve/main/Qwen3-Coder-Next-Q8_0/Qwen3-Coder-Next-Q8_0-00003-of-00004.gguf', | |
| 'https://huggingface.co/Qwen/Qwen3-Coder-Next-GGUF/resolve/main/Qwen3-Coder-Next-Q8_0/Qwen3-Coder-Next-Q8_0-00004-of-00004.gguf', | |
| ]; | |
| urls_qwen3_coder_next_q8 = [ | |
| 'https://huggingface.co/bartowski/Qwen_Qwen3-Coder-Next-GGUF/resolve/main/Qwen_Qwen3-Coder-Next-Q8_0/Qwen_Qwen3-Coder-Next-Q8_0-00001-of-00003.gguf', | |
| 'https://huggingface.co/bartowski/Qwen_Qwen3-Coder-Next-GGUF/resolve/main/Qwen_Qwen3-Coder-Next-Q8_0/Qwen_Qwen3-Coder-Next-Q8_0-00002-of-00003.gguf', | |
| 'https://huggingface.co/bartowski/Qwen_Qwen3-Coder-Next-GGUF/resolve/main/Qwen_Qwen3-Coder-Next-Q8_0/Qwen_Qwen3-Coder-Next-Q8_0-00003-of-00003.gguf', | |
| ]; | |
| urls_gpt_oss_12b = [ | |
| 'https://huggingface.co/ggml-org/gpt-oss-120b-GGUF/resolve/main/gpt-oss-120b-mxfp4-00001-of-00003.gguf', | |
| 'https://huggingface.co/ggml-org/gpt-oss-120b-GGUF/resolve/main/gpt-oss-120b-mxfp4-00002-of-00003.gguf', | |
| 'https://huggingface.co/ggml-org/gpt-oss-120b-GGUF/resolve/main/gpt-oss-120b-mxfp4-00003-of-00003.gguf' | |
| ]; | |
| urls_glm45_air_q4 = [ | |
| 'https://huggingface.co/unsloth/GLM-4.5-Air-GGUF/resolve/main/UD-Q4_K_XL/GLM-4.5-Air-UD-Q4_K_XL-00001-of-00002.gguf', | |
| 'https://huggingface.co/unsloth/GLM-4.5-Air-GGUF/resolve/main/UD-Q4_K_XL/GLM-4.5-Air-UD-Q4_K_XL-00002-of-00002.gguf', | |
| ]; | |
| urls_qwen35_122b_q4 = [ | |
| 'https://huggingface.co/unsloth/Qwen3.5-122B-A10B-GGUF/resolve/main/UD-Q4_K_XL/Qwen3.5-122B-A10B-UD-Q4_K_XL-00001-of-00003.gguf', | |
| 'https://huggingface.co/unsloth/Qwen3.5-122B-A10B-GGUF/resolve/main/UD-Q4_K_XL/Qwen3.5-122B-A10B-UD-Q4_K_XL-00002-of-00003.gguf', | |
| 'https://huggingface.co/unsloth/Qwen3.5-122B-A10B-GGUF/resolve/main/UD-Q4_K_XL/Qwen3.5-122B-A10B-UD-Q4_K_XL-00003-of-00003.gguf' | |
| ]; | |
| // changeme | |
| urls = urls_qwen35_122b_q4; | |
| const bin = (() => { | |
| const counts = {}; | |
| return { | |
| add(value) { | |
| const key = String(value); | |
| counts[key] = (counts[key] ?? 0) + 1; | |
| }, | |
| totals() { | |
| return { ...counts }; | |
| }, | |
| reset() { | |
| Object.keys(counts).forEach(k => delete counts[k]); | |
| } | |
| }; | |
| })(); | |
| for (let url of urls) { | |
| let { metadata, tensorInfos } = await gguf(url); | |
| for (let info of tensorInfos) { | |
| if (info.name.startsWith('blk.')) { | |
| bin.add(GGMLQuantizationType[info.dtype]) | |
| } | |
| } | |
| } | |
| console.log(JSON.stringify(bin.totals())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment