█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

LookAtMyQuant

एक quantization compiler जो bits को वहीं खर्च करता है जहाँ मॉडल को उनकी सबसे ज़्यादा ज़रूरत होती है

Quantization & Compressionओपन सोर्स
अपडेट किया गया
21 नव॰ 2026
भाषा
Python
लाइसेंस
MIT
कवरेज
1 story

नया क्या है

21 नव॰ 2026

Added Inkling 2 Mini support: 5.38 GB (1.63 bits per weight) and 8.87 GB (2.69 bits per weight) builds for Apple Silicon, with a drafter model for faster decoding.

ताज़ा खबरें

संक्षेप में

LookAtMyQuant क्या है?

LookAtMyQuant एक quantization compiler जो bits को वहीं खर्च करता है जहाँ मॉडल को उनकी सबसे ज़्यादा ज़रूरत होती है. यह Models & Inference टूल्स की Quantization & Compression श्रेणी में आता है; ओपन सोर्स है, Python में लिखा गया है और MIT लाइसेंस के तहत है। शुरू करने के लिए: apple Silicon runtime इंस्टॉल करें.

अपडेट किया गया Markdown वर्शन ↗

सारांश

LookAtMyQuant एक ओपन सोर्स quantization compiler है, जो भाषा मॉडलों (language models) के लिए बनाया गया है और इसे developer ShinMegamiBoson ने MIT लाइसेंस के तहत जारी किया है। पूरे मॉडल पर एक ही format लगाने के बजाय, यह मापता है कि मॉडल का हर संग्रहित हिस्सा (weight matrices, frequency-bucketed embedding rows और key-value caches) compress होने पर output को कितना नुकसान पहुँचाता है। फिर हर हिस्से के लिए एक compression code चुनता है, ताकि पूरा मॉडल कम से कम कुल नुकसान के साथ size या speed budget में फिट हो जाए।

इसकी pipeline में तीन चरण हैं। Measure एक बार में एक हिस्से को compress करता है, बाकी सब कुछ exact रखता है, और original मॉडल से KL divergence दर्ज करता है। Allocate हर हिस्से के लिए एक code चुनता है ताकि bits-per-weight budget के भीतर कुल summed KL कम से कम हो; इसके लिए GPU की ज़रूरत नहीं होती। Build एक-एक matrix करके मॉडल को उस plan के अनुसार quantize करता है और WikiText-2 पर perplexity और KL की रिपोर्ट देता है। Plans को llama.cpp GGUF में export किया जा सकता है, और प्रोजेक्ट के अपने packed formats custom Metal kernels और वैकल्पिक छोटे drafter मॉडलों (speculative decoding के लिए) के साथ एक MLX runtime के ज़रिए Apple Silicon पर चलते हैं।

Bar charts: LookAtMyQuant 2's 1.23 GB Qwen3.5-4B solves 330 of 540 math problems with KL 0.45, versus Bonsai 2 Ternary's 328 and 0.59
LookAtMyQuant 2 on Qwen3.5-4B: math problems solved and KL from the original, against Bonsai 2 Ternary 4B and smaller Qwen3.5 modelsLookAtMyQuant repository ↗

README के अनुसार, 7.2 GB का Qwen3.8-27B (2.1 bits per weight) 540 गणित प्रश्नों में से 401 हल करता है, जो original मॉडल के बराबर है। साथ ही, एक Gemma 4 E2B GGUF है जिसका KL उसी file size पर Q4_K_M से 12 गुना कम है। दूसरी recipe, LookAtMyQuant 2, trellis codes, मॉडल के अपने हल किए गए गणित समाधानों पर calibration और 4,000 steps की distillation जोड़ती है, और Qwen3.5-4B को 1.23 GB में पैक करती है। नवंबर 2026 में compiler को Thinking Machines के Inkling 2 Mini तक बढ़ाया गया, जिससे 5.38 GB और 8.87 GB के builds बने।

यह क्या करता है

  • हर हिस्से की संवेदनशीलता का मापन: हर weight matrix, embedding bucket और KV cache के लिए original मॉडल से KL divergence
  • Budget के अनुसार allocation: हर हिस्से के लिए एक compression code चुनता है ताकि bits-per-weight target में फिट हो, और इसके लिए GPU की ज़रूरत नहीं
  • Blocks और rows के लिए trellis codes, Fisher-information bit allocation और वैकल्पिक distillation pass (LookAtMyQuant 2)
  • Compile किए गए plans को llama.cpp GGUF में export करना
  • Apple Silicon के लिए MLX runtime और `lamq` CLI, custom Metal kernels के साथ, जो mlx_lm generate और stream_generate के साथ compatible है
  • Speculative decoding के लिए वैकल्पिक 4-bit drafter मॉडल, जिनसे math और code पर लगभग 2x तेज़ decode की रिपोर्ट है

शुरू करें

पैक किए गए मॉडल प्रोजेक्ट के MLX runtime के ज़रिए Apple Silicon पर चलते हैं। ये commands README से लिए गए हैं।

Apple Silicon runtime इंस्टॉल करें

GitHub से package इंस्टॉल करें। लोकल clone से, `pip install -e .` उसी `lamq` command को इंस्टॉल करता है।

bashbash
pip install git+https://github.com/ShinMegamiBoson/lookatmyquant.git

पैक किए गए मॉडल से generate करें

`lamq` को Hugging Face पर किसी पैक किए गए मॉडल की ओर इंगित करें। Decoding तेज़ करने के लिए एक drafter मॉडल जोड़ें, और throughput प्रिंट करने के लिए `--stats` लगाएँ।

bashbash
lamq generate shinmegamiboson/Inkling-2-Mini-LookAtMyQuant-5.4GB \
    --drafter shinmegamiboson/Inkling-2-Mini-LookAtMyQuant-drafter \
    -p "What is 17 times 23? Show the steps." --stats

Python से इस्तेमाल करें

Runtime का `load` एक model और tokenizer लौटाता है, जो mlx_lm के `generate` के साथ काम करते हैं।

pythonpython
from mlx_lm import generate
from runtime_mlx import load

model, tok = load("shinmegamiboson/Qwen3.8-27B-LookAtMyQuant-7.2GB")
prompt = tok.apply_chat_template(
    [{"role": "user", "content": "What is 17 times 23? Show the steps."}],
    add_generation_prompt=True,
    enable_thinking=False,
)
print(generate(model, tok, prompt, max_tokens=200))

अपना plan compile करें

Compiler quick start SmolLM2-360M पर sensitivity मापता है, 3.044-bit plan allocate करता है और उसे build करता है।

bashbash
pip install -r requirements.txt
python compiler.py measure --model HuggingFaceTB/SmolLM2-360M --part linear --layers 0-3 --out results/batch/my_measurements.json
python compiler.py allocate --sens 'results/batch/ccSens*.json' --target disk --items linear --bits 3.044 --out results/compiler/plans/my_plan.json
python quantize.py --program plan --model HuggingFaceTB/SmolLM2-360M --plan results/compiler/plans/my_plan.json --out results/my_run.json

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • Apple Silicon Mac पर Inkling 2 Mini को लगभग 6 GB active memory में चलाएँ
  • एक तय file size पर quantization recipes की KL divergence और task accuracy की तुलना करें
  • मापे गए sensitivity plan से llama.cpp के लिए size-budget वाला GGUF बनाएँ
  • छोटे drafter मॉडल से Apple Silicon पर local decoding तेज़ करें

How LookAtMyQuant compares

LookAtMyQuant alongside other open-source quantization & compression tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
BitNet★ 42.6kअपने CPU पर 1.58-bit क्वांटाइज़्ड LLM तेज़ी से चलाएं
bitsandbytes★ 8.6kPyTorch मॉडलों के लिए 8-bit और 4-bit quantization
LLM Compressor★ 4kvLLM के साथ तेज़ inference के लिए LLMs को क्वांटाइज़ और कंप्रेस करें
AWQ★ 3.7kLLM को कंप्रेस और तेज़ करने के लिए activation-aware 4-bit weight quantization
torchao★ 3kतेज़ ट्रेनिंग और inference के लिए PyTorch-native quantization और low-bit data types
Intel Neural Compressor★ 2.7kक्वांटाइज़ेशन, प्रूनिंग और डिस्टिलेशन की मदद से PyTorch, TensorFlow और JAX मॉडल को कंप्रेस करें
GPTQModel★ 1.3kकई चिप्स पर GPTQ, AWQ और अन्य तरीकों से LLM को क्वांटाइज़ करें
LookAtMyQuant★ 769एक quantization compiler जो bits को वहीं खर्च करता है जहाँ मॉडल को उनकी सबसे ज़्यादा ज़रूरत होती है