tico 0.3.0.dev261008__tar.gz → 0.3.0.dev261013__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/PKG-INFO +1 -1
- tico-0.3.0.dev261013/tico/_version.py +1 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/gemma4_gptq/quantizer.py +9 -20
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/gptq/quantizer.py +12 -16
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/gptq/utils.py +44 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/qwen3_vl_gptq/quantizer.py +9 -20
- tico-0.3.0.dev261013/tico/quantization/recipes/qparams.py +284 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/quantize_full_qmodel_with_gptq.py +5 -52
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/quantize_qwen3_vl_with_gptq.py +10 -22
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/quantize_with_gptq.py +5 -21
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico.egg-info/PKG-INFO +1 -1
- tico-0.3.0.dev261008/tico/_version.py +0 -1
- tico-0.3.0.dev261008/tico/quantization/recipes/qparams.py +0 -114
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/LICENSE +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/README.md +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/pyproject.toml +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/setup.cfg +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/_buffer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/_object.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/_schema.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/analysis/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/analysis/effects.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/analysis/purity.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/analysis/structural_hash.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/analysis/tensor_contract.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/builder.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/cli/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/cli/__main__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/cli/main.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/document.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/errors.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/export.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/graph.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/inspect/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/inspect/printer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/inspect/summary.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/io.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/mutation.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/operations/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/operations/extract.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/base.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/cleanup/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/cleanup/compact_indices.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/cleanup/dead_code_elimination.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/cleanup/graph_inputs.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/manager.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/_pattern_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/canonicalize/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/canonicalize/equivalent_ops.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/compatibility/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/compatibility/custom_ops.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/compatibility/fc_gelu_fc.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/cse.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fold/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fold/constant_subgraph.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fold/evaluators/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fold/evaluators/base.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fold/evaluators/elementwise.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fold/evaluators/heavy.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fold/evaluators/indexing.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fold/evaluators/shape.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fold/profiles.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fuse/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fuse/activation.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fuse/composite.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fuse/linear.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fuse/requantize.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/fuse/spatial.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/legalize/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/legalize/dynamic_fully_connected.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/policy.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/simplify/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/simplify/_layout_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/simplify/arithmetic.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/simplify/identity_ops.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/simplify/reductions.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/simplify/transpose_region.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/simplify/transpose_region_rules.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/optimization/simplify/views.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/presets.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/rules.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/passes/worklist.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/rewrite.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/errors.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/executor.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/kernels/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/kernels/base.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/kernels/elementwise.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/kernels/nn.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/kernels/quantize.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/kernels/reduction.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/kernels/shape_ops.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/program.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/runtime/quantization.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/selector.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/session.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/value/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/value/codec.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/value/dtype.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/value/tensor.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/circle/verify.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/config/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/config/base.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/config/factory.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/config/v1.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/experimental/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/interpreter/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/interpreter/backends.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/interpreter/infer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/interpreter/interpreter.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/ops/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/ops/concat.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/ops/resize_bilinear.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/ops/same_padding_conv2d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/cast_aten_where_arg_type.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/cast_clamp_mixed_type_args.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/cast_mixed_type_args.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/const_prop_pass.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/convert_conv1d_to_conv2d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/convert_conv3d_to_conv2d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/convert_expand_to_slice_cat.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/convert_gather_to_gather_nd.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/convert_layout_op_to_reshape.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/convert_matmul_to_linear.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/convert_repeat_to_expand_copy.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/convert_sym_size_to_circle_shape.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/convert_to_relu6.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/decompose_addmm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/decompose_batch_norm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/decompose_fake_quantize.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/decompose_fake_quantize_tensor_qparams.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/decompose_group_norm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/decompose_grouped_conv2d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/decompose_slice_scatter.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/eliminate_rank_round_trip_region.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/extract_dtype_kwargs.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/fill_meta_val.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/fuse_leading_unsqueeze_reshape.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/fuse_redundant_reshape_to_mean.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/legalize_causal_mask_value.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/legalize_predefined_layout_operators.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/lower_copy.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/lower_multi_index_to_gather_nd.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/lower_pow2_to_mul.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/lower_to_resize_nearest_neighbor.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/lower_to_slice.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/merge_consecutive_cat.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/ops.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/remove_empty_cat_inputs.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/remove_nop.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/remove_redundant_assert_nodes.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/remove_redundant_expand.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/remove_redundant_permute.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/remove_redundant_reshape.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/remove_redundant_slice.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/remove_redundant_to_copy.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/remove_unused_placeholder.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/restore_linear.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/passes/segment_index_select.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/pt2_to_circle.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/adaround/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/adaround/discrete_refinement.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/adaround/global_refinement.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/adaround/joint.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/adaround/joint_runner.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/adaround/rounding.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/adaround/runner.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/adaround/screened_refinement.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/block_reconstruction/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/block_reconstruction/cache.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/block_reconstruction/multistart.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/block_reconstruction/observer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/block_reconstruction/qdrop.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/block_reconstruction/runner.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/block_reconstruction/selection.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/cle/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/cle/cle.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/cle/quantizer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/fpi_gptq/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/fpi_gptq/fpi_gptq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/fpi_gptq/quantizer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/fpi_gptq/util.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/gemma4_gptq/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/gemma4_gptq/gptq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/gemma4_gptq/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/gptq/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/gptq/gptq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/gptq/quant.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/qwen3_vl_gptq/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/qwen3_vl_gptq/gptq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/qwen3_vl_gptq/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/smoothquant/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/smoothquant/observer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/smoothquant/quantizer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/smoothquant/smooth_quant.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/spinquant/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/spinquant/fuse_norm_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/spinquant/hadamard_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/spinquant/quantizer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/spinquant/qwen3_vl_model_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/spinquant/qwen3_vl_quantizer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/spinquant/qwen3_vl_rotation_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/spinquant/rotation_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/spinquant/spin_llama.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/spinquant/spin_qwen3_vl.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/universal_gptq/quantizer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/analysis/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/analysis/ablation.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/analysis/clipping.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/analysis/inputs.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/analysis/metrics.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/analysis/output_quantization.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/analysis/outputs.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/analysis/profile.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/analysis/report.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/analysis/selector.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/analysis/sensitivity.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/base.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/builders.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/cle.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/fpi_gptq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/gemma4_assistant_builders.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/gemma4_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/gemma4_builders.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/gemma4_gptq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/gptq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/llama_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/ptq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/qwen3_vl_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/qwen3_vl_gptq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/qwen3_vl_spinquant.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/smoothquant.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/specs.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/spinquant.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/config/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/backend.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/evaluate.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/executor/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/executor/backend_executor.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/executor/circle_executor.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/executor/triv24_executor.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/hellaswag_eval_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/llava_bench_judge_eval_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/lmms_eval_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/lmms_gemma4.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/lmms_tasks/videomme_mini/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/metric.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/mmlu_eval_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/mmmu_eval_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/optional_deps.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/script/llm_tasks_eval.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/script/mini_vqa_eval.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/evaluation/vlm_eval_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/examples/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/examples/compare_side_by_side.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/examples/configs/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/examples/evaluate.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/examples/export.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/examples/inspector.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/examples/quantize.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/passes/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/passes/concat_qparam.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/passes/fold_quant_ops.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/passes/insert_quantize_on_dtype_mismatch.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/passes/legalize_quantized_clamp.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/passes/propagate_qparam_backward.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/passes/propagate_qparam_forward.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/passes/qparam_safe_const_prop.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/passes/quantize_bias.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/passes/remove_weight_dequant_op.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/public_interface.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/quant_stub.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/quantizer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/quantizer_registry.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/adapters/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/adapters/base.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/adapters/gemma4.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/adapters/gemma4_assistant.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/adapters/llama.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/adapters/qwen3_vl.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/config.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/context.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/data/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/data/dataset_config.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/data/dataset_usage.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/data/llm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/data/vlm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/static_gemma4_assistant_runtime.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/static_gemma4_runtime.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/static_llama_runtime.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/static_qwen3_vl_runtime.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/tied_embedding.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/trace.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/case.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/cases/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4_assistant.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/cases/llama.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/cases/nn.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/cases/qwen3_vl.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/registry.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/result.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/runner.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/debug/wrapper_smoke/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/evaluation/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/evaluation/hellaswag.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/evaluation/llava_bench.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/evaluation/llava_bench_judge.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/evaluation/llm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/evaluation/mmlu.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/evaluation/mmmu.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/evaluation/selection.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/evaluation/video_mme.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/evaluation/vlm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/export/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/export/checkpoint.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/export/circle.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/export/gemma4.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/export/gemma4_assistant.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/export/llama.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/export/qwen3_vl.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/extensions.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/override_policies.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/runner.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/stages/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/stages/base.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/stages/cle.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/stages/gptq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/stages/ptq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/stages/smoothquant.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/stages/spinquant.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/recipes/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/control.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/dtypes.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/compare_ppl.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/debug_quant_outputs.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/evaluate_fk_llama_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/gemma4/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/gemma4/quantize_for_causal_lm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/gemma4/quantize_for_conditional_generation.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/gemma4/quantize_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/gemma4/quantize_multimodal_embedder.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/gemma4/quantize_text_scaled_word_embedding.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/gemma4/quantize_vision_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/gemma4/quantize_vision_patch_embedder.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/gemma4/quantize_vision_pooler.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/llama/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/llama/quantize_attention_decode.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/llama/quantize_attention_prefill.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_decode.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_prefill.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/llama/quantize_mlp.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/nn/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/nn/quantize_conv3d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/nn/quantize_conv3d_special_case.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/nn/quantize_layernorm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/nn/quantize_linear.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/nn/quantize_tied_embedding.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_for_conditional_generation.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_text_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_text_decoder_layer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_text_mlp.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_text_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_vision_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_vision_block.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_vision_mlp.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_vision_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_embed.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_merger.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/qwen/trace_qwen.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/static_llama_layer_runtime.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/mode.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/observers/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/observers/affine_base.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/observers/base.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/observers/ema.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/observers/identity.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/observers/minmax.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/observers/mx.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/observers/percentile.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/qscheme.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/quantizer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/utils/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/utils/check_missing_qparam.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/utils/introspection.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/utils/linear_folding.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/utils/metrics.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/utils/reduce_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/utils/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/utils/version.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrap_helper.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/fairseq/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/fairseq/decoder_export_single_step.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder_layer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder_layer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/fairseq/quant_mha.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/embedding_scale_fusion.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/export_adapters.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/ple_embedding_host.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_clippable_linear.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_for_causal_lm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_for_conditional_generation.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_multimodal_embedder.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_rmsnorm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_text_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_text_decoder_layer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_text_mlp.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_text_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_text_scaled_word_embedding.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder_layer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_mlp.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_patch_embedder.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_pooler.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/rope.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/static_vision_profile.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4/vision_split_export.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4_assistant/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4_assistant/export_adapters.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_backbone.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_for_causal_lm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_masked_embedder.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4_assistant/sparse_head.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4_assistant/static_inputs.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/gemma4_assistant/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/llama/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/llama/export_adapters.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/llama/quant_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/llama/quant_decoder_layer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/llama/quant_mlp.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/llama/quant_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/llama/quant_model_for_causal_lm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/nn/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/nn/quant_conv2d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/nn/quant_conv3d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/nn/quant_conv3d_decomposed.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/nn/quant_conv_transpose2d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/nn/quant_embedding.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/nn/quant_layernorm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/nn/quant_linear.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/nn/quant_maxpool2d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/nn/quant_prelu.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/nn/quant_silu.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/ops/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/ops/quant_concat.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/ops/quant_resize_bilinear.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/ops/quant_rmsnorm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/ops/quant_same_padding_conv2d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/ptq_wrapper.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/quant_elementwise.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/quant_module_base.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/quant_stub.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/export_adapters.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_for_conditional_generation.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_decoder_layer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_mlp.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_block.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_mlp.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_embed.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_merger.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/qwen_vl/vision_profile.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/wrappers/registry.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/circle_binary.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/circle_graph.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/circle_mapping.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/circle_serializer.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/adapters/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/adapters/llama_rmsnorm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/adapters/onert/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/adapters/onert/llama_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/hashable_opcode.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/node_visitor.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_abs.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_add.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_alias_copy.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_any.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_arange_start_step.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_argmax.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_attention.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_avg_pool2d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_bitwise_and.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_bmm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_cat.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_circle_gather_nd.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_circle_shape.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_clamp.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_clone.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_constant_pad_nd.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_conv2d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_cos.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_cumsum.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_depthwise_conv2d.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_dequantize_per_channel.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_dequantize_per_tensor.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_div.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_elu.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_embedding.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_eq.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_exp.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_expand.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_full.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_full_like.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_ge.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_gelu.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_gt.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_index.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_index_select.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_instance_norm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_le.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_leaky_relu.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_linear.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_log.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_log1p.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_logical_and.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_logical_not.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_lt.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_max_dim.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_max_pool2d_with_indices.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_maximum.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_mean.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_minimum.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_mm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_mul.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_ne.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_neg.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_permute.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_pow.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_prelu.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_quantize_per_tensor.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_reciprocal.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_relu.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_relu6.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_repeat.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_reshape.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_resize_bilinear.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_resize_nearest_neighbor.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_rmsnorm.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_round.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_rsqrt.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_scalar_tensor.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_select_copy.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_sigmoid.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_sin.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_slice.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_softmax.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_split_with_sizes.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_sqrt.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_squeeze.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_sub.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_sum.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_tanh.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_to_copy.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_transpose_conv.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_unsqueeze.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_view.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/op_where.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/operators/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/pack.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/serialize/quant_param.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/compat/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/compat/torch.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/compat/torch_version_policy.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/compat/transformers.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/convert.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/define.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/diff_graph.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/dtype.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/errors.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/graph.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/installed_packages.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/logging.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/model.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/mx/__init__.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/mx/dtypes.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/mx/elemwise_ops.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/mx/formats.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/mx/mx_ops.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/padding.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/passes.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/pytree_utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/record_input.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/register_custom_op.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/serialize.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/signature.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/trace_decorators.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/utils.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/validate_args_kwargs.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/utils/version.py +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico.egg-info/SOURCES.txt +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico.egg-info/dependency_links.txt +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico.egg-info/entry_points.txt +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico.egg-info/requires.txt +0 -0
- {tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.0.dev261013"
|
{tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/gemma4_gptq/quantizer.py
RENAMED
|
@@ -35,6 +35,7 @@ from tico.quantization.algorithm.gemma4_gptq.utils import (
|
|
|
35
35
|
should_quantize_text_stage,
|
|
36
36
|
should_quantize_vision_stage,
|
|
37
37
|
)
|
|
38
|
+
from tico.quantization.algorithm.gptq.utils import resolve_weight_bits
|
|
38
39
|
from tico.quantization.config.gemma4_gptq import Gemma4GPTQConfig
|
|
39
40
|
from tico.quantization.quantizer import BaseQuantizer
|
|
40
41
|
from tico.quantization.quantizer_registry import register_quantizer
|
|
@@ -104,27 +105,15 @@ class Gemma4GPTQQuantizer(BaseQuantizer):
|
|
|
104
105
|
"""
|
|
105
106
|
Resolve the effective bit-width for a quantized submodule.
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
2) Stage-local module name.
|
|
110
|
-
3) Full-name suffix.
|
|
108
|
+
Delegates to :func:`resolve_weight_bits`, which documents the
|
|
109
|
+
full name -> stage-local name -> suffix (last match) -> default policy.
|
|
111
110
|
"""
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
suffix_matches = [
|
|
119
|
-
bits
|
|
120
|
-
for pattern, bits in gptq_conf.weight_bits_overrides.items()
|
|
121
|
-
if full_module_name.endswith(f".{pattern}")
|
|
122
|
-
]
|
|
123
|
-
|
|
124
|
-
if suffix_matches:
|
|
125
|
-
return suffix_matches[-1]
|
|
126
|
-
|
|
127
|
-
return gptq_conf.weight_bits
|
|
111
|
+
return resolve_weight_bits(
|
|
112
|
+
default_bits=gptq_conf.weight_bits,
|
|
113
|
+
weight_bits_overrides=gptq_conf.weight_bits_overrides,
|
|
114
|
+
full_module_name=full_module_name,
|
|
115
|
+
local_module_name=local_module_name,
|
|
116
|
+
)
|
|
128
117
|
|
|
129
118
|
@torch.no_grad()
|
|
130
119
|
def prepare(
|
|
@@ -25,6 +25,7 @@ from tico.quantization.algorithm.gptq.utils import (
|
|
|
25
25
|
find_layers,
|
|
26
26
|
gather_single_batch_from_dict,
|
|
27
27
|
gather_single_batch_from_list,
|
|
28
|
+
resolve_weight_bits,
|
|
28
29
|
)
|
|
29
30
|
from tico.quantization.config.gptq import GPTQConfig
|
|
30
31
|
from tico.quantization.quantizer import BaseQuantizer
|
|
@@ -73,23 +74,18 @@ class GPTQQuantizer(BaseQuantizer):
|
|
|
73
74
|
full_module_name: str,
|
|
74
75
|
local_module_name: str,
|
|
75
76
|
) -> int:
|
|
76
|
-
"""
|
|
77
|
-
|
|
78
|
-
return gptq_conf.weight_bits_overrides[full_module_name]
|
|
79
|
-
|
|
80
|
-
if local_module_name in gptq_conf.weight_bits_overrides:
|
|
81
|
-
return gptq_conf.weight_bits_overrides[local_module_name]
|
|
82
|
-
|
|
83
|
-
suffix_matches = [
|
|
84
|
-
bits
|
|
85
|
-
for pattern, bits in gptq_conf.weight_bits_overrides.items()
|
|
86
|
-
if full_module_name.endswith(f".{pattern}")
|
|
87
|
-
]
|
|
88
|
-
|
|
89
|
-
if suffix_matches:
|
|
90
|
-
return suffix_matches[-1]
|
|
77
|
+
"""
|
|
78
|
+
Resolve the effective bit-width for a quantized submodule.
|
|
91
79
|
|
|
92
|
-
|
|
80
|
+
Delegates to :func:`resolve_weight_bits`, which documents the
|
|
81
|
+
full name -> local name -> suffix (last match) -> default policy.
|
|
82
|
+
"""
|
|
83
|
+
return resolve_weight_bits(
|
|
84
|
+
default_bits=gptq_conf.weight_bits,
|
|
85
|
+
weight_bits_overrides=gptq_conf.weight_bits_overrides,
|
|
86
|
+
full_module_name=full_module_name,
|
|
87
|
+
local_module_name=local_module_name,
|
|
88
|
+
)
|
|
93
89
|
|
|
94
90
|
@torch.no_grad()
|
|
95
91
|
def prepare(
|
|
@@ -13,10 +13,54 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
+
from typing import Mapping
|
|
17
|
+
|
|
16
18
|
import torch
|
|
17
19
|
import tqdm
|
|
18
20
|
|
|
19
21
|
|
|
22
|
+
def resolve_weight_bits(
|
|
23
|
+
*,
|
|
24
|
+
default_bits: int,
|
|
25
|
+
weight_bits_overrides: Mapping[str, int],
|
|
26
|
+
full_module_name: str,
|
|
27
|
+
local_module_name: str,
|
|
28
|
+
) -> int:
|
|
29
|
+
"""
|
|
30
|
+
Resolve the effective weight bit-width for one quantized submodule.
|
|
31
|
+
|
|
32
|
+
This is the single implementation of the ``weight_bits_overrides`` key
|
|
33
|
+
matching policy shared by the GPTQ-family quantizers. Keys are matched in
|
|
34
|
+
the following order and the first branch that yields a match wins:
|
|
35
|
+
|
|
36
|
+
1) ``full_module_name`` is a key (exact match).
|
|
37
|
+
2) ``local_module_name`` is a key (exact match).
|
|
38
|
+
3) ``full_module_name`` ends with ``"." + key`` (dot-delimited suffix).
|
|
39
|
+
When several keys match, the one iterated last in
|
|
40
|
+
``weight_bits_overrides`` order wins; pattern length is irrelevant.
|
|
41
|
+
4) Otherwise ``default_bits``.
|
|
42
|
+
|
|
43
|
+
Names and keys are compared as given; no normalization is applied and the
|
|
44
|
+
selected override value is returned unchanged. The mapping is not modified.
|
|
45
|
+
"""
|
|
46
|
+
if full_module_name in weight_bits_overrides:
|
|
47
|
+
return weight_bits_overrides[full_module_name]
|
|
48
|
+
|
|
49
|
+
if local_module_name in weight_bits_overrides:
|
|
50
|
+
return weight_bits_overrides[local_module_name]
|
|
51
|
+
|
|
52
|
+
suffix_matches = [
|
|
53
|
+
bits
|
|
54
|
+
for pattern, bits in weight_bits_overrides.items()
|
|
55
|
+
if full_module_name.endswith(f".{pattern}")
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
if suffix_matches:
|
|
59
|
+
return suffix_matches[-1]
|
|
60
|
+
|
|
61
|
+
return default_bits
|
|
62
|
+
|
|
63
|
+
|
|
20
64
|
def find_layers(module, layers=[torch.nn.Linear], name=""):
|
|
21
65
|
if type(module) in layers:
|
|
22
66
|
return {name: module}
|
{tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/algorithm/qwen3_vl_gptq/quantizer.py
RENAMED
|
@@ -27,6 +27,7 @@ import torch
|
|
|
27
27
|
import torch.nn as nn
|
|
28
28
|
from tqdm.auto import tqdm
|
|
29
29
|
|
|
30
|
+
from tico.quantization.algorithm.gptq.utils import resolve_weight_bits
|
|
30
31
|
from tico.quantization.algorithm.qwen3_vl_gptq.gptq import GPTQ
|
|
31
32
|
from tico.quantization.algorithm.qwen3_vl_gptq.utils import (
|
|
32
33
|
append_batch_to_cache,
|
|
@@ -166,27 +167,15 @@ class Qwen3VLGPTQQuantizer(BaseQuantizer):
|
|
|
166
167
|
"""
|
|
167
168
|
Resolve the effective bit-width for a quantized submodule.
|
|
168
169
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
2) Stage-local module name.
|
|
172
|
-
3) Full-name suffix.
|
|
170
|
+
Delegates to :func:`resolve_weight_bits`, which documents the
|
|
171
|
+
full name -> stage-local name -> suffix (last match) -> default policy.
|
|
173
172
|
"""
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
suffix_matches = [
|
|
181
|
-
bits
|
|
182
|
-
for pattern, bits in gptq_conf.weight_bits_overrides.items()
|
|
183
|
-
if full_module_name.endswith(f".{pattern}")
|
|
184
|
-
]
|
|
185
|
-
|
|
186
|
-
if suffix_matches:
|
|
187
|
-
return suffix_matches[-1]
|
|
188
|
-
|
|
189
|
-
return gptq_conf.weight_bits
|
|
173
|
+
return resolve_weight_bits(
|
|
174
|
+
default_bits=gptq_conf.weight_bits,
|
|
175
|
+
weight_bits_overrides=gptq_conf.weight_bits_overrides,
|
|
176
|
+
full_module_name=full_module_name,
|
|
177
|
+
local_module_name=local_module_name,
|
|
178
|
+
)
|
|
190
179
|
|
|
191
180
|
@torch.no_grad()
|
|
192
181
|
def prepare(
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
# Copyright (c) 2026 Samsung Electronics Co., Ltd. All Rights Reserved
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import math
|
|
16
|
+
from typing import Any
|
|
17
|
+
|
|
18
|
+
import torch
|
|
19
|
+
|
|
20
|
+
from tico.quantization.wrapq.dtypes import DType
|
|
21
|
+
from tico.quantization.wrapq.observers.affine_base import AffineObserverBase
|
|
22
|
+
from tico.quantization.wrapq.observers.base import ObserverBase
|
|
23
|
+
from tico.quantization.wrapq.qscheme import QScheme
|
|
24
|
+
from tico.quantization.wrapq.utils.linear_folding import (
|
|
25
|
+
reused_weight_qparam_scale_multiplier,
|
|
26
|
+
)
|
|
27
|
+
from tico.quantization.wrapq.wrappers.quant_module_base import QuantModuleBase
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def find_gptq_quantizers(
|
|
31
|
+
root: torch.nn.Module,
|
|
32
|
+
) -> tuple[torch.nn.Module | None, dict[str, Any] | None]:
|
|
33
|
+
"""Find GPTQ quantizers attached to a model or one of common wrapper owners."""
|
|
34
|
+
candidates: list[Any] = [root]
|
|
35
|
+
if hasattr(root, "wrapped"):
|
|
36
|
+
candidates.append(root.wrapped)
|
|
37
|
+
if hasattr(root.wrapped, "module"):
|
|
38
|
+
candidates.append(root.wrapped.module)
|
|
39
|
+
if hasattr(root.wrapped, "wrapped"):
|
|
40
|
+
candidates.append(root.wrapped.wrapped)
|
|
41
|
+
|
|
42
|
+
for owner in candidates:
|
|
43
|
+
quantizers = getattr(owner, "quantizers", None)
|
|
44
|
+
if isinstance(quantizers, dict):
|
|
45
|
+
return owner, quantizers
|
|
46
|
+
return None, None
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def _validated_gptq_qparams(
|
|
50
|
+
module: QuantModuleBase,
|
|
51
|
+
obs: ObserverBase,
|
|
52
|
+
quantizer: Any,
|
|
53
|
+
) -> tuple[AffineObserverBase, torch.Tensor, torch.Tensor]:
|
|
54
|
+
"""Validate standard per-tensor/per-output-channel GPTQ affine metadata.
|
|
55
|
+
|
|
56
|
+
GPTQ quantizers do not retain a complete grouped-quantization mapping, so
|
|
57
|
+
these checks do not establish compatibility for grouped GPTQ artifacts.
|
|
58
|
+
"""
|
|
59
|
+
maxq = getattr(quantizer, "maxq", None)
|
|
60
|
+
source = f"GPTQ maxq={maxq!r}"
|
|
61
|
+
dtype = getattr(obs, "dtype", None)
|
|
62
|
+
target = f"PTQ dtype={dtype!r}, observer={type(obs).__name__}"
|
|
63
|
+
|
|
64
|
+
def incompatible(reason: str) -> ValueError:
|
|
65
|
+
return ValueError(
|
|
66
|
+
f"Incompatible GPTQ -> PTQ weight qparams for {module.fp_name!r}: "
|
|
67
|
+
f"{source}; {target}. {reason}"
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
if not isinstance(obs, AffineObserverBase):
|
|
71
|
+
raise incompatible("GPTQ qparam reuse requires an affine weight observer.")
|
|
72
|
+
if (
|
|
73
|
+
not isinstance(dtype, DType)
|
|
74
|
+
or isinstance(dtype.bits, bool)
|
|
75
|
+
or not isinstance(dtype.bits, int)
|
|
76
|
+
or dtype.bits <= 0
|
|
77
|
+
or not isinstance(dtype.signed, bool)
|
|
78
|
+
):
|
|
79
|
+
raise incompatible("PTQ weight dtype must have a positive integer bit width.")
|
|
80
|
+
target = (
|
|
81
|
+
f"PTQ {dtype} range=[{dtype.qmin}, {dtype.qmax}], "
|
|
82
|
+
f"qscheme={obs.qscheme}, axis={obs.channel_axis}"
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
if isinstance(maxq, torch.Tensor):
|
|
86
|
+
if maxq.numel() != 1 or maxq.dtype == torch.bool or maxq.is_complex():
|
|
87
|
+
raise incompatible("GPTQ maxq must be a finite positive integer scalar.")
|
|
88
|
+
maxq = maxq.item()
|
|
89
|
+
if (
|
|
90
|
+
isinstance(maxq, bool)
|
|
91
|
+
or not isinstance(maxq, (int, float))
|
|
92
|
+
or not math.isfinite(maxq)
|
|
93
|
+
or maxq <= 0
|
|
94
|
+
or int(maxq) != maxq
|
|
95
|
+
):
|
|
96
|
+
raise incompatible("GPTQ maxq must be a finite positive integer scalar.")
|
|
97
|
+
maxq = int(maxq)
|
|
98
|
+
if maxq & (maxq + 1):
|
|
99
|
+
raise incompatible("GPTQ maxq must describe a full unsigned 2**bits - 1 range.")
|
|
100
|
+
source = f"GPTQ {maxq.bit_length()}-bit unsigned range=[0, {maxq}] (maxq={maxq})"
|
|
101
|
+
if dtype.signed or dtype.qmin != 0 or dtype.qmax != maxq:
|
|
102
|
+
raise incompatible(
|
|
103
|
+
"Weight bit width and integer range must match exactly; "
|
|
104
|
+
"qparam reuse does not convert bit widths or signedness."
|
|
105
|
+
)
|
|
106
|
+
if obs.qscheme not in {QScheme.PER_CHANNEL_ASYMM, QScheme.PER_TENSOR_ASYMM}:
|
|
107
|
+
raise incompatible("Unsigned PTQ weights require an asymmetric affine qscheme.")
|
|
108
|
+
|
|
109
|
+
perchannel = getattr(quantizer, "perchannel", None)
|
|
110
|
+
if not isinstance(perchannel, bool):
|
|
111
|
+
raise incompatible("GPTQ perchannel metadata must be a boolean.")
|
|
112
|
+
owner = getattr(module, "module", module)
|
|
113
|
+
if isinstance(owner, torch.nn.Linear):
|
|
114
|
+
source_channels, channel_axis = owner.out_features, 0
|
|
115
|
+
elif isinstance(owner, (torch.nn.Conv1d, torch.nn.Conv2d, torch.nn.Conv3d)):
|
|
116
|
+
source_channels, channel_axis = owner.out_channels, 0
|
|
117
|
+
elif isinstance(owner, torch.nn.ConvTranspose2d):
|
|
118
|
+
# GPTQ uses an output-major Conv2d view; PTQ observes the original weight.
|
|
119
|
+
source_channels, channel_axis = owner.out_channels, 1
|
|
120
|
+
else:
|
|
121
|
+
raise incompatible(
|
|
122
|
+
f"Cannot establish the GPTQ weight channel mapping for {type(owner).__name__}."
|
|
123
|
+
)
|
|
124
|
+
weight = owner.weight
|
|
125
|
+
if not isinstance(weight, torch.Tensor) or weight.ndim <= channel_axis:
|
|
126
|
+
raise incompatible("The wrapped weight has no valid output-channel dimension.")
|
|
127
|
+
|
|
128
|
+
scale = getattr(quantizer, "scale", None)
|
|
129
|
+
zero = getattr(quantizer, "zero", None)
|
|
130
|
+
for name, value in (("scale", scale), ("zero-point", zero)):
|
|
131
|
+
if (
|
|
132
|
+
not isinstance(value, torch.Tensor)
|
|
133
|
+
or value.numel() == 0
|
|
134
|
+
or value.is_complex()
|
|
135
|
+
or value.dtype == torch.bool
|
|
136
|
+
):
|
|
137
|
+
raise incompatible(f"GPTQ {name} must be a nonempty real tensor.")
|
|
138
|
+
valid_counts = {source_channels} if perchannel else {1, source_channels}
|
|
139
|
+
if value.numel() not in valid_counts or any(
|
|
140
|
+
dim != 1 for dim in value.shape[1:]
|
|
141
|
+
):
|
|
142
|
+
raise incompatible(
|
|
143
|
+
f"GPTQ {name} shape {tuple(value.shape)} does not map to "
|
|
144
|
+
f"{source_channels} output channels (perchannel={perchannel})."
|
|
145
|
+
)
|
|
146
|
+
if not bool(torch.isfinite(value).all().item()):
|
|
147
|
+
raise incompatible(f"GPTQ {name} must contain only finite values.")
|
|
148
|
+
assert isinstance(scale, torch.Tensor) and isinstance(zero, torch.Tensor)
|
|
149
|
+
if not scale.is_floating_point() or not bool((scale > 0).all().item()):
|
|
150
|
+
raise incompatible("GPTQ scales must be floating-point and strictly positive.")
|
|
151
|
+
if not bool(((zero >= 0) & (zero <= maxq)).all().item()) or (
|
|
152
|
+
zero.is_floating_point() and not bool((zero == zero.round()).all().item())
|
|
153
|
+
):
|
|
154
|
+
raise incompatible(
|
|
155
|
+
"GPTQ zero-points must be integral and within the shared range."
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
uniform = bool((scale == scale.reshape(-1)[0]).all().item()) and bool(
|
|
159
|
+
(zero == zero.reshape(-1)[0]).all().item()
|
|
160
|
+
)
|
|
161
|
+
if not perchannel and not uniform:
|
|
162
|
+
raise incompatible(
|
|
163
|
+
"GPTQ per-tensor metadata requires identical repeated qparams."
|
|
164
|
+
)
|
|
165
|
+
if obs.qscheme.is_per_channel():
|
|
166
|
+
if (
|
|
167
|
+
isinstance(obs.channel_axis, bool)
|
|
168
|
+
or not isinstance(obs.channel_axis, int)
|
|
169
|
+
or obs.channel_axis != channel_axis
|
|
170
|
+
):
|
|
171
|
+
raise incompatible(
|
|
172
|
+
f"PTQ weight channel axis must be {channel_axis} for {type(owner).__name__}."
|
|
173
|
+
)
|
|
174
|
+
if scale.dtype != torch.float32:
|
|
175
|
+
raise incompatible(
|
|
176
|
+
"PTQ per-channel fake quantization requires float32 scales."
|
|
177
|
+
)
|
|
178
|
+
target_channels = weight.shape[channel_axis]
|
|
179
|
+
if target_channels <= 0:
|
|
180
|
+
raise incompatible("PTQ weight output-channel dimension must be nonempty.")
|
|
181
|
+
if scale.numel() != target_channels or zero.numel() != target_channels:
|
|
182
|
+
if not uniform:
|
|
183
|
+
raise incompatible(
|
|
184
|
+
f"GPTQ qparams cannot map to {target_channels} PTQ weight channels."
|
|
185
|
+
)
|
|
186
|
+
scale = scale.reshape(-1)[0].expand(target_channels)
|
|
187
|
+
zero = zero.reshape(-1)[0].expand(target_channels)
|
|
188
|
+
else:
|
|
189
|
+
if obs.channel_axis is not None or not uniform:
|
|
190
|
+
raise incompatible(
|
|
191
|
+
"PTQ per-tensor weights require one identical GPTQ grid."
|
|
192
|
+
)
|
|
193
|
+
scale = scale.reshape(-1)[0]
|
|
194
|
+
zero = zero.reshape(-1)[0]
|
|
195
|
+
|
|
196
|
+
try:
|
|
197
|
+
scale_multiplier = reused_weight_qparam_scale_multiplier(module)
|
|
198
|
+
except (RuntimeError, TypeError, ValueError) as exc:
|
|
199
|
+
raise incompatible(str(exc)) from exc
|
|
200
|
+
if not math.isfinite(scale_multiplier) or scale_multiplier <= 0:
|
|
201
|
+
raise incompatible(
|
|
202
|
+
"Folded weight scale multiplier must be finite and positive."
|
|
203
|
+
)
|
|
204
|
+
if scale_multiplier != 1.0:
|
|
205
|
+
scale = scale * scale_multiplier
|
|
206
|
+
if not bool(torch.isfinite(scale).all().item()) or not bool(
|
|
207
|
+
(scale > 0).all().item()
|
|
208
|
+
):
|
|
209
|
+
raise incompatible(
|
|
210
|
+
"Folded GPTQ scales must remain finite and strictly positive."
|
|
211
|
+
)
|
|
212
|
+
return obs, scale, zero
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
def inject_gptq_qparams(
|
|
216
|
+
root: torch.nn.Module,
|
|
217
|
+
gptq_quantizers: dict[str, Any],
|
|
218
|
+
weight_obs_name: str = "weight",
|
|
219
|
+
*,
|
|
220
|
+
verbose: bool = False,
|
|
221
|
+
) -> dict[str, int]:
|
|
222
|
+
"""Validate every matched GPTQ grid, then inject and lock its PTQ qparams."""
|
|
223
|
+
seen: set[str] = set()
|
|
224
|
+
missed: list[str] = []
|
|
225
|
+
pending: list[tuple[AffineObserverBase, torch.Tensor, torch.Tensor]] = []
|
|
226
|
+
|
|
227
|
+
for module in root.modules():
|
|
228
|
+
if not isinstance(module, QuantModuleBase):
|
|
229
|
+
continue
|
|
230
|
+
if module.fp_name is None:
|
|
231
|
+
continue
|
|
232
|
+
|
|
233
|
+
obs = module.get_observer(weight_obs_name)
|
|
234
|
+
if obs is None:
|
|
235
|
+
continue
|
|
236
|
+
|
|
237
|
+
quantizer = gptq_quantizers.get(module.fp_name)
|
|
238
|
+
if quantizer is None:
|
|
239
|
+
missed.append(module.fp_name)
|
|
240
|
+
continue
|
|
241
|
+
|
|
242
|
+
pending.append(_validated_gptq_qparams(module, obs, quantizer))
|
|
243
|
+
seen.add(module.fp_name)
|
|
244
|
+
|
|
245
|
+
# A later invalid pair (including an unsupported fold) must not leave earlier
|
|
246
|
+
# observers locked with only part of the requested handoff applied.
|
|
247
|
+
for obs, scale, zero in pending:
|
|
248
|
+
obs.load_qparams(scale, zero, lock=True)
|
|
249
|
+
|
|
250
|
+
unused = set(gptq_quantizers.keys()) - seen
|
|
251
|
+
|
|
252
|
+
if verbose:
|
|
253
|
+
print("\n[GPTQ → PTQ injection summary]")
|
|
254
|
+
print(f" matched : {len(seen)}")
|
|
255
|
+
print(f" missed : {len(missed)}")
|
|
256
|
+
print(f" unused : {len(unused)}")
|
|
257
|
+
for title, items in [
|
|
258
|
+
("missed modules", missed),
|
|
259
|
+
("unused GPTQ entries", sorted(unused)),
|
|
260
|
+
]:
|
|
261
|
+
if not items:
|
|
262
|
+
continue
|
|
263
|
+
print(f"\n {title}:")
|
|
264
|
+
for name in list(items)[:10]:
|
|
265
|
+
print(f" - {name}")
|
|
266
|
+
if len(items) > 10:
|
|
267
|
+
print(f" ... and {len(items) - 10} more")
|
|
268
|
+
|
|
269
|
+
return {"matched": len(seen), "missed": len(missed), "unused": len(unused)}
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
def clear_gptq_quantizers(root: torch.nn.Module) -> None:
|
|
273
|
+
"""Drop attached GPTQ quantizer dictionaries after PTQ qparam injection."""
|
|
274
|
+
candidates: list[Any] = [root]
|
|
275
|
+
if hasattr(root, "wrapped"):
|
|
276
|
+
candidates.append(root.wrapped)
|
|
277
|
+
if hasattr(root.wrapped, "module"):
|
|
278
|
+
candidates.append(root.wrapped.module)
|
|
279
|
+
if hasattr(root.wrapped, "wrapped"):
|
|
280
|
+
candidates.append(root.wrapped.wrapped)
|
|
281
|
+
|
|
282
|
+
for owner in candidates:
|
|
283
|
+
if hasattr(owner, "quantizers"):
|
|
284
|
+
delattr(owner, "quantizers")
|
|
@@ -65,8 +65,10 @@ from tico.quantization.config.llama_attention import (
|
|
|
65
65
|
from tico.quantization.config.specs import affine
|
|
66
66
|
from tico.quantization.config.spinquant import SpinQuantConfig
|
|
67
67
|
from tico.quantization.evaluation.script.llm_tasks_eval import evaluate_llm_on_tasks
|
|
68
|
+
from tico.quantization.recipes.qparams import (
|
|
69
|
+
inject_gptq_qparams as _inject_gptq_qparams,
|
|
70
|
+
)
|
|
68
71
|
from tico.quantization.wrapq.dtypes import DType
|
|
69
|
-
from tico.quantization.wrapq.observers.affine_base import AffineObserverBase
|
|
70
72
|
from tico.quantization.wrapq.utils.metrics import perplexity
|
|
71
73
|
from tico.quantization.wrapq.wrappers.llama.export_adapters import (
|
|
72
74
|
LlamaLMHeadExportAdapter,
|
|
@@ -75,7 +77,6 @@ from tico.quantization.wrapq.wrappers.llama.export_adapters import (
|
|
|
75
77
|
make_token_embedding_example_input,
|
|
76
78
|
register_fake_quant_meta_kernels_for_dynamic_export,
|
|
77
79
|
)
|
|
78
|
-
from tico.quantization.wrapq.wrappers.quant_module_base import QuantModuleBase
|
|
79
80
|
|
|
80
81
|
from tico.utils.utils import SuppressWarning
|
|
81
82
|
|
|
@@ -354,56 +355,8 @@ def inject_gptq_qparams(
|
|
|
354
355
|
*,
|
|
355
356
|
verbose: bool = False,
|
|
356
357
|
):
|
|
357
|
-
"""
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
When verbose=True, prints a summary of matched / missed / unused entries.
|
|
361
|
-
"""
|
|
362
|
-
seen = set()
|
|
363
|
-
missed_modules = []
|
|
364
|
-
|
|
365
|
-
for m in root.modules():
|
|
366
|
-
if not isinstance(m, QuantModuleBase):
|
|
367
|
-
continue
|
|
368
|
-
if m.fp_name is None:
|
|
369
|
-
continue
|
|
370
|
-
|
|
371
|
-
quantizer = gptq_quantizers.get(m.fp_name)
|
|
372
|
-
obs = m.get_observer(weight_obs_name)
|
|
373
|
-
|
|
374
|
-
# Only care about modules that should have weight observers
|
|
375
|
-
if obs is None:
|
|
376
|
-
continue
|
|
377
|
-
|
|
378
|
-
if quantizer is None:
|
|
379
|
-
missed_modules.append(m.fp_name)
|
|
380
|
-
continue
|
|
381
|
-
|
|
382
|
-
assert isinstance(obs, AffineObserverBase)
|
|
383
|
-
obs.load_qparams(quantizer.scale, quantizer.zero, lock=True)
|
|
384
|
-
seen.add(m.fp_name)
|
|
385
|
-
|
|
386
|
-
unused = set(gptq_quantizers.keys()) - seen
|
|
387
|
-
|
|
388
|
-
if verbose:
|
|
389
|
-
print("\n[GPTQ → PTQ injection summary]")
|
|
390
|
-
print(f" matched : {len(seen)}")
|
|
391
|
-
print(f" missed : {len(missed_modules)}")
|
|
392
|
-
print(f" unused : {len(unused)}")
|
|
393
|
-
|
|
394
|
-
# Print samples (not all, to avoid spam)
|
|
395
|
-
def _print_sample(title, items):
|
|
396
|
-
items = list(items)
|
|
397
|
-
if not items:
|
|
398
|
-
return
|
|
399
|
-
print(f"\n {title}:")
|
|
400
|
-
for name in items[:10]:
|
|
401
|
-
print(f" - {name}")
|
|
402
|
-
if len(items) > 10:
|
|
403
|
-
print(f" ... and {len(items) - 10} more")
|
|
404
|
-
|
|
405
|
-
_print_sample("missed modules", missed_modules)
|
|
406
|
-
_print_sample("unused GPTQ entries", unused)
|
|
358
|
+
"""Validate and lock GPTQ qparams with the shared recipe handoff."""
|
|
359
|
+
_inject_gptq_qparams(root, gptq_quantizers, weight_obs_name, verbose=verbose)
|
|
407
360
|
|
|
408
361
|
|
|
409
362
|
# -------------------------------------------------------------------------
|
|
@@ -54,9 +54,10 @@ from tico.quantization.evaluation.vlm_eval_utils import (
|
|
|
54
54
|
get_mixed_calib_inputs,
|
|
55
55
|
)
|
|
56
56
|
from tico.quantization.recipes.data.dataset_usage import EVALUATION_ROLE
|
|
57
|
+
from tico.quantization.recipes.qparams import (
|
|
58
|
+
inject_gptq_qparams as _inject_gptq_qparams,
|
|
59
|
+
)
|
|
57
60
|
from tico.quantization.wrapq.dtypes import DType
|
|
58
|
-
from tico.quantization.wrapq.observers.affine_base import AffineObserverBase
|
|
59
|
-
from tico.quantization.wrapq.wrappers.quant_module_base import QuantModuleBase
|
|
60
61
|
|
|
61
62
|
DTYPE_MAP = {
|
|
62
63
|
"float32": torch.float32,
|
|
@@ -821,6 +822,11 @@ def build_qwen3_vl_gptq_config(
|
|
|
821
822
|
"""
|
|
822
823
|
weight_bits_overrides: dict[str, int] = {}
|
|
823
824
|
|
|
825
|
+
if args.gptq_vision:
|
|
826
|
+
weight_bits_overrides[
|
|
827
|
+
"model.visual.patch_embed.proj"
|
|
828
|
+
] = args.vision_patch_embed_weight_bits
|
|
829
|
+
|
|
824
830
|
if args.gptq_lm_head:
|
|
825
831
|
weight_bits_overrides["lm_head"] = args.lm_head_weight_bits
|
|
826
832
|
|
|
@@ -855,26 +861,8 @@ def inject_gptq_qparams(
|
|
|
855
861
|
gptq_quantizers: dict[str, Any], # {fp_name: quantizer}
|
|
856
862
|
weight_obs_name: str = "weight",
|
|
857
863
|
):
|
|
858
|
-
"""
|
|
859
|
-
|
|
860
|
-
locate the observer called `weight_obs_name` and overwrite its
|
|
861
|
-
(scale, zero-point), then lock them against further updates.
|
|
862
|
-
"""
|
|
863
|
-
for m in root.modules():
|
|
864
|
-
if not isinstance(m, QuantModuleBase):
|
|
865
|
-
continue
|
|
866
|
-
if m.fp_name is None:
|
|
867
|
-
continue
|
|
868
|
-
|
|
869
|
-
quantizer = gptq_quantizers.get(m.fp_name)
|
|
870
|
-
if quantizer is None:
|
|
871
|
-
continue
|
|
872
|
-
obs = m.get_observer(weight_obs_name)
|
|
873
|
-
if obs is None:
|
|
874
|
-
continue
|
|
875
|
-
assert isinstance(obs, AffineObserverBase)
|
|
876
|
-
# GPTQ quantizer attributes
|
|
877
|
-
obs.load_qparams(quantizer.scale, quantizer.zero, lock=True)
|
|
864
|
+
"""Validate and lock GPTQ qparams with the shared recipe handoff."""
|
|
865
|
+
_inject_gptq_qparams(root, gptq_quantizers, weight_obs_name)
|
|
878
866
|
|
|
879
867
|
|
|
880
868
|
def quantize_using_PTQ(
|
{tico-0.3.0.dev261008 → tico-0.3.0.dev261013}/tico/quantization/wrapq/examples/quantize_with_gptq.py
RENAMED
|
@@ -36,11 +36,12 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
36
36
|
from tico.quantization import convert, prepare
|
|
37
37
|
from tico.quantization.config.gptq import GPTQConfig
|
|
38
38
|
from tico.quantization.config.ptq import PTQConfig
|
|
39
|
-
from tico.quantization.
|
|
39
|
+
from tico.quantization.recipes.qparams import (
|
|
40
|
+
inject_gptq_qparams as _inject_gptq_qparams,
|
|
41
|
+
)
|
|
40
42
|
from tico.quantization.wrapq.utils.introspection import build_fqn_map
|
|
41
43
|
from tico.quantization.wrapq.utils.metrics import perplexity
|
|
42
44
|
from tico.quantization.wrapq.wrappers.ptq_wrapper import PTQWrapper
|
|
43
|
-
from tico.quantization.wrapq.wrappers.quant_module_base import QuantModuleBase
|
|
44
45
|
|
|
45
46
|
# Token-budget presets for activation calibration
|
|
46
47
|
TOKENS: dict[str, int] = {
|
|
@@ -74,25 +75,8 @@ def inject_gptq_qparams(
|
|
|
74
75
|
gptq_quantizers: dict[str, Any], # {fp_name: quantizer}
|
|
75
76
|
weight_obs_name: str = "weight",
|
|
76
77
|
):
|
|
77
|
-
"""
|
|
78
|
-
|
|
79
|
-
locate the observer called `weight_obs_name` and overwrite its
|
|
80
|
-
(scale, zero-point), then lock them against further updates.
|
|
81
|
-
"""
|
|
82
|
-
for m in root.modules():
|
|
83
|
-
if not isinstance(m, QuantModuleBase):
|
|
84
|
-
continue
|
|
85
|
-
if m.fp_name is None:
|
|
86
|
-
continue
|
|
87
|
-
quantizer = gptq_quantizers.get(m.fp_name)
|
|
88
|
-
if quantizer is None:
|
|
89
|
-
continue
|
|
90
|
-
obs = m.get_observer(weight_obs_name)
|
|
91
|
-
if obs is None:
|
|
92
|
-
continue
|
|
93
|
-
assert isinstance(obs, AffineObserverBase)
|
|
94
|
-
# GPTQ quantizer attributes
|
|
95
|
-
obs.load_qparams(quantizer.scale, quantizer.zero, lock=True)
|
|
78
|
+
"""Validate and lock GPTQ qparams with the shared recipe handoff."""
|
|
79
|
+
_inject_gptq_qparams(root, gptq_quantizers, weight_obs_name)
|
|
96
80
|
|
|
97
81
|
|
|
98
82
|
def main():
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.3.0.dev261008"
|