tico 0.4.0.dev261026__tar.gz → 0.4.0.dev261027__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.
Potentially problematic release.
This version of tico might be problematic. Click here for more details.
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/PKG-INFO +1 -1
- tico-0.4.0.dev261027/tico/_version.py +1 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/kernels/elementwise.py +23 -2
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/quantization.py +9 -2
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/decompose_group_norm.py +50 -16
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/fold_quant_ops.py +12 -89
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/remove_weight_dequant_op.py +4 -17
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/adapters/gemma4.py +3 -1
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/adapters/gemma4_assistant.py +4 -1
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/adapters/llama.py +6 -3
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/adapters/qwen3_vl.py +4 -1
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/config.py +12 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/trace.py +7 -1
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/runner.py +4 -2
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/stages/__init__.py +2 -1
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/stages/ptq.py +2 -1
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/observers/affine_base.py +15 -10
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/observers/percentile.py +3 -11
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrap_helper.py +9 -6
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/llama/position.py +17 -3
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/llama/quant_attention.py +2 -1
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/llama/quant_decoder_layer.py +3 -2
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/llama/quant_model.py +2 -1
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_repeat.py +3 -3
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico.egg-info/PKG-INFO +1 -1
- tico-0.4.0.dev261026/tico/_version.py +0 -1
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/LICENSE +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/README.md +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/pyproject.toml +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/setup.cfg +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/_buffer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/_object.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/_schema.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/analysis/effects.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/analysis/purity.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/analysis/structural_hash.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/analysis/tensor_contract.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/builder.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/cli/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/cli/__main__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/cli/main.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/document.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/errors.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/export.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/graph.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/inspect/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/inspect/printer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/inspect/summary.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/io.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/mutation.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/operations/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/operations/extract.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/base.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/cleanup/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/cleanup/compact_indices.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/cleanup/dead_code_elimination.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/cleanup/graph_inputs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/manager.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/_pattern_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/canonicalize/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/canonicalize/equivalent_ops.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/compatibility/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/compatibility/custom_ops.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/compatibility/fc_gelu_fc.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/cse.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fold/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fold/constant_subgraph.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fold/evaluators/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fold/evaluators/base.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fold/evaluators/elementwise.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fold/evaluators/heavy.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fold/evaluators/indexing.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fold/evaluators/shape.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fold/profiles.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fuse/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fuse/activation.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fuse/composite.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fuse/linear.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fuse/requantize.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/fuse/spatial.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/legalize/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/legalize/dynamic_fully_connected.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/policy.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/simplify/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/simplify/_layout_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/simplify/arithmetic.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/simplify/identity_ops.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/simplify/reductions.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/simplify/transpose_region.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/simplify/transpose_region_rules.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/optimization/simplify/views.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/presets.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/rules.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/passes/worklist.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/rewrite.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/errors.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/executor.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/kernels/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/kernels/base.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/kernels/nn.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/kernels/quantize.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/kernels/reduction.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/kernels/shape_ops.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/runtime/program.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/selector.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/session.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/value/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/value/codec.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/value/dtype.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/value/tensor.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/circle/verify.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/config/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/config/base.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/config/factory.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/config/v1.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/experimental/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/interpreter/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/interpreter/backends.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/interpreter/infer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/interpreter/interpreter.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/ops/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/ops/concat.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/ops/resize_bilinear.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/ops/same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/cast_aten_where_arg_type.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/cast_clamp_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/cast_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/const_prop_pass.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/convert_conv1d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/convert_conv3d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/convert_expand_to_slice_cat.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/convert_gather_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/convert_layout_op_to_reshape.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/convert_matmul_to_linear.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/convert_repeat_to_expand_copy.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/convert_sym_size_to_circle_shape.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/convert_to_relu6.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/decompose_addmm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/decompose_batch_norm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/decompose_fake_quantize.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/decompose_fake_quantize_tensor_qparams.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/decompose_grouped_conv2d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/decompose_slice_scatter.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/eliminate_rank_round_trip_region.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/extract_dtype_kwargs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/fill_meta_val.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/fuse_leading_unsqueeze_reshape.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/fuse_redundant_reshape_to_mean.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/legalize_causal_mask_value.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/legalize_predefined_layout_operators.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/lower_copy.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/lower_multi_index_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/lower_pow2_to_mul.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/lower_to_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/lower_to_slice.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/merge_consecutive_cat.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/ops.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/remove_empty_cat_inputs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/remove_nop.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/remove_redundant_assert_nodes.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/remove_redundant_expand.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/remove_redundant_permute.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/remove_redundant_reshape.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/remove_redundant_slice.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/remove_redundant_to_copy.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/remove_unused_placeholder.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/restore_linear.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/passes/segment_index_select.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/pt2_to_circle.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/adaround/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/adaround/discrete_refinement.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/adaround/global_refinement.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/adaround/joint.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/adaround/joint_runner.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/adaround/rounding.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/adaround/runner.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/adaround/screened_refinement.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/block_reconstruction/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/block_reconstruction/cache.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/block_reconstruction/multistart.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/block_reconstruction/observer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/block_reconstruction/qdrop.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/block_reconstruction/runner.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/block_reconstruction/selection.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/cle/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/cle/cle.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/cle/quantizer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/fpi_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/fpi_gptq/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/fpi_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/fpi_gptq/util.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/gemma4_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/gemma4_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/gemma4_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/gemma4_gptq/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/gptq/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/gptq/gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/gptq/quant.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/gptq/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/qwen3_vl_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/qwen3_vl_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/qwen3_vl_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/qwen3_vl_gptq/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/smoothquant/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/smoothquant/observer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/smoothquant/quantizer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/smoothquant/smooth_quant.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/spinquant/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/spinquant/fuse_norm_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/spinquant/hadamard_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/spinquant/quantizer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/spinquant/qwen3_vl_model_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/spinquant/qwen3_vl_quantizer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/spinquant/qwen3_vl_rotation_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/spinquant/rotation_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/spinquant/spin_llama.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/spinquant/spin_qwen3_vl.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/algorithm/universal_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/analysis/ablation.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/analysis/clipping.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/analysis/inputs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/analysis/metrics.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/analysis/output_quantization.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/analysis/outputs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/analysis/profile.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/analysis/report.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/analysis/selector.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/analysis/sensitivity.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/base.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/builders.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/cle.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/gemma4_assistant_builders.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/gemma4_attention.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/gemma4_builders.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/gemma4_gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/llama_attention.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/ptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/qwen3_vl_attention.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/qwen3_vl_gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/qwen3_vl_spinquant.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/smoothquant.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/specs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/spinquant.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/config/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/backend.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/evaluate.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/executor/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/executor/backend_executor.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/executor/circle_executor.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/executor/triv24_executor.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/hellaswag_eval_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/llava_bench_judge_eval_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/lmms_eval_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/lmms_gemma4.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/lmms_tasks/videomme_mini/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/metric.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/mmlu_eval_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/mmmu_eval_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/optional_deps.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/script/llm_tasks_eval.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/script/mini_vqa_eval.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/vlm_eval_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/evaluation/vlm_generation_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/examples/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/examples/compare_side_by_side.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/examples/configs/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/examples/evaluate.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/examples/export.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/examples/generate.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/examples/inspector.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/examples/quantize.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/concat_qparam.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/insert_quantize_on_dtype_mismatch.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/legalize_quantized_clamp.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/mx_qparam.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/propagate_qparam_backward.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/propagate_qparam_forward.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/qparam_safe_const_prop.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/quantize_bias.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/public_interface.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/quant_stub.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/quantizer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/quantizer_registry.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/adapters/base.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/context.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/data/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/data/dataset_config.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/data/dataset_usage.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/data/llm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/data/vlm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/cpu_fixtures.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/cpu_static_cache.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/cpu_validation.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/export_regression.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/static_gemma4_assistant_runtime.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/static_gemma4_runtime.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/static_llama_runtime.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/static_qwen3_vl_runtime.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/tied_embedding.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/token_mask.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/verify_llama_rope.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/case.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/cases/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/cases/llama.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/cases/nn.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/cases/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/registry.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/result.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/runner.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/debug/wrapper_smoke/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/evaluation/eager.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/evaluation/hellaswag.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/evaluation/llava_bench.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/evaluation/llava_bench_judge.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/evaluation/llm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/evaluation/mmlu.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/evaluation/mmmu.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/evaluation/selection.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/evaluation/video_mme.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/evaluation/vlm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/export/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/export/checkpoint.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/export/circle.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/export/gemma4.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/export/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/export/llama.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/export/llama_bundle.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/export/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/extensions.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/override_policies.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/qparams.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/runtime/llama.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/sequence_length.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/stages/base.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/stages/cle.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/stages/gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/stages/smoothquant.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/stages/spinquant.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/control.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/dtypes.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/compare_ppl.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/debug_quant_outputs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/evaluate_fk_llama_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/gemma4/quantize_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/gemma4/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/gemma4/quantize_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/gemma4/quantize_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/gemma4/quantize_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/gemma4/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/gemma4/quantize_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/gemma4/quantize_vision_pooler.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/llama/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/llama/quantize_attention_decode.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/llama/quantize_attention_prefill.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_decode.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_prefill.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/llama/quantize_mlp.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/nn/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/nn/quantize_conv3d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/nn/quantize_conv3d_special_case.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/nn/quantize_layernorm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/nn/quantize_linear.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/nn/quantize_tied_embedding.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/quantize_full_qmodel_with_gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/quantize_qwen3_vl_with_gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/quantize_with_gptq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_text_attention.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_text_mlp.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_text_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_vision_attention.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_vision_block.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_vision_mlp.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/qwen/trace_qwen.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/examples/static_llama_layer_runtime.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/mode.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/observers/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/observers/base.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/observers/ema.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/observers/identity.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/observers/minmax.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/observers/mx.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/qscheme.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/quantizer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/utils/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/utils/check_missing_qparam.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/utils/introspection.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/utils/linear_folding.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/utils/metrics.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/utils/reduce_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/utils/static_export.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/utils/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/utils/version.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/fairseq/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/fairseq/decoder_export_single_step.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder_layer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder_layer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/fairseq/quant_mha.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/embedding_scale_fusion.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/export_adapters.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/ple_embedding_host.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_clippable_linear.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_text_attention.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_text_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder_layer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_pooler.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/rope.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/static_vision_profile.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4/vision_split_export.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4_assistant/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4_assistant/export_adapters.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_backbone.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_masked_embedder.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4_assistant/sparse_head.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4_assistant/static_inputs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/gemma4_assistant/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/llama/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/llama/export_adapters.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/llama/quant_mlp.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/llama/quant_model_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/llama/static_inputs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/nn/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/nn/quant_conv2d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/nn/quant_conv3d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/nn/quant_conv3d_decomposed.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/nn/quant_conv_transpose2d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/nn/quant_embedding.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/nn/quant_layernorm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/nn/quant_linear.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/nn/quant_maxpool2d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/nn/quant_prelu.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/nn/quant_silu.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/ops/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/ops/quant_concat.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/ops/quant_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/ops/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/ops/quant_same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/ptq_wrapper.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/quant_elementwise.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/quant_module_base.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/quant_stub.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/export_adapters.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_attention.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_block.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/static_inputs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/qwen_vl/vision_profile.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/wrappers/registry.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/circle_binary.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/circle_graph.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/circle_mapping.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/circle_serializer.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/adapters/llama_rmsnorm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/adapters/onert/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/adapters/onert/llama_attention.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/hashable_opcode.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/node_visitor.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_abs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_add.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_alias_copy.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_any.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_arange_start_step.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_argmax.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_attention.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_avg_pool2d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_bitwise_and.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_bmm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_cat.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_circle_gather_nd.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_circle_shape.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_clamp.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_clone.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_constant_pad_nd.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_conv2d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_cos.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_cumsum.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_depthwise_conv2d.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_dequantize_per_channel.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_dequantize_per_tensor.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_div.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_elu.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_embedding.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_eq.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_exp.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_expand.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_full.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_full_like.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_ge.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_gelu.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_gt.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_index.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_index_select.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_instance_norm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_le.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_leaky_relu.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_linear.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_log.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_log1p.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_logical_and.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_logical_not.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_lt.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_max_dim.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_max_pool2d_with_indices.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_maximum.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_mean.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_minimum.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_mm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_mul.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_ne.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_neg.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_permute.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_pow.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_prelu.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_quantize_per_tensor.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_reciprocal.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_relu.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_relu6.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_reshape.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_rmsnorm.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_round.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_rsqrt.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_scalar_tensor.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_select_copy.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_sigmoid.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_sin.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_slice.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_softmax.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_split_with_sizes.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_sqrt.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_squeeze.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_sub.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_sum.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_tanh.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_to_copy.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_transpose_conv.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_unsqueeze.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_view.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/op_where.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/operators/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/pack.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/serialize/quant_param.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/compat/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/compat/torch.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/compat/torch_version_policy.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/compat/transformers.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/convert.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/define.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/diff_graph.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/dtype.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/errors.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/graph.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/installed_packages.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/logging.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/model.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/mx/__init__.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/mx/dtypes.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/mx/elemwise_ops.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/mx/formats.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/mx/mx_ops.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/padding.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/passes.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/pytree_utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/record_input.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/register_custom_op.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/serialize.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/signature.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/trace_decorators.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/utils.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/validate_args_kwargs.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/utils/version.py +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico.egg-info/SOURCES.txt +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico.egg-info/dependency_links.txt +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico.egg-info/entry_points.txt +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico.egg-info/requires.txt +0 -0
- {tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.0.dev261027"
|
|
@@ -57,8 +57,29 @@ def _divide(lhs: np.ndarray, rhs: np.ndarray) -> np.ndarray:
|
|
|
57
57
|
|
|
58
58
|
if lhs.dtype.kind == "f":
|
|
59
59
|
return np.divide(lhs, rhs)
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
left, right = np.broadcast_arrays(lhs, rhs)
|
|
61
|
+
valid = right != 0
|
|
62
|
+
if lhs.dtype.kind == "i":
|
|
63
|
+
valid &= ~((left == np.iinfo(lhs.dtype).min) & (right == -1))
|
|
64
|
+
|
|
65
|
+
if np.all(valid):
|
|
66
|
+
quotient = np.empty_like(left)
|
|
67
|
+
else:
|
|
68
|
+
# Preserve the existing exceptional casts in their original array
|
|
69
|
+
# shape/layout; casting a compressed subset can change NaN results.
|
|
70
|
+
quotient = np.asarray(
|
|
71
|
+
np.trunc(np.divide(lhs.astype(np.float64), rhs.astype(np.float64))).astype(
|
|
72
|
+
lhs.dtype
|
|
73
|
+
)
|
|
74
|
+
)
|
|
75
|
+
remainder = np.zeros_like(left)
|
|
76
|
+
np.divmod(left, right, out=(quotient, remainder), where=valid)
|
|
77
|
+
if lhs.dtype.kind == "i":
|
|
78
|
+
# Integer divmod rounds down. Only negative, non-integral quotients
|
|
79
|
+
# need one step toward zero; this also avoids abs(INT_MIN) overflow.
|
|
80
|
+
correct = valid & ((left < 0) != (right < 0)) & (remainder != 0)
|
|
81
|
+
quotient[correct] += 1
|
|
82
|
+
return quotient
|
|
62
83
|
|
|
63
84
|
|
|
64
85
|
def _pow(ctx: KernelContext) -> tuple[np.ndarray, ...]:
|
|
@@ -136,8 +136,15 @@ def quantize_array(value: np.ndarray, tensor: RuntimeTensor) -> np.ndarray:
|
|
|
136
136
|
with np.errstate(all="ignore"):
|
|
137
137
|
scaled = round_half_away_from_zero(value.astype(np.float32) / scale)
|
|
138
138
|
scaled = scaled + zero_point
|
|
139
|
-
clipped = np.clip(scaled, minimum, maximum)
|
|
140
|
-
|
|
139
|
+
clipped = np.asarray(np.clip(scaled, minimum, maximum))
|
|
140
|
+
# FLOAT32 rounds wide integer maxima past the storage range. Keep the full
|
|
141
|
+
# clip/cast layout for NaNs, but cast saturated elements as zero before
|
|
142
|
+
# assigning the exact integer endpoint.
|
|
143
|
+
at_maximum = scaled >= maximum
|
|
144
|
+
clipped[at_maximum] = 0
|
|
145
|
+
result = clipped.astype(tensor.dtype)
|
|
146
|
+
result[at_maximum] = maximum
|
|
147
|
+
return result
|
|
141
148
|
|
|
142
149
|
|
|
143
150
|
def fake_quantize_array(value: np.ndarray, tensor: RuntimeTensor) -> np.ndarray:
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import math
|
|
16
16
|
import operator
|
|
17
|
-
from typing import TYPE_CHECKING
|
|
17
|
+
from typing import Any, cast, TYPE_CHECKING
|
|
18
18
|
|
|
19
19
|
if TYPE_CHECKING:
|
|
20
20
|
import torch.fx
|
|
@@ -22,6 +22,7 @@ import torch
|
|
|
22
22
|
from torch.export import ExportedProgram
|
|
23
23
|
|
|
24
24
|
from tico.serialize.circle_mapping import extract_shape
|
|
25
|
+
from tico.utils.errors import NotYetSupportedError
|
|
25
26
|
from tico.utils.graph import create_node
|
|
26
27
|
from tico.utils.passes import PassBase, PassResult
|
|
27
28
|
from tico.utils.trace_decorators import trace_graph_diff_on_pass
|
|
@@ -36,6 +37,10 @@ class DecomposeGroupNorm(PassBase):
|
|
|
36
37
|
|
|
37
38
|
LayerNorm is group=1 Group normalization.
|
|
38
39
|
|
|
40
|
+
Only the normalized tensor (tuple index 0, also spelled -3) is supported.
|
|
41
|
+
Validate all live tuple uses before rewriting any normalization. Unused
|
|
42
|
+
statistics may be discarded; live mean/rstd or direct tuple uses are rejected.
|
|
43
|
+
|
|
39
44
|
[LayerNorm, GroupNorm]
|
|
40
45
|
|
|
41
46
|
Two normalzations result in same nodes but have different normalization shapes.
|
|
@@ -129,8 +134,17 @@ class DecomposeGroupNorm(PassBase):
|
|
|
129
134
|
graph: torch.fx.Graph = gm.graph
|
|
130
135
|
modified = False
|
|
131
136
|
|
|
137
|
+
# Match FX dead-code liveness without removing nodes before validation.
|
|
138
|
+
# This includes dependencies of side-effectful nodes as well as outputs.
|
|
139
|
+
graph.lint()
|
|
140
|
+
live_nodes: set[torch.fx.Node] = set()
|
|
141
|
+
for node in reversed(graph.nodes):
|
|
142
|
+
if node.is_impure() or any(user in live_nodes for user in node.users):
|
|
143
|
+
live_nodes.add(node)
|
|
144
|
+
|
|
145
|
+
normalized_outputs: dict[torch.fx.Node, list[torch.fx.Node]] = {}
|
|
132
146
|
for node in graph.nodes:
|
|
133
|
-
if not is_target_node(
|
|
147
|
+
if node not in live_nodes or not is_target_node(
|
|
134
148
|
node,
|
|
135
149
|
[
|
|
136
150
|
torch.ops.aten.native_layer_norm.default,
|
|
@@ -139,8 +153,31 @@ class DecomposeGroupNorm(PassBase):
|
|
|
139
153
|
):
|
|
140
154
|
continue
|
|
141
155
|
|
|
156
|
+
normalized_outputs[node] = []
|
|
157
|
+
for user in node.users:
|
|
158
|
+
if user not in live_nodes:
|
|
159
|
+
continue
|
|
160
|
+
if not (
|
|
161
|
+
user.op == "call_function"
|
|
162
|
+
and user.target == operator.getitem
|
|
163
|
+
and len(user.args) == 2
|
|
164
|
+
and user.args[0] is node
|
|
165
|
+
and isinstance(user.args[1], int)
|
|
166
|
+
and user.args[1] in (0, -3)
|
|
167
|
+
and not user.kwargs
|
|
168
|
+
):
|
|
169
|
+
raise NotYetSupportedError(
|
|
170
|
+
f"{node.target}: only normalized output (index 0 or -3) "
|
|
171
|
+
"is supported; mean/rstd outputs and direct tuple uses "
|
|
172
|
+
"are not supported."
|
|
173
|
+
)
|
|
174
|
+
normalized_outputs[node].append(user)
|
|
175
|
+
|
|
176
|
+
for node, get_items in normalized_outputs.items():
|
|
142
177
|
if node.target == torch.ops.aten.native_layer_norm.default:
|
|
143
|
-
ln_args = NativeLayerNormArgs(
|
|
178
|
+
ln_args = NativeLayerNormArgs(
|
|
179
|
+
*cast(Any, node.args), **cast(Any, node.kwargs)
|
|
180
|
+
)
|
|
144
181
|
x = ln_args.input
|
|
145
182
|
normalized_shape = ln_args.normalized_shape
|
|
146
183
|
weight = ln_args.weight
|
|
@@ -165,7 +202,9 @@ class DecomposeGroupNorm(PassBase):
|
|
|
165
202
|
norm_size = math.prod(normalized_shape)
|
|
166
203
|
layer_size = math.prod(x_shape[:idx_normalize_start])
|
|
167
204
|
elif node.target == torch.ops.aten.native_group_norm.default:
|
|
168
|
-
gn_args = NativeGroupNormArgs(
|
|
205
|
+
gn_args = NativeGroupNormArgs(
|
|
206
|
+
*cast(Any, node.args), **cast(Any, node.kwargs)
|
|
207
|
+
)
|
|
169
208
|
x = gn_args.input
|
|
170
209
|
weight = gn_args.weight
|
|
171
210
|
bias = gn_args.bias
|
|
@@ -251,21 +290,16 @@ class DecomposeGroupNorm(PassBase):
|
|
|
251
290
|
# Reset last node's meta for propagating replacing node's meta.
|
|
252
291
|
layer_norm.meta = {}
|
|
253
292
|
|
|
254
|
-
#
|
|
255
|
-
#
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
assert (
|
|
261
|
-
get_item.target == operator.getitem
|
|
262
|
-
), "First user of native_group/layer_norm should be getitem"
|
|
263
|
-
|
|
264
|
-
get_item.replace_all_uses_with(layer_norm, propagate_meta=True)
|
|
293
|
+
# Every selected user denotes the same normalized tensor. Copy
|
|
294
|
+
# its metadata once, then rewire all users regardless of order.
|
|
295
|
+
for index, get_item in enumerate(get_items):
|
|
296
|
+
get_item.replace_all_uses_with(
|
|
297
|
+
layer_norm, propagate_meta=index == 0
|
|
298
|
+
)
|
|
265
299
|
|
|
266
300
|
modified = True
|
|
267
301
|
|
|
268
|
-
gm.graph.eliminate_dead_code()
|
|
302
|
+
modified |= gm.graph.eliminate_dead_code()
|
|
269
303
|
gm.graph.lint()
|
|
270
304
|
gm.recompile()
|
|
271
305
|
|
|
@@ -26,7 +26,6 @@ from torch.export import ExportedProgram
|
|
|
26
26
|
from tico.quantization.passes.mx_qparam import remap_mx_qparam
|
|
27
27
|
from tico.serialize.quant_param import QPARAM_KEY, QuantParam
|
|
28
28
|
from tico.utils import logging
|
|
29
|
-
from tico.utils.errors import NotYetSupportedError
|
|
30
29
|
from tico.utils.mx.dtypes import (
|
|
31
30
|
assert_supported_mx_export_options,
|
|
32
31
|
is_mx_dtype,
|
|
@@ -36,7 +35,7 @@ from tico.utils.mx.dtypes import (
|
|
|
36
35
|
)
|
|
37
36
|
from tico.utils.passes import PassBase, PassResult
|
|
38
37
|
from tico.utils.trace_decorators import trace_graph_diff_on_pass
|
|
39
|
-
from tico.utils.utils import get_quant_dtype
|
|
38
|
+
from tico.utils.utils import get_quant_dtype
|
|
40
39
|
from tico.utils.validate_args_kwargs import (
|
|
41
40
|
DequantizePerTensorArgs,
|
|
42
41
|
QuantizePerTensorArgs,
|
|
@@ -51,59 +50,6 @@ _QPARAM_PRESERVING_VIEW_TARGETS = frozenset(
|
|
|
51
50
|
}
|
|
52
51
|
)
|
|
53
52
|
|
|
54
|
-
# Weight-DQ removal must also preserve the inputs of a producer whose original
|
|
55
|
-
# floating-point result is still observed outside its explicit Quantize branch.
|
|
56
|
-
_PRESERVE_FLOAT_INPUTS_KEY = "_tico_preserve_float_quantization_inputs"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def _restore_float_inputs(graph: torch.fx.Graph) -> None:
|
|
60
|
-
"""Bridge folded affine inputs back to protected producers' float domains."""
|
|
61
|
-
for node in list(graph.nodes):
|
|
62
|
-
if not node.meta.get(_PRESERVE_FLOAT_INPUTS_KEY):
|
|
63
|
-
continue
|
|
64
|
-
for source in list(node.all_input_nodes):
|
|
65
|
-
qparam = source.meta.get(QPARAM_KEY)
|
|
66
|
-
if qparam is None:
|
|
67
|
-
continue
|
|
68
|
-
if (
|
|
69
|
-
qparam.quantized_dimension is not None
|
|
70
|
-
or qparam.scale is None
|
|
71
|
-
or len(qparam.scale) != 1
|
|
72
|
-
or qparam.zero_point is None
|
|
73
|
-
or len(qparam.zero_point) != 1
|
|
74
|
-
or is_mx_dtype(qparam.dtype)
|
|
75
|
-
):
|
|
76
|
-
raise NotYetSupportedError(
|
|
77
|
-
"A shared floating-point producer requires per-tensor affine "
|
|
78
|
-
f"Dequantize inputs; {source.name} has unsupported qparams."
|
|
79
|
-
)
|
|
80
|
-
quant_min, quant_max = quant_min_max(qparam.dtype)
|
|
81
|
-
storage_dtype = (
|
|
82
|
-
torch.uint8
|
|
83
|
-
if qparam.dtype == "uint4"
|
|
84
|
-
else (
|
|
85
|
-
torch.int8
|
|
86
|
-
if qparam.dtype == "int4"
|
|
87
|
-
else getattr(torch, qparam.dtype)
|
|
88
|
-
)
|
|
89
|
-
)
|
|
90
|
-
with graph.inserting_before(node):
|
|
91
|
-
dequantize = graph.call_function(
|
|
92
|
-
torch.ops.quantized_decomposed.dequantize_per_tensor.default,
|
|
93
|
-
args=(
|
|
94
|
-
source,
|
|
95
|
-
qparam.scale[0],
|
|
96
|
-
qparam.zero_point[0],
|
|
97
|
-
quant_min,
|
|
98
|
-
quant_max,
|
|
99
|
-
storage_dtype,
|
|
100
|
-
),
|
|
101
|
-
)
|
|
102
|
-
dequantize.meta = copy.copy(source.meta)
|
|
103
|
-
dequantize.meta.pop(QPARAM_KEY)
|
|
104
|
-
dequantize.meta["val"] = source.meta["val"].to(dtype=torch.float32)
|
|
105
|
-
node.replace_input_with(source, dequantize)
|
|
106
|
-
|
|
107
53
|
|
|
108
54
|
def _inherit_qparam_from_view_chain(node: torch.fx.Node) -> bool:
|
|
109
55
|
"""Seed a view chain with its source's affine or remapped MX domain.
|
|
@@ -253,20 +199,14 @@ def _fold_mx_qdq(dq: torch.fx.Node) -> None:
|
|
|
253
199
|
qparam = _mx_qparam_from_quant_node(q)
|
|
254
200
|
existing = op.meta.get(QPARAM_KEY)
|
|
255
201
|
if existing is None:
|
|
256
|
-
#
|
|
257
|
-
#
|
|
202
|
+
# Without a proven source domain, an MX layout output cannot adopt
|
|
203
|
+
# qparams safely: its input may use different shared-exponent groups.
|
|
258
204
|
layout_output = op.target in _QPARAM_PRESERVING_VIEW_TARGETS or op.target in {
|
|
259
205
|
torch.ops.aten.cat.default,
|
|
260
206
|
torch.ops.aten.constant_pad_nd.default,
|
|
261
207
|
operator.getitem,
|
|
262
208
|
}
|
|
263
|
-
if
|
|
264
|
-
layout_output
|
|
265
|
-
or op.target == torch.ops.aten.embedding.default
|
|
266
|
-
or any(user is not q for user in op.users)
|
|
267
|
-
):
|
|
268
|
-
if not layout_output:
|
|
269
|
-
op.meta[_PRESERVE_FLOAT_INPUTS_KEY] = True
|
|
209
|
+
if layout_output:
|
|
270
210
|
q.meta[QPARAM_KEY] = qparam
|
|
271
211
|
dq.replace_all_uses_with(q, propagate_meta=False)
|
|
272
212
|
else:
|
|
@@ -293,7 +233,7 @@ class FoldQuantOps(PassBase):
|
|
|
293
233
|
────────────────────────────────────────────────────────────────
|
|
294
234
|
BEFORE AFTER
|
|
295
235
|
────────────────────────────────────────────────────────────────
|
|
296
|
-
op
|
|
236
|
+
op ─ Q ─ DQ ─ … op(meta[QPARAM])
|
|
297
237
|
|
|
298
238
|
op ─ Q1 ─ DQ1 ─ Q2 ─ DQ2 op(meta[QPARAM]) ─ Q2
|
|
299
239
|
▲ ▲
|
|
@@ -320,19 +260,14 @@ class FoldQuantOps(PassBase):
|
|
|
320
260
|
Any Quantize that became orphaned because *all* its DQs were folded
|
|
321
261
|
is deleted automatically.
|
|
322
262
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
dequantized so the lookup preserves FLOAT32 values before that Quantize.
|
|
327
|
-
|
|
328
|
-
Also keep Q when the unquantized producer has other users: folding it into
|
|
329
|
-
that producer would round those users' values too. Preserve that producer's
|
|
330
|
-
float inputs with explicit Dequantize bridges after the remaining folds.
|
|
263
|
+
The first Q-DQ annotates a tensor domain, including embedding outputs and
|
|
264
|
+
shared producers. FX value dtypes are intermediate metadata, not the final
|
|
265
|
+
quantized Circle ABI; no float input bridges are needed for these folds.
|
|
331
266
|
|
|
332
267
|
Discover an existing source domain through slices, views, and same-domain
|
|
333
268
|
concatenations before deciding whether a trailing Q is a requantization.
|
|
334
|
-
|
|
335
|
-
|
|
269
|
+
MX keeps an explicit Q after a layout without a proven source domain,
|
|
270
|
+
since shared-exponent grouping must be validated before propagation.
|
|
336
271
|
"""
|
|
337
272
|
|
|
338
273
|
def __init__(self):
|
|
@@ -380,17 +315,6 @@ class FoldQuantOps(PassBase):
|
|
|
380
315
|
qparam.scale = [q_args.scale]
|
|
381
316
|
qparam.zero_point = [q_args.zero_p]
|
|
382
317
|
qparam.dtype = get_quant_dtype(q_args.quant_min, q_args.quant_max)
|
|
383
|
-
if op.target == torch.ops.aten.embedding.default or any(
|
|
384
|
-
user is not q for user in op.users
|
|
385
|
-
):
|
|
386
|
-
if op.target not in _QPARAM_PRESERVING_VIEW_TARGETS:
|
|
387
|
-
op.meta[_PRESERVE_FLOAT_INPUTS_KEY] = True
|
|
388
|
-
q.meta[QPARAM_KEY] = qparam
|
|
389
|
-
dq.replace_all_uses_with(q, propagate_meta=False)
|
|
390
|
-
logger.debug(
|
|
391
|
-
f"{dq.name} is folded; {q.name} preserves its branch output grid."
|
|
392
|
-
)
|
|
393
|
-
continue
|
|
394
318
|
op.meta[QPARAM_KEY] = qparam
|
|
395
319
|
|
|
396
320
|
dq.replace_all_uses_with(op, propagate_meta=False)
|
|
@@ -398,8 +322,8 @@ class FoldQuantOps(PassBase):
|
|
|
398
322
|
logger.debug(f"{q.name} and {dq.name} are folded to {op.name}.")
|
|
399
323
|
# ───────────────────────────────────────────
|
|
400
324
|
# Case 2: op already quantized
|
|
401
|
-
# 2.1 same
|
|
402
|
-
# 2.2
|
|
325
|
+
# 2.1 same domain → remove redundant Q-DQ
|
|
326
|
+
# 2.2 different domain → keep Q as requantization
|
|
403
327
|
# ───────────────────────────────────────────
|
|
404
328
|
else:
|
|
405
329
|
op_qparam: QuantParam = op.meta[QPARAM_KEY]
|
|
@@ -428,7 +352,6 @@ class FoldQuantOps(PassBase):
|
|
|
428
352
|
dq.replace_all_uses_with(op, propagate_meta=False)
|
|
429
353
|
logger.debug(f"Removed redundant {dq.name}")
|
|
430
354
|
|
|
431
|
-
_restore_float_inputs(graph)
|
|
432
355
|
graph.eliminate_dead_code()
|
|
433
356
|
graph.lint()
|
|
434
357
|
graph_module.recompile()
|
{tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/passes/remove_weight_dequant_op.py
RENAMED
|
@@ -26,7 +26,6 @@ from torch._export.utils import (
|
|
|
26
26
|
from torch._subclasses.fake_tensor import FakeTensor
|
|
27
27
|
from torch.export import ExportedProgram
|
|
28
28
|
|
|
29
|
-
from tico.quantization.passes.fold_quant_ops import _PRESERVE_FLOAT_INPUTS_KEY
|
|
30
29
|
from tico.serialize.quant_param import QPARAM_KEY, QuantParam, to_qparam_dtype
|
|
31
30
|
from tico.utils import logging
|
|
32
31
|
from tico.utils.passes import PassBase, PassResult
|
|
@@ -226,10 +225,8 @@ class RemoveWeightDequantOp(PassBase):
|
|
|
226
225
|
node attaches quantization metadata to the weight, and later dequantize
|
|
227
226
|
nodes are removed after verifying that their quantization parameters match.
|
|
228
227
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
apply an independently calibrated activation grid. Other users can still
|
|
232
|
-
consume the same annotated integer weight without the Dequantize.
|
|
228
|
+
Weight and activation qparams describe independent tensor domains, including
|
|
229
|
+
the table and output of an embedding/GATHER.
|
|
233
230
|
|
|
234
231
|
NOTE Removing a DQ causes a semantic change: f32 -> quantized.
|
|
235
232
|
|
|
@@ -287,18 +284,8 @@ class RemoveWeightDequantOp(PassBase):
|
|
|
287
284
|
else:
|
|
288
285
|
q_weight.meta[QPARAM_KEY] = quant_param
|
|
289
286
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
user.op == "call_function"
|
|
293
|
-
and QPARAM_KEY not in user.meta
|
|
294
|
-
and (
|
|
295
|
-
user.target == torch.ops.aten.embedding.default
|
|
296
|
-
or user.meta.get(_PRESERVE_FLOAT_INPUTS_KEY)
|
|
297
|
-
)
|
|
298
|
-
):
|
|
299
|
-
continue
|
|
300
|
-
user.replace_input_with(dq, q_weight)
|
|
301
|
-
logger.debug(f"{dq.name} is removed from eligible weight consumers.")
|
|
287
|
+
dq.replace_all_uses_with(q_weight, propagate_meta=False)
|
|
288
|
+
logger.debug(f"{dq.name} is removed.")
|
|
302
289
|
|
|
303
290
|
graph.eliminate_dead_code()
|
|
304
291
|
graph.lint()
|
|
@@ -24,6 +24,7 @@ from tico.quantization import convert, prepare
|
|
|
24
24
|
from tico.quantization.config.gemma4_builders import build_gemma4_e2b_ptq_config
|
|
25
25
|
from tico.quantization.config.gemma4_gptq import Gemma4GPTQConfig
|
|
26
26
|
from tico.quantization.recipes.adapters.base import ModelAdapter
|
|
27
|
+
from tico.quantization.recipes.config import stage_name_matches
|
|
27
28
|
from tico.quantization.recipes.context import RecipeContext
|
|
28
29
|
from tico.quantization.recipes.data.vlm import build_vlm_calibration_inputs
|
|
29
30
|
from tico.quantization.recipes.evaluation.eager import prepare_eager_evaluation
|
|
@@ -333,7 +334,8 @@ class Gemma4Adapter(ModelAdapter):
|
|
|
333
334
|
stages = [
|
|
334
335
|
stage
|
|
335
336
|
for stage in ctx.cfg.get("pipeline", [])
|
|
336
|
-
if stage.get("name")
|
|
337
|
+
if stage_name_matches(stage.get("name"), "ptq")
|
|
338
|
+
and stage.get("enabled", True)
|
|
337
339
|
]
|
|
338
340
|
if len(stages) > 1:
|
|
339
341
|
counts = {
|
{tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/adapters/gemma4_assistant.py
RENAMED
|
@@ -26,6 +26,7 @@ from tico.quantization.config.gemma4_assistant_builders import (
|
|
|
26
26
|
build_gemma4_assistant_ptq_config,
|
|
27
27
|
)
|
|
28
28
|
from tico.quantization.recipes.adapters.base import ModelAdapter
|
|
29
|
+
from tico.quantization.recipes.config import stage_name_matches
|
|
29
30
|
from tico.quantization.recipes.context import RecipeContext
|
|
30
31
|
from tico.quantization.recipes.data.llm import build_wikitext_calibration_inputs
|
|
31
32
|
from tico.quantization.recipes.export.checkpoint import save_checkpoint
|
|
@@ -528,7 +529,9 @@ class Gemma4AssistantAdapter(ModelAdapter):
|
|
|
528
529
|
def _quantization_profile(cfg: Mapping[str, Any]) -> dict[str, Any]:
|
|
529
530
|
"""Summarize the effective PTQ dtypes for the manifest."""
|
|
530
531
|
for stage_cfg in cfg.get("pipeline", []):
|
|
531
|
-
if isinstance(stage_cfg, Mapping) and
|
|
532
|
+
if isinstance(stage_cfg, Mapping) and stage_name_matches(
|
|
533
|
+
stage_cfg.get("name"), "ptq"
|
|
534
|
+
):
|
|
532
535
|
keys = (
|
|
533
536
|
"activation",
|
|
534
537
|
"weight",
|
|
@@ -21,6 +21,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
21
21
|
|
|
22
22
|
from tico.quantization.config.builders import build_llm_ptq_config
|
|
23
23
|
from tico.quantization.recipes.adapters.base import ModelAdapter
|
|
24
|
+
from tico.quantization.recipes.config import stage_name_matches
|
|
24
25
|
from tico.quantization.recipes.context import RecipeContext
|
|
25
26
|
from tico.quantization.recipes.data.llm import build_wikitext_calibration_inputs
|
|
26
27
|
from tico.quantization.recipes.evaluation.eager import prepare_eager_evaluation
|
|
@@ -158,7 +159,9 @@ class LlamaAdapter(ModelAdapter):
|
|
|
158
159
|
for stage in cfg.get("pipeline", []):
|
|
159
160
|
if not isinstance(stage, Mapping):
|
|
160
161
|
continue
|
|
161
|
-
if stage.get("name")
|
|
162
|
+
if stage_name_matches(stage.get("name"), "ptq") and stage.get(
|
|
163
|
+
"enabled", True
|
|
164
|
+
):
|
|
162
165
|
return int(stage.get("decode_calibration_steps", decode_steps))
|
|
163
166
|
|
|
164
167
|
return decode_steps
|
|
@@ -465,7 +468,7 @@ class LlamaAdapter(ModelAdapter):
|
|
|
465
468
|
|
|
466
469
|
def _find_ptq_profile(cfg: dict[str, Any]) -> str:
|
|
467
470
|
for stage in cfg.get("pipeline", []):
|
|
468
|
-
if stage.get("name")
|
|
471
|
+
if stage_name_matches(stage.get("name"), "ptq"):
|
|
469
472
|
return str(
|
|
470
473
|
stage.get(
|
|
471
474
|
"profile", cfg.get("model_args", {}).get("profile", "npu_export")
|
|
@@ -476,6 +479,6 @@ def _find_ptq_profile(cfg: dict[str, Any]) -> str:
|
|
|
476
479
|
|
|
477
480
|
def _is_stage_enabled(cfg: dict[str, Any], stage_name: str) -> bool:
|
|
478
481
|
for stage in cfg.get("pipeline", []):
|
|
479
|
-
if stage.get("name")
|
|
482
|
+
if stage_name_matches(stage.get("name"), stage_name):
|
|
480
483
|
return bool(stage.get("enabled", True))
|
|
481
484
|
return False
|
{tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/recipes/adapters/qwen3_vl.py
RENAMED
|
@@ -24,6 +24,7 @@ from tico.quantization.config.builders import build_qwen3_vl_ptq_config
|
|
|
24
24
|
from tico.quantization.config.qwen3_vl_gptq import Qwen3VLGPTQConfig
|
|
25
25
|
from tico.quantization.config.qwen3_vl_spinquant import Qwen3VLSpinQuantConfig
|
|
26
26
|
from tico.quantization.recipes.adapters.base import ModelAdapter
|
|
27
|
+
from tico.quantization.recipes.config import stage_name_matches
|
|
27
28
|
from tico.quantization.recipes.context import RecipeContext
|
|
28
29
|
from tico.quantization.recipes.data.vlm import build_vlm_calibration_inputs
|
|
29
30
|
from tico.quantization.recipes.evaluation.eager import prepare_eager_evaluation
|
|
@@ -736,6 +737,8 @@ def _load_torch_object(path: str | None) -> Any:
|
|
|
736
737
|
|
|
737
738
|
def _find_stage(cfg: dict[str, Any], stage_name: str) -> Mapping[str, Any] | None:
|
|
738
739
|
for stage in cfg.get("pipeline", []):
|
|
739
|
-
if isinstance(stage, Mapping) and
|
|
740
|
+
if isinstance(stage, Mapping) and stage_name_matches(
|
|
741
|
+
stage.get("name"), stage_name
|
|
742
|
+
):
|
|
740
743
|
return stage
|
|
741
744
|
return None
|
|
@@ -27,6 +27,18 @@ except ImportError: # pragma: no cover
|
|
|
27
27
|
Config = dict[str, Any]
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
def normalize_stage_name(name: str) -> str:
|
|
31
|
+
"""Return the case-insensitive identity accepted by stage dispatch."""
|
|
32
|
+
return name.lower()
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def stage_name_matches(value: Any, name: str) -> bool:
|
|
36
|
+
"""Match a config stage name without changing the config or trimming it."""
|
|
37
|
+
return isinstance(value, str) and normalize_stage_name(
|
|
38
|
+
value
|
|
39
|
+
) == normalize_stage_name(name)
|
|
40
|
+
|
|
41
|
+
|
|
30
42
|
def load_recipe_config(
|
|
31
43
|
path: str | Path, overrides: Sequence[str] | None = None
|
|
32
44
|
) -> Config:
|
|
@@ -25,6 +25,7 @@ from tqdm import tqdm
|
|
|
25
25
|
|
|
26
26
|
from tico.quantization import convert, prepare
|
|
27
27
|
from tico.quantization.evaluation.metric import compute_peir
|
|
28
|
+
from tico.quantization.recipes.config import stage_name_matches
|
|
28
29
|
from tico.quantization.recipes.context import RecipeContext
|
|
29
30
|
from tico.quantization.recipes.override_policies import apply_ptq_override_policies
|
|
30
31
|
from tico.quantization.wrapq.utils.introspection import (
|
|
@@ -170,7 +171,12 @@ def trace_ptq_parity(
|
|
|
170
171
|
fp_model = ctx.model.eval()
|
|
171
172
|
q_model = copy.deepcopy(ctx.model).eval()
|
|
172
173
|
ptq_stage_cfg = next(
|
|
173
|
-
(
|
|
174
|
+
(
|
|
175
|
+
s
|
|
176
|
+
for s in ctx.cfg.get("pipeline", [])
|
|
177
|
+
if stage_name_matches(s.get("name"), "ptq")
|
|
178
|
+
),
|
|
179
|
+
None,
|
|
174
180
|
)
|
|
175
181
|
if ptq_stage_cfg is None:
|
|
176
182
|
raise RuntimeError("Trace mode requires a PTQ stage in the recipe config.")
|
|
@@ -17,7 +17,7 @@ from pathlib import Path
|
|
|
17
17
|
from typing import Any, Mapping
|
|
18
18
|
|
|
19
19
|
from tico.quantization.recipes.adapters import resolve_adapter
|
|
20
|
-
from tico.quantization.recipes.config import save_effective_config
|
|
20
|
+
from tico.quantization.recipes.config import save_effective_config, stage_name_matches
|
|
21
21
|
from tico.quantization.recipes.context import RecipeContext
|
|
22
22
|
from tico.quantization.recipes.data.dataset_usage import validate_recipe_dataset_usage
|
|
23
23
|
from tico.quantization.recipes.evaluation.selection import (
|
|
@@ -34,7 +34,9 @@ def _find_stage(
|
|
|
34
34
|
) -> Mapping[str, Any] | None:
|
|
35
35
|
"""Return the first pipeline stage with the requested name."""
|
|
36
36
|
for stage_cfg in cfg.get("pipeline", []):
|
|
37
|
-
if isinstance(stage_cfg, Mapping) and
|
|
37
|
+
if isinstance(stage_cfg, Mapping) and stage_name_matches(
|
|
38
|
+
stage_cfg.get("name"), stage_name
|
|
39
|
+
):
|
|
38
40
|
return stage_cfg
|
|
39
41
|
return None
|
|
40
42
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from tico.quantization.recipes.config import normalize_stage_name
|
|
1
2
|
from tico.quantization.recipes.stages.base import Stage
|
|
2
3
|
from tico.quantization.recipes.stages.cle import CLEStage
|
|
3
4
|
from tico.quantization.recipes.stages.gptq import GPTQStage
|
|
@@ -15,7 +16,7 @@ _STAGE_REGISTRY = {
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
def get_stage(name: str) -> Stage:
|
|
18
|
-
key = name
|
|
19
|
+
key = normalize_stage_name(name)
|
|
19
20
|
if key not in _STAGE_REGISTRY:
|
|
20
21
|
raise KeyError(
|
|
21
22
|
f"Unknown quantization stage: {name}. available={sorted(_STAGE_REGISTRY)}"
|
|
@@ -16,6 +16,7 @@ from typing import Any, Mapping
|
|
|
16
16
|
|
|
17
17
|
from tico.quantization import convert, prepare
|
|
18
18
|
from tico.quantization.config.ptq import PTQConfig
|
|
19
|
+
from tico.quantization.recipes.config import stage_name_matches
|
|
19
20
|
from tico.quantization.recipes.context import RecipeContext
|
|
20
21
|
from tico.quantization.recipes.override_policies import apply_ptq_override_policies
|
|
21
22
|
from tico.quantization.recipes.qparams import (
|
|
@@ -45,7 +46,7 @@ def _find_enabled_stage(
|
|
|
45
46
|
for stage_cfg in cfg.get("pipeline", []):
|
|
46
47
|
if not isinstance(stage_cfg, Mapping):
|
|
47
48
|
continue
|
|
48
|
-
if stage_cfg.get("name")
|
|
49
|
+
if not stage_name_matches(stage_cfg.get("name"), stage_name):
|
|
49
50
|
continue
|
|
50
51
|
if not stage_cfg.get("enabled", True):
|
|
51
52
|
continue
|
{tico-0.4.0.dev261026 → tico-0.4.0.dev261027}/tico/quantization/wrapq/observers/affine_base.py
RENAMED
|
@@ -112,6 +112,14 @@ class AffineObserverBase(ObserverBase):
|
|
|
112
112
|
def has_qparams(self) -> bool:
|
|
113
113
|
return self._cached_scale.numel() != 0
|
|
114
114
|
|
|
115
|
+
def _qparam_bounds(self) -> Tuple[torch.Tensor, torch.Tensor]:
|
|
116
|
+
"""Select calibration bounds only when no external grid is locked.
|
|
117
|
+
|
|
118
|
+
Range-based observers customize this hook rather than qparam dispatch,
|
|
119
|
+
so their calibration policy cannot require statistics for a locked grid.
|
|
120
|
+
"""
|
|
121
|
+
return self.min_val, self.max_val
|
|
122
|
+
|
|
115
123
|
def compute_qparams(self) -> Tuple[torch.Tensor, torch.Tensor]:
|
|
116
124
|
"""Return locked qparams or compute them from collected statistics."""
|
|
117
125
|
if self._qparams_locked:
|
|
@@ -121,10 +129,9 @@ class AffineObserverBase(ObserverBase):
|
|
|
121
129
|
)
|
|
122
130
|
return self._cached_scale, self._cached_zp
|
|
123
131
|
|
|
124
|
-
|
|
125
|
-
assert isinstance(self.max_val, torch.Tensor)
|
|
132
|
+
min_val, max_val = self._qparam_bounds()
|
|
126
133
|
qmin, qmax = self.dtype.qmin, self.dtype.qmax
|
|
127
|
-
rng =
|
|
134
|
+
rng = max_val - min_val
|
|
128
135
|
# The floor bounds the final scale, not the observed range, so a
|
|
129
136
|
# degenerate (all-zero) channel quantizes with the floor scale instead
|
|
130
137
|
# of floor / qmax. The value matches the ONE quantizer: a dead weight
|
|
@@ -134,14 +141,14 @@ class AffineObserverBase(ObserverBase):
|
|
|
134
141
|
eps = 1e-8
|
|
135
142
|
|
|
136
143
|
if self.qscheme.is_symmetric():
|
|
137
|
-
max_abs = torch.maximum(
|
|
144
|
+
max_abs = torch.maximum(max_val.abs(), min_val.abs())
|
|
138
145
|
scale = torch.clamp(max_abs / qmax, min=eps)
|
|
139
146
|
zp = torch.zeros_like(scale, dtype=torch.int)
|
|
140
147
|
self._cached_scale, self._cached_zp = scale, zp
|
|
141
148
|
return scale, zp
|
|
142
149
|
|
|
143
150
|
if (self.channel_axis is None) and torch.all(rng.abs() < 1e-8):
|
|
144
|
-
C =
|
|
151
|
+
C = min_val
|
|
145
152
|
if torch.allclose(C, torch.zeros_like(C)):
|
|
146
153
|
scale = torch.ones_like(C)
|
|
147
154
|
zp = torch.zeros_like(C, dtype=torch.int)
|
|
@@ -153,13 +160,11 @@ class AffineObserverBase(ObserverBase):
|
|
|
153
160
|
zp = torch.full_like(C, qmax, dtype=torch.int)
|
|
154
161
|
else:
|
|
155
162
|
# Force the range to include 0
|
|
156
|
-
rng = torch.where(0 <
|
|
157
|
-
rng = torch.where(0 >
|
|
163
|
+
rng = torch.where(0 < min_val, max_val, rng)
|
|
164
|
+
rng = torch.where(0 > max_val, -min_val, rng)
|
|
158
165
|
|
|
159
166
|
scale = torch.clamp(rng / (qmax - qmin), min=eps)
|
|
160
|
-
zp = (
|
|
161
|
-
torch.round(qmin - self.min_val / scale).clamp(qmin, qmax).to(torch.int)
|
|
162
|
-
)
|
|
167
|
+
zp = torch.round(qmin - min_val / scale).clamp(qmin, qmax).to(torch.int)
|
|
163
168
|
|
|
164
169
|
self._cached_scale, self._cached_zp = scale, zp
|
|
165
170
|
return scale, zp
|