BitLens
An open-source neural network quantization analysis tool that completes per-layer quantization sensitivity analysis with a single calibration pass. It identifies vulnerable layers using SQNR, the Omega outlier ratio, and excess kurtosis, and provides memory planning and a mixed-precision solver, with support for exporting quantization configurations for major frameworks.
Timeline (last 90 days)
BitLens is an open-source project that completes per-layer quantization sensitivity analysis with a single calibration and exports quantization configurations for mainstream frameworks.
BitLens wraps PyTorch nn.Module or ONNX computation graphs via hooks, collecting 128-bin histograms each for weights (symmetric per-channel) and activations (asymmetric per-tensor).
The blocks.11.attn.qkv layer of ViT-Tiny has an INT8 SQNR of only 18.8 dB and an INT4 SQNR of only 7.4 dB.
BitLens uses the outlier ratio Omega (Ω=absmax/p99.9) and excess kurtosis as key metrics to identify quantization-fragile layers.
BitLens's topology-peak SRAM planner computes tensor live ranges along residual branches, finds the peak activation memory watermark, and overlays static Flash weight occupancy.
BitLens's greedy Pareto auto-fitting solver progressively lowers precision from FP32 to FP16, INT8 and INT4 layer by layer according to target hardware budgets (such as STM32H7, ESP32-S3, Cortex-M55, Raspberry Pi Zero 2W), each time choosing the downgrade that minimizes the SQNR lost per byte saved, and allows users to lock specific layers.
BitLens supports generating standalone quantization scripts for PyTorch torchao (Int8DynamicActivationInt4WeightConfig, Int8WeightOnlyConfig).
BitLens supports generating quantize_static with nodes_to_exclude for ONNX Runtime.
BitLens supports generating the accompanying C arena header files for TFLite Micro.
Users can test the preset MobileNetV3-Small, ResNet-18 and ViT-Tiny configurations directly in the browser Studio without installation; they can also use the local Python CLI to process their own .pt or .onnx checkpoints and then drag the generated .bitlens.json back into the Studio for visualization.
1 more timeline events
All Facts (11)
BitLens is an open-source project that completes per-layer quantization sensitivity analysis with a single calibration and exports quantization configurations for mainstream frameworks.
50%UnverifiedBitLens wraps PyTorch nn.Module or ONNX computation graphs via hooks, collecting 128-bin histograms each for weights (symmetric per-channel) and activations (asymmetric per-tensor).
50%UnverifiedThe blocks.11.attn.qkv layer of ViT-Tiny has an INT8 SQNR of only 18.8 dB and an INT4 SQNR of only 7.4 dB.
50%UnverifiedBitLens uses the outlier ratio Omega (Ω=absmax/p99.9) and excess kurtosis as key metrics to identify quantization-fragile layers.
50%UnverifiedBitLens's topology-peak SRAM planner computes tensor live ranges along residual branches, finds the peak activation memory watermark, and overlays static Flash weight occupancy.
50%UnverifiedBitLens's greedy Pareto auto-fitting solver progressively lowers precision from FP32 to FP16, INT8 and INT4 layer by layer according to target hardware budgets (such as STM32H7, ESP32-S3, Cortex-M55, Raspberry Pi Zero 2W), each time choosing the downgrade that minimizes the SQNR lost per byte saved, and allows users to lock specific layers.
50%UnverifiedBitLens supports generating standalone quantization scripts for PyTorch torchao (Int8DynamicActivationInt4WeightConfig, Int8WeightOnlyConfig).
50%UnverifiedBitLens supports generating quantize_static with nodes_to_exclude for ONNX Runtime.
50%UnverifiedBitLens supports generating the accompanying C arena header files for TFLite Micro.
50%UnverifiedUsers can test the preset MobileNetV3-Small, ResNet-18 and ViT-Tiny configurations directly in the browser Studio without installation; they can also use the local Python CLI to process their own .pt or .onnx checkpoints and then drag the generated .bitlens.json back into the Studio for visualization.
50%UnverifiedBitLens currently focuses on PTQ scenarios and depends on the representativeness of calibration data; the Omega and kurtosis metrics can efficiently flag fragile layers but cannot replace end-to-end accuracy validation.
50%