tico 0.4.0.dev261028__tar.gz → 0.4.0.dev261029__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.dev261028 → tico-0.4.0.dev261029}/PKG-INFO +1 -1
- tico-0.4.0.dev261029/tico/_version.py +1 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/fold_quant_ops.py +11 -8
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/insert_quantize_on_dtype_mismatch.py +17 -2
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/propagate_qparam_backward.py +10 -4
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/propagate_qparam_forward.py +3 -4
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/case.py +14 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4.py +85 -111
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4_assistant.py +1 -1
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/cases/qwen3_vl.py +59 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/runner.py +15 -14
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/export_adapters.py +94 -1
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/export_adapters.py +138 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico.egg-info/PKG-INFO +1 -1
- tico-0.4.0.dev261028/tico/_version.py +0 -1
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/LICENSE +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/README.md +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/pyproject.toml +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/setup.cfg +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/_buffer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/_object.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/_schema.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/analysis/effects.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/analysis/purity.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/analysis/structural_hash.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/analysis/tensor_contract.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/builder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/cli/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/cli/__main__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/cli/main.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/document.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/errors.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/export.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/graph.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/inspect/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/inspect/printer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/inspect/summary.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/io.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/mutation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/operations/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/operations/extract.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/cleanup/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/cleanup/compact_indices.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/cleanup/dead_code_elimination.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/cleanup/graph_inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/manager.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/_pattern_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/canonicalize/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/canonicalize/equivalent_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/compatibility/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/compatibility/custom_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/compatibility/fc_gelu_fc.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/cse.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fold/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fold/constant_subgraph.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fold/evaluators/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fold/evaluators/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fold/evaluators/elementwise.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fold/evaluators/heavy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fold/evaluators/indexing.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fold/evaluators/shape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fold/profiles.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fuse/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fuse/activation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fuse/composite.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fuse/linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fuse/requantize.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/fuse/spatial.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/legalize/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/legalize/dynamic_fully_connected.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/policy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/simplify/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/simplify/_layout_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/simplify/arithmetic.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/simplify/identity_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/simplify/reductions.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/simplify/transpose_region.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/simplify/transpose_region_rules.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/optimization/simplify/views.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/presets.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/rules.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/passes/worklist.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/rewrite.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/errors.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/executor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/kernels/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/kernels/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/kernels/elementwise.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/kernels/nn.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/kernels/quantize.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/kernels/reduction.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/kernels/shape_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/program.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/runtime/quantization.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/selector.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/session.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/value/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/value/codec.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/value/dtype.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/value/tensor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/circle/verify.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/config/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/config/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/config/factory.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/config/v1.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/experimental/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/interpreter/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/interpreter/backends.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/interpreter/infer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/interpreter/interpreter.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/ops/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/ops/concat.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/ops/resize_bilinear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/ops/same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/cast_aten_where_arg_type.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/cast_clamp_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/cast_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/const_prop_pass.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/convert_conv1d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/convert_conv3d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/convert_expand_to_slice_cat.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/convert_gather_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/convert_layout_op_to_reshape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/convert_matmul_to_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/convert_repeat_to_expand_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/convert_sym_size_to_circle_shape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/convert_to_relu6.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/decompose_addmm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/decompose_batch_norm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/decompose_fake_quantize.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/decompose_fake_quantize_tensor_qparams.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/decompose_group_norm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/decompose_grouped_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/decompose_slice_scatter.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/eliminate_rank_round_trip_region.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/extract_dtype_kwargs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/fill_meta_val.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/fuse_leading_unsqueeze_reshape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/fuse_redundant_reshape_to_mean.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/legalize_causal_mask_value.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/legalize_predefined_layout_operators.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/lower_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/lower_multi_index_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/lower_pow2_to_mul.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/lower_to_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/lower_to_slice.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/merge_consecutive_cat.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/remove_empty_cat_inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/remove_nop.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/remove_redundant_assert_nodes.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/remove_redundant_expand.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/remove_redundant_permute.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/remove_redundant_reshape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/remove_redundant_slice.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/remove_redundant_to_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/remove_unused_placeholder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/restore_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/passes/segment_index_select.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/pt2_to_circle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/adaround/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/adaround/discrete_refinement.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/adaround/global_refinement.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/adaround/joint.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/adaround/joint_runner.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/adaround/rounding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/adaround/runner.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/adaround/screened_refinement.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/block_reconstruction/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/block_reconstruction/cache.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/block_reconstruction/multistart.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/block_reconstruction/observer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/block_reconstruction/qdrop.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/block_reconstruction/runner.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/block_reconstruction/selection.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/cle/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/cle/cle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/cle/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/fpi_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/fpi_gptq/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/fpi_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/fpi_gptq/util.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/gemma4_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/gemma4_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/gemma4_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/gemma4_gptq/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/gptq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/gptq/gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/gptq/quant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/gptq/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/qwen3_vl_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/qwen3_vl_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/qwen3_vl_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/qwen3_vl_gptq/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/smoothquant/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/smoothquant/observer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/smoothquant/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/smoothquant/smooth_quant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/spinquant/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/spinquant/fuse_norm_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/spinquant/hadamard_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/spinquant/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/spinquant/qwen3_vl_model_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/spinquant/qwen3_vl_quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/spinquant/qwen3_vl_rotation_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/spinquant/rotation_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/spinquant/spin_llama.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/spinquant/spin_qwen3_vl.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/algorithm/universal_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/analysis/ablation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/analysis/clipping.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/analysis/inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/analysis/metrics.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/analysis/output_quantization.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/analysis/outputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/analysis/profile.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/analysis/report.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/analysis/selector.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/analysis/sensitivity.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/builders.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/cle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/gemma4_assistant_builders.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/gemma4_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/gemma4_builders.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/gemma4_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/llama_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/ptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/qwen3_vl_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/qwen3_vl_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/qwen3_vl_spinquant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/smoothquant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/specs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/spinquant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/config/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/backend.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/evaluate.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/executor/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/executor/backend_executor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/executor/circle_executor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/executor/triv24_executor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/hellaswag_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/llava_bench_judge_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/lmms_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/lmms_gemma4.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/lmms_tasks/videomme_mini/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/metric.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/mmlu_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/mmmu_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/optional_deps.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/script/llm_tasks_eval.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/script/mini_vqa_eval.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/vlm_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/evaluation/vlm_generation_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/examples/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/examples/compare_side_by_side.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/examples/configs/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/examples/evaluate.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/examples/export.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/examples/generate.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/examples/inspector.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/examples/quantize.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/concat_qparam.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/legalize_quantized_clamp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/mx_qparam.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/qparam_safe_const_prop.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/quantize_bias.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/remove_weight_dequant_op.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/public_interface.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/quant_stub.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/quantizer_registry.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/adapters/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/adapters/gemma4.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/adapters/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/adapters/llama.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/adapters/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/config.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/context.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/data/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/data/dataset_config.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/data/dataset_usage.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/data/llm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/data/vlm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/cpu_fixtures.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/cpu_static_cache.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/cpu_validation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/export_regression.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/static_gemma4_assistant_runtime.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/static_gemma4_runtime.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/static_llama_runtime.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/static_qwen3_vl_runtime.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/tied_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/token_mask.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/trace.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/verify_llama_rope.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/cases/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/cases/llama.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/cases/nn.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/registry.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/result.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/evaluation/eager.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/evaluation/hellaswag.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/evaluation/llava_bench.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/evaluation/llava_bench_judge.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/evaluation/llm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/evaluation/mmlu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/evaluation/mmmu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/evaluation/selection.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/evaluation/video_mme.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/evaluation/vlm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/export/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/export/checkpoint.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/export/circle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/export/gemma4.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/export/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/export/llama.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/export/llama_bundle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/export/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/extensions.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/override_policies.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/qparams.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/runner.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/runtime/llama.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/sequence_length.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/stages/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/stages/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/stages/cle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/stages/gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/stages/ptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/stages/smoothquant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/stages/spinquant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/control.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/dtypes.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/compare_ppl.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/debug_quant_outputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/evaluate_fk_llama_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/gemma4/quantize_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/gemma4/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/gemma4/quantize_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/gemma4/quantize_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/gemma4/quantize_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/gemma4/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/gemma4/quantize_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/gemma4/quantize_vision_pooler.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/llama/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/llama/quantize_attention_decode.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/llama/quantize_attention_prefill.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_decode.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_prefill.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/llama/quantize_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/nn/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/nn/quantize_conv3d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/nn/quantize_conv3d_special_case.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/nn/quantize_layernorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/nn/quantize_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/nn/quantize_tied_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/quantize_full_qmodel_with_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/quantize_qwen3_vl_with_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/quantize_with_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_text_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_text_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_text_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_vision_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_vision_block.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_vision_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/qwen/trace_qwen.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/examples/static_llama_layer_runtime.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/lifecycle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/mode.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/observers/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/observers/affine_base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/observers/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/observers/ema.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/observers/identity.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/observers/minmax.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/observers/mx.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/observers/percentile.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/qscheme.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/utils/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/utils/check_missing_qparam.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/utils/introspection.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/utils/linear_folding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/utils/metrics.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/utils/reduce_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/utils/static_export.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/utils/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/utils/version.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrap_helper.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/fairseq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/fairseq/decoder_export_single_step.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/fairseq/quant_mha.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/embedding_scale_fusion.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/ple_embedding_host.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_clippable_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_text_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_text_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_pooler.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/rope.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/static_vision_profile.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4/vision_split_export.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4_assistant/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4_assistant/export_adapters.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_backbone.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_masked_embedder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4_assistant/sparse_head.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4_assistant/static_inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/gemma4_assistant/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/llama/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/llama/export_adapters.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/llama/position.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/llama/quant_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/llama/quant_decoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/llama/quant_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/llama/quant_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/llama/quant_model_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/llama/static_inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/nn/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/nn/quant_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/nn/quant_conv3d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/nn/quant_conv3d_decomposed.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/nn/quant_conv_transpose2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/nn/quant_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/nn/quant_layernorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/nn/quant_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/nn/quant_maxpool2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/nn/quant_prelu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/nn/quant_silu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/ops/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/ops/quant_concat.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/ops/quant_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/ops/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/ops/quant_same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/ptq_wrapper.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/quant_elementwise.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/quant_module_base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/quant_stub.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_block.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/static_inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/qwen_vl/vision_profile.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/wrapq/wrappers/registry.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/circle_binary.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/circle_graph.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/circle_mapping.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/circle_serializer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/adapters/llama_rmsnorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/adapters/onert/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/adapters/onert/llama_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/hashable_opcode.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/node_visitor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_abs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_add.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_alias_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_any.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_arange_start_step.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_argmax.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_avg_pool2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_bitwise_and.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_bmm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_cat.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_circle_gather_nd.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_circle_shape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_clamp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_clone.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_constant_pad_nd.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_cos.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_cumsum.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_depthwise_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_dequantize_per_channel.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_dequantize_per_tensor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_div.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_elu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_eq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_exp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_expand.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_full.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_full_like.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_ge.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_gelu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_gt.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_index.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_index_select.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_instance_norm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_le.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_leaky_relu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_log.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_log1p.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_logical_and.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_logical_not.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_lt.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_max_dim.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_max_pool2d_with_indices.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_maximum.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_mean.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_minimum.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_mm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_mul.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_ne.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_neg.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_permute.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_pow.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_prelu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_quantize_per_tensor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_reciprocal.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_relu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_relu6.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_repeat.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_reshape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_rmsnorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_round.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_rsqrt.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_scalar_tensor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_select_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_sigmoid.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_sin.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_slice.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_softmax.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_split_with_sizes.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_sqrt.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_squeeze.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_sub.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_sum.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_tanh.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_to_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_transpose_conv.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_unsqueeze.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_view.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/op_where.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/operators/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/pack.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/serialize/quant_param.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/compat/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/compat/torch.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/compat/torch_version_policy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/compat/transformers.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/convert.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/define.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/diff_graph.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/dtype.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/errors.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/graph.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/installed_packages.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/logging.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/mx/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/mx/dtypes.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/mx/elemwise_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/mx/formats.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/mx/mx_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/padding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/passes.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/pytree_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/record_input.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/register_custom_op.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/serialize.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/signature.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/trace_decorators.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/validate_args_kwargs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/utils/version.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico.egg-info/SOURCES.txt +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico.egg-info/dependency_links.txt +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico.egg-info/entry_points.txt +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico.egg-info/requires.txt +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.0.dev261029"
|
|
@@ -57,9 +57,9 @@ def _inherit_qparam_from_view_chain(node: torch.fx.Node) -> bool:
|
|
|
57
57
|
``FoldQuantOps`` runs before ``PropagateQParamForward``. A
|
|
58
58
|
requantization after a slice/view chain must therefore discover
|
|
59
59
|
the already-folded producer qparams by walking through the view
|
|
60
|
-
chain, including concatenations whose inputs share one
|
|
61
|
-
the target Q-DQ pair can be folded into
|
|
62
|
-
operation disappears.
|
|
60
|
+
chain, including zero padding and concatenations whose inputs share one
|
|
61
|
+
domain. Otherwise the target Q-DQ pair can be folded into a layout output
|
|
62
|
+
and the required Quantize operation disappears.
|
|
63
63
|
|
|
64
64
|
MX views must preserve the shared-exponent blocks. Affine per-channel
|
|
65
65
|
propagation is not handled here.
|
|
@@ -120,11 +120,14 @@ def _inherit_qparam_from_view_chain(node: torch.fx.Node) -> bool:
|
|
|
120
120
|
source_qparam.dtype
|
|
121
121
|
):
|
|
122
122
|
return False
|
|
123
|
-
if not is_mx_dtype(source_qparam.dtype)
|
|
124
|
-
view
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
if not is_mx_dtype(source_qparam.dtype):
|
|
124
|
+
for view in chain:
|
|
125
|
+
if view.target == torch.ops.aten.constant_pad_nd.default:
|
|
126
|
+
value = view.kwargs.get(
|
|
127
|
+
"value", view.args[2] if len(view.args) > 2 else 0
|
|
128
|
+
)
|
|
129
|
+
if value != 0:
|
|
130
|
+
return False
|
|
128
131
|
|
|
129
132
|
for view in reversed(chain):
|
|
130
133
|
if is_mx_dtype(source_qparam.dtype):
|
|
@@ -24,6 +24,7 @@ from typing import Any
|
|
|
24
24
|
import torch
|
|
25
25
|
from torch.export import ExportedProgram
|
|
26
26
|
|
|
27
|
+
from tico.quantization.passes.concat_qparam import is_width_direction_concat
|
|
27
28
|
from tico.serialize.quant_param import QPARAM_KEY, QuantParam
|
|
28
29
|
from tico.utils import logging
|
|
29
30
|
from tico.utils.errors import NotYetSupportedError
|
|
@@ -254,7 +255,20 @@ def _cat_handler(node, logger):
|
|
|
254
255
|
|
|
255
256
|
assert len(tensors) > 0
|
|
256
257
|
in_dtype = qparam_dtype(tensors[0])
|
|
257
|
-
|
|
258
|
+
mixed_dtype = any(qparam_dtype(x) != in_dtype for x in tensors)
|
|
259
|
+
first = tensors[0].meta[QPARAM_KEY]
|
|
260
|
+
distinct_domains = any(
|
|
261
|
+
qparam.dtype != first.dtype
|
|
262
|
+
or qparam.scale != first.scale
|
|
263
|
+
or qparam.zero_point != first.zero_point
|
|
264
|
+
or qparam.quantized_dimension != first.quantized_dimension
|
|
265
|
+
for qparam in (x.meta[QPARAM_KEY] for x in tensors[1:])
|
|
266
|
+
)
|
|
267
|
+
# The width-direction backend contract explicitly allows independent grids.
|
|
268
|
+
# Uniform-input concat retains its existing output-boundary behavior.
|
|
269
|
+
if mixed_dtype or (
|
|
270
|
+
distinct_domains and not is_width_direction_concat(node, cat_args)
|
|
271
|
+
):
|
|
258
272
|
destination = node.meta[QPARAM_KEY]
|
|
259
273
|
qparams = [x.meta[QPARAM_KEY] for x in tensors] + [destination]
|
|
260
274
|
# Preserve the existing treatment of incompletely annotated concats.
|
|
@@ -272,7 +286,8 @@ def _cat_handler(node, logger):
|
|
|
272
286
|
for qparam in qparams
|
|
273
287
|
):
|
|
274
288
|
raise NotYetSupportedError(
|
|
275
|
-
f"Unsupported mixed-dtype
|
|
289
|
+
f"Unsupported {'mixed-dtype' if mixed_dtype else 'distinct-domain'} "
|
|
290
|
+
f"concat {node.name}: "
|
|
276
291
|
f"inputs={[qparam_dtype(x) for x in tensors]}, "
|
|
277
292
|
f"output={destination.dtype}. "
|
|
278
293
|
"Only per-tensor affine uint8/int16 qparams are supported."
|
{tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/propagate_qparam_backward.py
RENAMED
|
@@ -45,6 +45,12 @@ def _retarget_affine_per_tensor_quantize(
|
|
|
45
45
|
"""Retarget a private Quantize boundary without changing its source domain."""
|
|
46
46
|
if len(dst.users) != 1 or src not in dst.users:
|
|
47
47
|
return
|
|
48
|
+
# Folding has already proven this to be a genuine requantization when
|
|
49
|
+
# its tensor input has a domain. Retargeting it would remove an earlier
|
|
50
|
+
# rounding/clamping step, even if it has just one consumer.
|
|
51
|
+
tensor = dst.args[0] if dst.args else dst.kwargs.get("input")
|
|
52
|
+
if isinstance(tensor, torch.fx.Node) and QPARAM_KEY in tensor.meta:
|
|
53
|
+
return
|
|
48
54
|
|
|
49
55
|
qparam = src.meta.get(QPARAM_KEY)
|
|
50
56
|
if not isinstance(qparam, QuantParam):
|
|
@@ -170,10 +176,10 @@ class PropagateQParamBackward(PassBase):
|
|
|
170
176
|
logger.debug(f"{src.name}'s MX quantparam is remapped to {dst.name}.")
|
|
171
177
|
return
|
|
172
178
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
179
|
+
# Producers own their existing domain, including when scale/ZP
|
|
180
|
+
# differ with the same storage dtype. Normalize consumer edges
|
|
181
|
+
# explicitly instead of changing this producer and all its users.
|
|
182
|
+
if QPARAM_KEY in dst.meta:
|
|
177
183
|
return
|
|
178
184
|
|
|
179
185
|
dst.meta[QPARAM_KEY] = copy.deepcopy(src_qparam)
|
{tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/passes/propagate_qparam_forward.py
RENAMED
|
@@ -100,10 +100,9 @@ class PropagateQParamForward(PassBase):
|
|
|
100
100
|
logger.debug(f"{src.name}'s MX quantparam is remapped to {dst.name}.")
|
|
101
101
|
return
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
):
|
|
103
|
+
# An established destination domain is not an invitation to
|
|
104
|
+
# overwrite scale/ZP merely because the storage dtype agrees.
|
|
105
|
+
if QPARAM_KEY in dst.meta:
|
|
107
106
|
return
|
|
108
107
|
|
|
109
108
|
dst.meta[QPARAM_KEY] = copy.deepcopy(src_qparam)
|
{tico-0.4.0.dev261028 → tico-0.4.0.dev261029}/tico/quantization/recipes/debug/wrapper_smoke/case.py
RENAMED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"""Case interfaces for wrapper-level quantization smoke checks."""
|
|
16
16
|
|
|
17
17
|
import inspect
|
|
18
|
+
from contextlib import AbstractContextManager, nullcontext
|
|
18
19
|
from dataclasses import dataclass, field
|
|
19
20
|
from typing import Any, cast, Mapping
|
|
20
21
|
|
|
@@ -249,6 +250,19 @@ class WrapperSmokeCase:
|
|
|
249
250
|
"""Return the input object to pass to tico.convert for Circle export."""
|
|
250
251
|
return eval_sample
|
|
251
252
|
|
|
253
|
+
def export_context(
|
|
254
|
+
self,
|
|
255
|
+
quantized: torch.nn.Module,
|
|
256
|
+
eval_sample: ForwardInput,
|
|
257
|
+
cfg: Mapping[str, Any],
|
|
258
|
+
) -> AbstractContextManager[None]:
|
|
259
|
+
"""Keep production static preparation active through adapter creation/tracing.
|
|
260
|
+
|
|
261
|
+
Model-specific cases override this hook when their production export
|
|
262
|
+
context owns temporary modes, shape profiles, or forward preparation.
|
|
263
|
+
"""
|
|
264
|
+
return nullcontext()
|
|
265
|
+
|
|
252
266
|
def export_invocation(
|
|
253
267
|
self,
|
|
254
268
|
quantized: torch.nn.Module,
|
|
@@ -22,6 +22,7 @@ import torch
|
|
|
22
22
|
from tico.quantization.config.gemma4_attention import get_gemma4_text_attention_options
|
|
23
23
|
from tico.quantization.recipes.debug.wrapper_smoke.case import (
|
|
24
24
|
CaseAvailability,
|
|
25
|
+
ExportInvocation,
|
|
25
26
|
ForwardInput,
|
|
26
27
|
WrapperSmokeCase,
|
|
27
28
|
)
|
|
@@ -40,9 +41,16 @@ from tico.quantization.wrapq.wrappers.gemma4.static_vision_profile import (
|
|
|
40
41
|
)
|
|
41
42
|
|
|
42
43
|
if TYPE_CHECKING:
|
|
44
|
+
from tico.quantization.wrapq.wrappers.gemma4.quant_for_conditional_generation import (
|
|
45
|
+
QuantGemma4ForConditionalGeneration,
|
|
46
|
+
)
|
|
43
47
|
from tico.quantization.wrapq.wrappers.gemma4.quant_text_attention import (
|
|
44
48
|
QuantGemma4TextAttention,
|
|
45
49
|
)
|
|
50
|
+
from tico.quantization.wrapq.wrappers.gemma4.quant_text_model import (
|
|
51
|
+
QuantGemma4TextModel,
|
|
52
|
+
)
|
|
53
|
+
from tico.quantization.wrapq.wrappers.ptq_wrapper import PTQWrapper
|
|
46
54
|
|
|
47
55
|
|
|
48
56
|
_GEMMA4_FULL_ROPE_PARAMETERS: dict[str, Any] = {
|
|
@@ -2646,13 +2654,87 @@ class Gemma4ModelCase(Gemma4BaseCase):
|
|
|
2646
2654
|
)
|
|
2647
2655
|
|
|
2648
2656
|
|
|
2649
|
-
class
|
|
2657
|
+
class Gemma4TextLogitsCase(Gemma4BaseCase):
|
|
2658
|
+
"""Host-prepared text prefill through every decoder, norm and LM head."""
|
|
2659
|
+
|
|
2660
|
+
@staticmethod
|
|
2661
|
+
def _text_owner(module: torch.nn.Module) -> "QuantGemma4TextModel":
|
|
2662
|
+
top = cast(
|
|
2663
|
+
"QuantGemma4ForConditionalGeneration", getattr(module, "wrapped", module)
|
|
2664
|
+
)
|
|
2665
|
+
owner = top.model.wrapped
|
|
2666
|
+
language_model = getattr(owner, "language_model", None)
|
|
2667
|
+
return cast(
|
|
2668
|
+
"QuantGemma4TextModel",
|
|
2669
|
+
(
|
|
2670
|
+
cast("PTQWrapper", language_model).wrapped
|
|
2671
|
+
if language_model is not None
|
|
2672
|
+
else owner
|
|
2673
|
+
),
|
|
2674
|
+
)
|
|
2675
|
+
|
|
2676
|
+
def forward(self, module: torch.nn.Module, sample: ForwardInput) -> Any:
|
|
2677
|
+
"""Calibrate the real token and external-embedding/cache routes."""
|
|
2678
|
+
cloned = _clone_forward_input(sample)
|
|
2679
|
+
output = module(*cloned.args, **dict(cloned.kwargs))
|
|
2680
|
+
owner = getattr(module, "wrapped", module)
|
|
2681
|
+
if getattr(owner, "_mode", None) is Mode.CALIB:
|
|
2682
|
+
text = self._text_owner(module)
|
|
2683
|
+
ids = cloned.kwargs["input_ids"]
|
|
2684
|
+
embeds = text.embed_tokens(ids)
|
|
2685
|
+
ple = (
|
|
2686
|
+
text.get_per_layer_inputs(ids, embeds)
|
|
2687
|
+
if text.hidden_size_per_layer_input
|
|
2688
|
+
else None
|
|
2689
|
+
)
|
|
2690
|
+
# Exercise exactly the external-embedding path before freezing.
|
|
2691
|
+
module(inputs_embeds=embeds, per_layer_inputs=ple, use_cache=True)
|
|
2692
|
+
return output
|
|
2693
|
+
|
|
2694
|
+
def export_invocation(
|
|
2695
|
+
self,
|
|
2696
|
+
quantized: torch.nn.Module,
|
|
2697
|
+
eval_sample: ForwardInput,
|
|
2698
|
+
cfg: Mapping[str, Any],
|
|
2699
|
+
) -> ExportInvocation:
|
|
2700
|
+
"""Pair the production text-logits adapter with genuine host inputs."""
|
|
2701
|
+
from tico.quantization.wrapq.wrappers.gemma4.export_adapters import (
|
|
2702
|
+
Gemma4TextLogitsPrefillExportAdapter,
|
|
2703
|
+
)
|
|
2704
|
+
|
|
2705
|
+
owner = getattr(quantized, "wrapped", quantized)
|
|
2706
|
+
text = self._text_owner(quantized)
|
|
2707
|
+
with torch.no_grad():
|
|
2708
|
+
embeds = text.embed_tokens(eval_sample.kwargs["input_ids"])
|
|
2709
|
+
ple = None
|
|
2710
|
+
if text.hidden_size_per_layer_input:
|
|
2711
|
+
tokens = text.get_per_layer_inputs(
|
|
2712
|
+
eval_sample.kwargs["input_ids"], embeds
|
|
2713
|
+
)
|
|
2714
|
+
observed_embeds = text.obs_inputs_embeds.fake_quant(embeds)
|
|
2715
|
+
ple = text.project_per_layer_inputs(observed_embeds, tokens)
|
|
2716
|
+
positions = torch.arange(embeds.shape[1], device=embeds.device).unsqueeze(0)
|
|
2717
|
+
rope = {}
|
|
2718
|
+
masks = {}
|
|
2719
|
+
for layer_type in text.unique_layer_types:
|
|
2720
|
+
cos, sin = text.rotary_emb(embeds, positions, layer_type)
|
|
2721
|
+
rope[layer_type] = self._export_text_rope((cos, sin), cfg)
|
|
2722
|
+
masks[layer_type] = _causal_mask(
|
|
2723
|
+
embeds.shape[1], text.qcfg.attention_mask_fill_value
|
|
2724
|
+
)
|
|
2725
|
+
return ExportInvocation(
|
|
2726
|
+
Gemma4TextLogitsPrefillExportAdapter(owner, text).eval(),
|
|
2727
|
+
ForwardInput((embeds, ple, masks, rope)),
|
|
2728
|
+
)
|
|
2729
|
+
|
|
2730
|
+
|
|
2731
|
+
class Gemma4ForConditionalGenerationCase(Gemma4TextLogitsCase):
|
|
2650
2732
|
"""Smoke case for one tiny Gemma4ForConditionalGeneration."""
|
|
2651
2733
|
|
|
2652
2734
|
name = "gemma4_for_conditional_generation"
|
|
2653
2735
|
description = (
|
|
2654
2736
|
"Quantize one tiny Gemma4ForConditionalGeneration "
|
|
2655
|
-
"(
|
|
2737
|
+
"(text-only logits; Circle uses the external-embedding text core)."
|
|
2656
2738
|
)
|
|
2657
2739
|
tags = ("gemma4", "e2b", "model", "conditional_generation", "image-text")
|
|
2658
2740
|
max_mean_abs_diff = 5.0
|
|
@@ -2733,14 +2815,6 @@ class Gemma4ForConditionalGenerationCase(Gemma4BaseCase):
|
|
|
2733
2815
|
"""Create the Gemma4ForConditionalGeneration evaluation sample."""
|
|
2734
2816
|
return self._sample()
|
|
2735
2817
|
|
|
2736
|
-
def forward(self, module: torch.nn.Module, sample: ForwardInput) -> Any:
|
|
2737
|
-
"""Run the Gemma4ForConditionalGeneration without sharing mutable sample state.
|
|
2738
|
-
|
|
2739
|
-
The wrapper returns logits directly (not a Gemma4CausalLMOutputWithPast).
|
|
2740
|
-
"""
|
|
2741
|
-
cloned = _clone_forward_input(sample)
|
|
2742
|
-
return module(*cloned.args, **dict(cloned.kwargs))
|
|
2743
|
-
|
|
2744
2818
|
def reference_forward(
|
|
2745
2819
|
self, reference: torch.nn.Module, sample: ForwardInput
|
|
2746
2820
|
) -> Any:
|
|
@@ -2749,54 +2823,8 @@ class Gemma4ForConditionalGenerationCase(Gemma4BaseCase):
|
|
|
2749
2823
|
output = reference(*cloned.args, **dict(cloned.kwargs))
|
|
2750
2824
|
return output.logits if hasattr(output, "logits") else output
|
|
2751
2825
|
|
|
2752
|
-
def export_module(
|
|
2753
|
-
self, quantized: torch.nn.Module, cfg: Mapping[str, Any]
|
|
2754
|
-
) -> torch.nn.Module:
|
|
2755
|
-
"""Export the wrapped Gemma4ForConditionalGeneration in prefill mode."""
|
|
2756
|
-
wrapped = getattr(quantized, "wrapped", quantized)
|
|
2757
|
-
as_export_module = getattr(wrapped, "as_export_module", None)
|
|
2758
|
-
if callable(as_export_module):
|
|
2759
|
-
return as_export_module(mode="prefill").eval()
|
|
2760
|
-
return quantized
|
|
2761
|
-
|
|
2762
|
-
def export_input(
|
|
2763
|
-
self, eval_sample: ForwardInput, cfg: Mapping[str, Any]
|
|
2764
|
-
) -> ForwardInput:
|
|
2765
|
-
"""Create static export inputs expected by the export adapter.
|
|
2766
2826
|
|
|
2767
|
-
|
|
2768
|
-
- inputs_embeds: (1, S, H)
|
|
2769
|
-
- per_layer_inputs: (1, S, L, P) or None
|
|
2770
|
-
- attention_masks: dict[layer_type -> mask]
|
|
2771
|
-
- position_embeddings: dict[layer_type -> (cos, sin)]
|
|
2772
|
-
"""
|
|
2773
|
-
hidden_size = int(self.text_cfg.hidden_size)
|
|
2774
|
-
head_dim = int(self.text_cfg.head_dim)
|
|
2775
|
-
num_layers = int(self.text_cfg.num_hidden_layers)
|
|
2776
|
-
ple_dim = int(getattr(self.text_cfg, "hidden_size_per_layer_input", 0) or 0)
|
|
2777
|
-
layer_types = list(self.text_cfg.layer_types)
|
|
2778
|
-
|
|
2779
|
-
inputs_embeds = torch.randn(1, self.seq_len, hidden_size)
|
|
2780
|
-
|
|
2781
|
-
per_layer_inputs = None
|
|
2782
|
-
if ple_dim > 0:
|
|
2783
|
-
per_layer_inputs = torch.randn(1, self.seq_len, num_layers, ple_dim)
|
|
2784
|
-
|
|
2785
|
-
attention_masks: dict[str, torch.Tensor] = {}
|
|
2786
|
-
position_embeddings: dict[str, tuple[torch.Tensor, torch.Tensor]] = {}
|
|
2787
|
-
for layer_type in layer_types:
|
|
2788
|
-
attention_masks[layer_type] = torch.zeros(1, 1, self.seq_len, self.seq_len)
|
|
2789
|
-
cos = torch.ones(1, self.seq_len, head_dim)
|
|
2790
|
-
sin = torch.zeros(1, self.seq_len, head_dim)
|
|
2791
|
-
position_embeddings[layer_type] = self._export_text_rope((cos, sin), cfg)
|
|
2792
|
-
|
|
2793
|
-
return ForwardInput(
|
|
2794
|
-
(inputs_embeds, per_layer_inputs, attention_masks, position_embeddings),
|
|
2795
|
-
{},
|
|
2796
|
-
)
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
class Gemma4ForCausalLMCase(Gemma4BaseCase):
|
|
2827
|
+
class Gemma4ForCausalLMCase(Gemma4TextLogitsCase):
|
|
2800
2828
|
"""Smoke case for one tiny Gemma4ForCausalLM (text-only)."""
|
|
2801
2829
|
|
|
2802
2830
|
name = "gemma4_for_causal_lm"
|
|
@@ -2857,14 +2885,6 @@ class Gemma4ForCausalLMCase(Gemma4BaseCase):
|
|
|
2857
2885
|
"""Create the Gemma4ForCausalLM evaluation sample."""
|
|
2858
2886
|
return self._sample()
|
|
2859
2887
|
|
|
2860
|
-
def forward(self, module: torch.nn.Module, sample: ForwardInput) -> Any:
|
|
2861
|
-
"""Run the Gemma4ForCausalLM without sharing mutable sample state.
|
|
2862
|
-
|
|
2863
|
-
The wrapper returns logits directly (not a Gemma4CausalLMOutputWithPast).
|
|
2864
|
-
"""
|
|
2865
|
-
cloned = _clone_forward_input(sample)
|
|
2866
|
-
return module(*cloned.args, **dict(cloned.kwargs))
|
|
2867
|
-
|
|
2868
2888
|
def reference_forward(
|
|
2869
2889
|
self, reference: torch.nn.Module, sample: ForwardInput
|
|
2870
2890
|
) -> Any:
|
|
@@ -2873,52 +2893,6 @@ class Gemma4ForCausalLMCase(Gemma4BaseCase):
|
|
|
2873
2893
|
output = reference(*cloned.args, **dict(cloned.kwargs))
|
|
2874
2894
|
return output.logits if hasattr(output, "logits") else output
|
|
2875
2895
|
|
|
2876
|
-
def export_module(
|
|
2877
|
-
self, quantized: torch.nn.Module, cfg: Mapping[str, Any]
|
|
2878
|
-
) -> torch.nn.Module:
|
|
2879
|
-
"""Export the wrapped Gemma4ForCausalLM in prefill mode."""
|
|
2880
|
-
wrapped = getattr(quantized, "wrapped", quantized)
|
|
2881
|
-
as_export_module = getattr(wrapped, "as_export_module", None)
|
|
2882
|
-
if callable(as_export_module):
|
|
2883
|
-
return as_export_module(mode="prefill").eval()
|
|
2884
|
-
return quantized
|
|
2885
|
-
|
|
2886
|
-
def export_input(
|
|
2887
|
-
self, eval_sample: ForwardInput, cfg: Mapping[str, Any]
|
|
2888
|
-
) -> ForwardInput:
|
|
2889
|
-
"""Create static export inputs expected by the export adapter.
|
|
2890
|
-
|
|
2891
|
-
The export adapter's forward_export() takes precomputed inputs:
|
|
2892
|
-
- inputs_embeds: (1, S, H)
|
|
2893
|
-
- per_layer_inputs: (1, S, L, P) or None
|
|
2894
|
-
- attention_masks: dict[layer_type -> mask]
|
|
2895
|
-
- position_embeddings: dict[layer_type -> (cos, sin)]
|
|
2896
|
-
"""
|
|
2897
|
-
hidden_size = int(self.text_cfg.hidden_size)
|
|
2898
|
-
head_dim = int(self.text_cfg.head_dim)
|
|
2899
|
-
num_layers = int(self.text_cfg.num_hidden_layers)
|
|
2900
|
-
ple_dim = int(getattr(self.text_cfg, "hidden_size_per_layer_input", 0) or 0)
|
|
2901
|
-
layer_types = list(self.text_cfg.layer_types)
|
|
2902
|
-
|
|
2903
|
-
inputs_embeds = torch.randn(1, self.seq_len, hidden_size)
|
|
2904
|
-
|
|
2905
|
-
per_layer_inputs = None
|
|
2906
|
-
if ple_dim > 0:
|
|
2907
|
-
per_layer_inputs = torch.randn(1, self.seq_len, num_layers, ple_dim)
|
|
2908
|
-
|
|
2909
|
-
attention_masks: dict[str, torch.Tensor] = {}
|
|
2910
|
-
position_embeddings: dict[str, tuple[torch.Tensor, torch.Tensor]] = {}
|
|
2911
|
-
for layer_type in layer_types:
|
|
2912
|
-
attention_masks[layer_type] = torch.zeros(1, 1, self.seq_len, self.seq_len)
|
|
2913
|
-
cos = torch.ones(1, self.seq_len, head_dim)
|
|
2914
|
-
sin = torch.zeros(1, self.seq_len, head_dim)
|
|
2915
|
-
position_embeddings[layer_type] = self._export_text_rope((cos, sin), cfg)
|
|
2916
|
-
|
|
2917
|
-
return ForwardInput(
|
|
2918
|
-
(inputs_embeds, per_layer_inputs, attention_masks, position_embeddings),
|
|
2919
|
-
{},
|
|
2920
|
-
)
|
|
2921
|
-
|
|
2922
2896
|
|
|
2923
2897
|
GEMMA4_CASES = (
|
|
2924
2898
|
Gemma4TextMLPCase(),
|
|
@@ -160,7 +160,7 @@ class Gemma4AssistantCoreCase(WrapperSmokeCase):
|
|
|
160
160
|
tags = ("gemma4_assistant", "assistant", "core", "shared_kv")
|
|
161
161
|
kv_len = 10
|
|
162
162
|
full_kv_length = 16
|
|
163
|
-
sliding_kv_length =
|
|
163
|
+
sliding_kv_length = 16
|
|
164
164
|
|
|
165
165
|
def availability(self) -> CaseAvailability:
|
|
166
166
|
return _has_gemma4_assistant()
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
"""Smoke cases for Qwen3-VL wrapper checks."""
|
|
16
16
|
|
|
17
|
+
from contextlib import AbstractContextManager
|
|
17
18
|
from dataclasses import dataclass
|
|
18
19
|
from typing import Any, cast, Mapping, Tuple, TYPE_CHECKING
|
|
19
20
|
|
|
@@ -1047,6 +1048,29 @@ class QwenTextModelCase(QwenBaseCase):
|
|
|
1047
1048
|
"""Create the text-model evaluation sample."""
|
|
1048
1049
|
return self._sample()
|
|
1049
1050
|
|
|
1051
|
+
def export_context(
|
|
1052
|
+
self,
|
|
1053
|
+
quantized: torch.nn.Module,
|
|
1054
|
+
eval_sample: ForwardInput,
|
|
1055
|
+
cfg: Mapping[str, Any],
|
|
1056
|
+
) -> AbstractContextManager[None]:
|
|
1057
|
+
"""Prepare bounded model-owned positions, RoPE and masks temporarily."""
|
|
1058
|
+
from tico.quantization.wrapq.utils.static_export import prepared_static_export
|
|
1059
|
+
|
|
1060
|
+
del cfg
|
|
1061
|
+
return prepared_static_export(
|
|
1062
|
+
quantized, eval_sample.kwargs["input_ids"].shape[1]
|
|
1063
|
+
)
|
|
1064
|
+
|
|
1065
|
+
def export_input(
|
|
1066
|
+
self, eval_sample: ForwardInput, cfg: Mapping[str, Any]
|
|
1067
|
+
) -> ForwardInput:
|
|
1068
|
+
"""Use the cache-free text ABI and tensor tuple output during capture."""
|
|
1069
|
+
del cfg
|
|
1070
|
+
return ForwardInput(
|
|
1071
|
+
(), dict(eval_sample.kwargs, use_cache=False, return_dict=False)
|
|
1072
|
+
)
|
|
1073
|
+
|
|
1050
1074
|
def output_tensor(self, output: Any) -> torch.Tensor:
|
|
1051
1075
|
"""Select last_hidden_state from model outputs."""
|
|
1052
1076
|
if hasattr(output, "last_hidden_state"):
|
|
@@ -1440,6 +1464,41 @@ class QwenModelCase(QwenBaseCase):
|
|
|
1440
1464
|
"""Create the multimodal model evaluation sample."""
|
|
1441
1465
|
return self._sample(for_eval=True)
|
|
1442
1466
|
|
|
1467
|
+
def export_context(
|
|
1468
|
+
self,
|
|
1469
|
+
quantized: torch.nn.Module,
|
|
1470
|
+
eval_sample: ForwardInput,
|
|
1471
|
+
cfg: Mapping[str, Any],
|
|
1472
|
+
) -> AbstractContextManager[None]:
|
|
1473
|
+
"""Prepare the fixed-image text profile without touching frozen observers."""
|
|
1474
|
+
from tico.quantization.wrapq.utils.static_export import prepared_static_export
|
|
1475
|
+
|
|
1476
|
+
del cfg
|
|
1477
|
+
return prepared_static_export(
|
|
1478
|
+
quantized, eval_sample.kwargs["input_ids"].shape[1]
|
|
1479
|
+
)
|
|
1480
|
+
|
|
1481
|
+
def export_invocation(
|
|
1482
|
+
self,
|
|
1483
|
+
quantized: torch.nn.Module,
|
|
1484
|
+
eval_sample: ForwardInput,
|
|
1485
|
+
cfg: Mapping[str, Any],
|
|
1486
|
+
) -> ExportInvocation:
|
|
1487
|
+
"""Export the complete fixed-image prefill computation with matching inputs."""
|
|
1488
|
+
from tico.quantization.wrapq.wrappers.qwen_vl.export_adapters import (
|
|
1489
|
+
Qwen3VLModelPrefillExportAdapter,
|
|
1490
|
+
)
|
|
1491
|
+
|
|
1492
|
+
del cfg
|
|
1493
|
+
owner = getattr(quantized, "wrapped", quantized)
|
|
1494
|
+
module = Qwen3VLModelPrefillExportAdapter(owner, grid_thw=self.thw).eval()
|
|
1495
|
+
return ExportInvocation(
|
|
1496
|
+
module,
|
|
1497
|
+
ForwardInput(
|
|
1498
|
+
(eval_sample.kwargs["input_ids"], eval_sample.kwargs["pixel_values"])
|
|
1499
|
+
),
|
|
1500
|
+
)
|
|
1501
|
+
|
|
1443
1502
|
|
|
1444
1503
|
class QwenForConditionalGenerationCase(QwenModelCase):
|
|
1445
1504
|
"""Smoke case for qwen/quantize_for_conditional_generation.py."""
|
|
@@ -107,20 +107,21 @@ def _export_circle(
|
|
|
107
107
|
try:
|
|
108
108
|
import tico
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
110
|
+
with case.export_context(quantized, eval_sample, cfg):
|
|
111
|
+
invocation = case.export_invocation(quantized, eval_sample, cfg)
|
|
112
|
+
invocation.validate_static_decoder_inputs()
|
|
113
|
+
export_module = invocation.module.eval()
|
|
114
|
+
export_input = invocation.inputs
|
|
115
|
+
args = tuple(export_input.args)
|
|
116
|
+
kwargs = dict(export_input.kwargs)
|
|
117
|
+
with torch.no_grad(), suppress_tico_warnings():
|
|
118
|
+
if kwargs:
|
|
119
|
+
circle_model = tico.convert(export_module, args, kwargs)
|
|
120
|
+
else:
|
|
121
|
+
circle_model = tico.convert(export_module, args)
|
|
122
|
+
path = output_dir / case.export_filename(cfg)
|
|
123
|
+
circle_model.save(path)
|
|
124
|
+
result.artifacts["circle"] = str(path)
|
|
124
125
|
except Exception as exc:
|
|
125
126
|
result.add_failure("EXPORT", f"Circle export failed: {exc}")
|
|
126
127
|
|
|
@@ -19,7 +19,7 @@ graphs. CPU runtime code owns dynamic orchestration, cache writes, sampling, and
|
|
|
19
19
|
processor/tokenizer logic.
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
|
-
from typing import Any, cast, Iterable, Optional, Tuple, TYPE_CHECKING
|
|
22
|
+
from typing import Any, Callable, cast, Iterable, Optional, Tuple, TYPE_CHECKING
|
|
23
23
|
|
|
24
24
|
import torch
|
|
25
25
|
import torch.nn as nn
|
|
@@ -45,6 +45,12 @@ if TYPE_CHECKING:
|
|
|
45
45
|
QuantGemma4ForConditionalGeneration,
|
|
46
46
|
)
|
|
47
47
|
from tico.quantization.wrapq.wrappers.gemma4.quant_model import QuantGemma4Model
|
|
48
|
+
from tico.quantization.wrapq.wrappers.gemma4.quant_text_attention import (
|
|
49
|
+
QuantGemma4TextAttention,
|
|
50
|
+
)
|
|
51
|
+
from tico.quantization.wrapq.wrappers.gemma4.quant_text_decoder_layer import (
|
|
52
|
+
QuantGemma4TextDecoderLayer,
|
|
53
|
+
)
|
|
48
54
|
from tico.quantization.wrapq.wrappers.gemma4.quant_text_model import (
|
|
49
55
|
QuantGemma4TextModel,
|
|
50
56
|
)
|
|
@@ -60,6 +66,7 @@ if TYPE_CHECKING:
|
|
|
60
66
|
from tico.quantization.wrapq.wrappers.gemma4.quant_vision_pooler import (
|
|
61
67
|
QuantGemma4VisionPooler,
|
|
62
68
|
)
|
|
69
|
+
from tico.quantization.wrapq.wrappers.ptq_wrapper import PTQWrapper
|
|
63
70
|
|
|
64
71
|
|
|
65
72
|
LayerKV = Tuple[torch.Tensor, torch.Tensor]
|
|
@@ -912,6 +919,92 @@ class Gemma4VisionPoolerPrefillExportAdapter(nn.Module):
|
|
|
912
919
|
return self.wrapped.forward_export(hidden_states=hidden_states)
|
|
913
920
|
|
|
914
921
|
|
|
922
|
+
class Gemma4TextLogitsPrefillExportAdapter(nn.Module):
|
|
923
|
+
"""Export the complete external-embedding text core and vocabulary logits.
|
|
924
|
+
|
|
925
|
+
Token/vision lookup, fusion and PLE projection are host/staged operations.
|
|
926
|
+
This composes the production decoder adapters, final norm, LM head and the
|
|
927
|
+
top-level model's logit softcapping, without calling an HF positional ABI.
|
|
928
|
+
Shared-KV models require the per-layer staged orchestration instead.
|
|
929
|
+
"""
|
|
930
|
+
|
|
931
|
+
def __init__(self, wrapped_lm: nn.Module, wrapped_text_model: nn.Module):
|
|
932
|
+
super().__init__()
|
|
933
|
+
text = cast("QuantGemma4TextModel", wrapped_text_model)
|
|
934
|
+
self._capability_guard = ExportCapabilityGuard(
|
|
935
|
+
text, "external_embeddings", mode=text._mode
|
|
936
|
+
)
|
|
937
|
+
self._logits_guard = ExportCapabilityGuard(
|
|
938
|
+
wrapped_lm, "required", mode=text._mode
|
|
939
|
+
)
|
|
940
|
+
decoders = [
|
|
941
|
+
cast("QuantGemma4TextDecoderLayer", cast("PTQWrapper", layer).wrapped)
|
|
942
|
+
for layer in text.layers
|
|
943
|
+
]
|
|
944
|
+
if any(
|
|
945
|
+
cast("QuantGemma4TextAttention", layer.self_attn.wrapped).is_kv_shared_layer
|
|
946
|
+
for layer in decoders
|
|
947
|
+
):
|
|
948
|
+
raise ValueError("Shared-KV text logits export requires per-layer stages.")
|
|
949
|
+
self.layers = nn.ModuleList(
|
|
950
|
+
[layer.as_export_module("prefill", return_kv=False) for layer in decoders]
|
|
951
|
+
)
|
|
952
|
+
self.layer_types = tuple(cast(list[str], text.config.layer_types))
|
|
953
|
+
self.norm = text.norm
|
|
954
|
+
lm = cast("QuantGemma4ForConditionalGeneration", wrapped_lm)
|
|
955
|
+
self.lm_head = lm.lm_head
|
|
956
|
+
self.inputs_observer = text.obs_inputs_embeds
|
|
957
|
+
self.cos_observers = text.obs_position_cos
|
|
958
|
+
self.sin_observers = text.obs_position_sin
|
|
959
|
+
self.mask_observers = text.obs_attention_masks
|
|
960
|
+
self.ple_observer = text.obs_per_layer_inputs
|
|
961
|
+
self.quantized = _quantized_export(text._mode, stage_name="Gemma4 text logits")
|
|
962
|
+
# Keep the live owner unregistered, just like ExportCapabilityGuard.
|
|
963
|
+
self._apply_softcap: Callable[[torch.Tensor], torch.Tensor] = (
|
|
964
|
+
lm._apply_logit_softcapping
|
|
965
|
+
)
|
|
966
|
+
|
|
967
|
+
def _fq(self, value: torch.Tensor, observer: ObserverBase) -> torch.Tensor:
|
|
968
|
+
return observer.fake_quant(value) if self.quantized else value
|
|
969
|
+
|
|
970
|
+
def forward(
|
|
971
|
+
self,
|
|
972
|
+
inputs_embeds: torch.Tensor,
|
|
973
|
+
per_layer_inputs: Optional[torch.Tensor],
|
|
974
|
+
attention_masks: dict[str, torch.Tensor],
|
|
975
|
+
position_embeddings: dict[str, tuple[torch.Tensor, torch.Tensor]],
|
|
976
|
+
) -> torch.Tensor:
|
|
977
|
+
"""Return all token logits, including the frozen softcapping path."""
|
|
978
|
+
self._capability_guard.require()
|
|
979
|
+
self._logits_guard.require()
|
|
980
|
+
hidden = self._fq(inputs_embeds, self.inputs_observer)
|
|
981
|
+
if per_layer_inputs is not None:
|
|
982
|
+
if self.ple_observer is None:
|
|
983
|
+
raise ValueError("per_layer_inputs requires enabled PLE.")
|
|
984
|
+
per_layer_inputs = self._fq(per_layer_inputs, self.ple_observer)
|
|
985
|
+
for index, layer in enumerate(self.layers):
|
|
986
|
+
layer_type = self.layer_types[index]
|
|
987
|
+
cos, sin = position_embeddings[layer_type]
|
|
988
|
+
rope = (
|
|
989
|
+
self._fq(cos, cast(ObserverBase, self.cos_observers[layer_type])),
|
|
990
|
+
self._fq(sin, cast(ObserverBase, self.sin_observers[layer_type])),
|
|
991
|
+
)
|
|
992
|
+
hidden = layer(
|
|
993
|
+
hidden,
|
|
994
|
+
per_layer_input=(
|
|
995
|
+
per_layer_inputs[:, :, index, :]
|
|
996
|
+
if per_layer_inputs is not None
|
|
997
|
+
else None
|
|
998
|
+
),
|
|
999
|
+
attention_mask=self._fq(
|
|
1000
|
+
attention_masks[layer_type],
|
|
1001
|
+
cast(ObserverBase, self.mask_observers[layer_type]),
|
|
1002
|
+
),
|
|
1003
|
+
position_embeddings=rope,
|
|
1004
|
+
)
|
|
1005
|
+
return self._apply_softcap(self.lm_head(self.norm(hidden)))
|
|
1006
|
+
|
|
1007
|
+
|
|
915
1008
|
class Gemma4LMHeadExportAdapter(nn.Module):
|
|
916
1009
|
"""Export adapter for final normalization and LM head."""
|
|
917
1010
|
|