tico 0.4.0.dev261028__tar.gz → 0.4.0.dev261101__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.dev261101}/PKG-INFO +1 -1
- tico-0.4.0.dev261101/tico/_version.py +1 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/ops/concat.py +12 -2
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/fold_quant_ops.py +11 -8
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/insert_quantize_on_dtype_mismatch.py +86 -50
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/propagate_qparam_backward.py +14 -14
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/propagate_qparam_forward.py +6 -8
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/case.py +14 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4.py +85 -111
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4_assistant.py +1 -1
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/cases/qwen3_vl.py +59 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/runner.py +15 -14
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/export_adapters.py +94 -1
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/ops/quant_concat.py +11 -2
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/export_adapters.py +138 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico.egg-info/PKG-INFO +1 -1
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico.egg-info/SOURCES.txt +0 -1
- tico-0.4.0.dev261028/tico/_version.py +0 -1
- tico-0.4.0.dev261028/tico/quantization/passes/concat_qparam.py +0 -83
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/LICENSE +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/README.md +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/pyproject.toml +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/setup.cfg +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/_buffer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/_object.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/_schema.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/analysis/effects.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/analysis/purity.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/analysis/structural_hash.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/analysis/tensor_contract.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/builder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/cli/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/cli/__main__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/cli/main.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/document.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/errors.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/export.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/graph.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/inspect/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/inspect/printer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/inspect/summary.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/io.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/mutation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/operations/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/operations/extract.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/cleanup/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/cleanup/compact_indices.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/cleanup/dead_code_elimination.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/cleanup/graph_inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/manager.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/_pattern_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/canonicalize/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/canonicalize/equivalent_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/compatibility/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/compatibility/custom_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/compatibility/fc_gelu_fc.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/cse.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fold/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fold/constant_subgraph.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fold/evaluators/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fold/evaluators/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fold/evaluators/elementwise.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fold/evaluators/heavy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fold/evaluators/indexing.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fold/evaluators/shape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fold/profiles.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fuse/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fuse/activation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fuse/composite.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fuse/linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fuse/requantize.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/fuse/spatial.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/legalize/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/legalize/dynamic_fully_connected.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/policy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/simplify/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/simplify/_layout_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/simplify/arithmetic.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/simplify/identity_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/simplify/reductions.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/simplify/transpose_region.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/simplify/transpose_region_rules.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/optimization/simplify/views.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/presets.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/rules.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/passes/worklist.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/rewrite.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/errors.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/executor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/kernels/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/kernels/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/kernels/elementwise.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/kernels/nn.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/kernels/quantize.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/kernels/reduction.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/kernels/shape_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/program.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/runtime/quantization.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/selector.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/session.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/value/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/value/codec.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/value/dtype.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/value/tensor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/circle/verify.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/config/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/config/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/config/factory.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/config/v1.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/experimental/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/interpreter/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/interpreter/backends.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/interpreter/infer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/interpreter/interpreter.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/ops/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/ops/resize_bilinear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/ops/same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/cast_aten_where_arg_type.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/cast_clamp_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/cast_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/const_prop_pass.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/convert_conv1d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/convert_conv3d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/convert_expand_to_slice_cat.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/convert_gather_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/convert_layout_op_to_reshape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/convert_matmul_to_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/convert_repeat_to_expand_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/convert_sym_size_to_circle_shape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/convert_to_relu6.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/decompose_addmm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/decompose_batch_norm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/decompose_fake_quantize.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/decompose_fake_quantize_tensor_qparams.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/decompose_group_norm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/decompose_grouped_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/decompose_slice_scatter.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/eliminate_rank_round_trip_region.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/extract_dtype_kwargs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/fill_meta_val.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/fuse_leading_unsqueeze_reshape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/fuse_redundant_reshape_to_mean.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/legalize_causal_mask_value.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/legalize_predefined_layout_operators.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/lower_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/lower_multi_index_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/lower_pow2_to_mul.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/lower_to_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/lower_to_slice.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/merge_consecutive_cat.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/remove_empty_cat_inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/remove_nop.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/remove_redundant_assert_nodes.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/remove_redundant_expand.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/remove_redundant_permute.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/remove_redundant_reshape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/remove_redundant_slice.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/remove_redundant_to_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/remove_unused_placeholder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/restore_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/passes/segment_index_select.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/pt2_to_circle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/adaround/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/adaround/discrete_refinement.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/adaround/global_refinement.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/adaround/joint.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/adaround/joint_runner.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/adaround/rounding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/adaround/runner.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/adaround/screened_refinement.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/block_reconstruction/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/block_reconstruction/cache.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/block_reconstruction/multistart.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/block_reconstruction/observer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/block_reconstruction/qdrop.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/block_reconstruction/runner.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/block_reconstruction/selection.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/cle/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/cle/cle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/cle/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/fpi_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/fpi_gptq/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/fpi_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/fpi_gptq/util.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/gemma4_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/gemma4_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/gemma4_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/gemma4_gptq/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/gptq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/gptq/gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/gptq/quant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/gptq/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/qwen3_vl_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/qwen3_vl_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/qwen3_vl_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/qwen3_vl_gptq/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/smoothquant/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/smoothquant/observer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/smoothquant/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/smoothquant/smooth_quant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/spinquant/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/spinquant/fuse_norm_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/spinquant/hadamard_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/spinquant/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/spinquant/qwen3_vl_model_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/spinquant/qwen3_vl_quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/spinquant/qwen3_vl_rotation_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/spinquant/rotation_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/spinquant/spin_llama.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/spinquant/spin_qwen3_vl.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/algorithm/universal_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/analysis/ablation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/analysis/clipping.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/analysis/inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/analysis/metrics.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/analysis/output_quantization.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/analysis/outputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/analysis/profile.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/analysis/report.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/analysis/selector.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/analysis/sensitivity.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/builders.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/cle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/gemma4_assistant_builders.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/gemma4_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/gemma4_builders.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/gemma4_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/llama_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/ptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/qwen3_vl_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/qwen3_vl_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/qwen3_vl_spinquant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/smoothquant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/specs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/spinquant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/config/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/backend.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/evaluate.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/executor/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/executor/backend_executor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/executor/circle_executor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/executor/triv24_executor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/hellaswag_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/llava_bench_judge_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/lmms_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/lmms_gemma4.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/lmms_tasks/videomme_mini/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/metric.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/mmlu_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/mmmu_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/optional_deps.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/script/llm_tasks_eval.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/script/mini_vqa_eval.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/vlm_eval_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/evaluation/vlm_generation_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/examples/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/examples/compare_side_by_side.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/examples/configs/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/examples/evaluate.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/examples/export.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/examples/generate.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/examples/inspector.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/examples/quantize.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/legalize_quantized_clamp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/mx_qparam.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/qparam_safe_const_prop.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/quantize_bias.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/remove_weight_dequant_op.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/public_interface.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/quant_stub.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/quantizer_registry.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/adapters/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/adapters/gemma4.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/adapters/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/adapters/llama.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/adapters/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/config.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/context.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/data/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/data/dataset_config.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/data/dataset_usage.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/data/llm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/data/vlm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/cpu_fixtures.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/cpu_static_cache.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/cpu_validation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/export_regression.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/static_gemma4_assistant_runtime.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/static_gemma4_runtime.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/static_llama_runtime.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/static_qwen3_vl_runtime.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/tied_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/token_mask.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/trace.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/verify_llama_rope.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/cases/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/cases/llama.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/cases/nn.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/registry.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/result.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/debug/wrapper_smoke/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/evaluation/eager.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/evaluation/hellaswag.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/evaluation/llava_bench.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/evaluation/llava_bench_judge.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/evaluation/llm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/evaluation/mmlu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/evaluation/mmmu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/evaluation/selection.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/evaluation/video_mme.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/evaluation/vlm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/export/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/export/checkpoint.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/export/circle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/export/gemma4.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/export/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/export/llama.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/export/llama_bundle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/export/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/extensions.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/override_policies.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/qparams.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/runner.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/runtime/llama.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/sequence_length.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/stages/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/stages/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/stages/cle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/stages/gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/stages/ptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/stages/smoothquant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/stages/spinquant.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/recipes/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/control.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/dtypes.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/compare_ppl.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/debug_quant_outputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/evaluate_fk_llama_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/gemma4/quantize_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/gemma4/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/gemma4/quantize_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/gemma4/quantize_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/gemma4/quantize_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/gemma4/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/gemma4/quantize_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/gemma4/quantize_vision_pooler.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/llama/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/llama/quantize_attention_decode.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/llama/quantize_attention_prefill.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_decode.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_prefill.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/llama/quantize_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/nn/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/nn/quantize_conv3d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/nn/quantize_conv3d_special_case.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/nn/quantize_layernorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/nn/quantize_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/nn/quantize_tied_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/quantize_full_qmodel_with_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/quantize_qwen3_vl_with_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/quantize_with_gptq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_text_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_text_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_text_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_vision_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_vision_block.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_vision_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/qwen/trace_qwen.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/examples/static_llama_layer_runtime.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/lifecycle.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/mode.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/observers/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/observers/affine_base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/observers/base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/observers/ema.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/observers/identity.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/observers/minmax.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/observers/mx.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/observers/percentile.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/qscheme.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/quantizer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/utils/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/utils/check_missing_qparam.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/utils/introspection.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/utils/linear_folding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/utils/metrics.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/utils/reduce_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/utils/static_export.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/utils/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/utils/version.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrap_helper.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/fairseq/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/fairseq/decoder_export_single_step.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/fairseq/quant_mha.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/embedding_scale_fusion.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/ple_embedding_host.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_clippable_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_text_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_text_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_pooler.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/rope.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/static_vision_profile.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4/vision_split_export.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4_assistant/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4_assistant/export_adapters.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_backbone.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_masked_embedder.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4_assistant/sparse_head.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4_assistant/static_inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/gemma4_assistant/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/llama/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/llama/export_adapters.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/llama/position.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/llama/quant_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/llama/quant_decoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/llama/quant_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/llama/quant_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/llama/quant_model_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/llama/static_inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/nn/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/nn/quant_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/nn/quant_conv3d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/nn/quant_conv3d_decomposed.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/nn/quant_conv_transpose2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/nn/quant_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/nn/quant_layernorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/nn/quant_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/nn/quant_maxpool2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/nn/quant_prelu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/nn/quant_silu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/ops/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/ops/quant_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/ops/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/ops/quant_same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/ptq_wrapper.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/quant_elementwise.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/quant_module_base.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/quant_stub.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_block.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/static_inputs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/qwen_vl/vision_profile.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/wrapq/wrappers/registry.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/circle_binary.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/circle_graph.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/circle_mapping.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/circle_serializer.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/adapters/llama_rmsnorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/adapters/onert/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/adapters/onert/llama_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/hashable_opcode.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/node_visitor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_abs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_add.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_alias_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_any.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_arange_start_step.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_argmax.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_attention.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_avg_pool2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_bitwise_and.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_bmm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_cat.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_circle_gather_nd.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_circle_shape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_clamp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_clone.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_constant_pad_nd.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_cos.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_cumsum.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_depthwise_conv2d.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_dequantize_per_channel.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_dequantize_per_tensor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_div.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_elu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_embedding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_eq.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_exp.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_expand.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_full.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_full_like.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_ge.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_gelu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_gt.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_index.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_index_select.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_instance_norm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_le.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_leaky_relu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_linear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_log.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_log1p.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_logical_and.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_logical_not.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_lt.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_max_dim.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_max_pool2d_with_indices.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_maximum.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_mean.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_minimum.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_mm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_mul.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_ne.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_neg.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_permute.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_pow.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_prelu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_quantize_per_tensor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_reciprocal.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_relu.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_relu6.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_repeat.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_reshape.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_rmsnorm.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_round.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_rsqrt.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_scalar_tensor.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_select_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_sigmoid.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_sin.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_slice.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_softmax.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_split_with_sizes.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_sqrt.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_squeeze.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_sub.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_sum.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_tanh.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_to_copy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_transpose_conv.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_unsqueeze.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_view.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/op_where.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/operators/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/pack.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/serialize/quant_param.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/compat/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/compat/torch.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/compat/torch_version_policy.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/compat/transformers.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/convert.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/define.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/diff_graph.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/dtype.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/errors.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/graph.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/installed_packages.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/logging.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/model.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/mx/__init__.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/mx/dtypes.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/mx/elemwise_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/mx/formats.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/mx/mx_ops.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/padding.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/passes.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/pytree_utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/record_input.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/register_custom_op.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/serialize.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/signature.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/trace_decorators.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/utils.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/validate_args_kwargs.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/utils/version.py +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico.egg-info/dependency_links.txt +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico.egg-info/entry_points.txt +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico.egg-info/requires.txt +0 -0
- {tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.0.dev261101"
|
|
@@ -31,7 +31,17 @@ class Concat(nn.Module):
|
|
|
31
31
|
*,
|
|
32
32
|
allow_distinct_input_qparams: bool = False,
|
|
33
33
|
) -> None:
|
|
34
|
-
"""Store the axis and
|
|
34
|
+
"""Store the axis and the quantization calibration policy.
|
|
35
|
+
|
|
36
|
+
``allow_distinct_input_qparams`` is a WrapQ calibration policy, not an
|
|
37
|
+
export contract. When it is false, ``QuantConcat`` fake-quantizes every
|
|
38
|
+
input with the shared output observer, so all branches are observed and
|
|
39
|
+
rounded in one domain. When it is true, each input keeps the domain of
|
|
40
|
+
its own producer during calibration and fake-quantized evaluation. In
|
|
41
|
+
both cases the exported Circle CONCATENATION uses one domain on all of
|
|
42
|
+
its inputs and its output; any difference is converted by an explicit
|
|
43
|
+
QUANTIZE inserted during conversion.
|
|
44
|
+
"""
|
|
35
45
|
super().__init__()
|
|
36
46
|
self.dim = int(dim)
|
|
37
47
|
self.allow_distinct_input_qparams = bool(allow_distinct_input_qparams)
|
|
@@ -44,7 +54,7 @@ class Concat(nn.Module):
|
|
|
44
54
|
return torch.cat(values, dim=self.dim)
|
|
45
55
|
|
|
46
56
|
def extra_repr(self) -> str:
|
|
47
|
-
"""Return the fixed dimension and nondefault
|
|
57
|
+
"""Return the fixed dimension and nondefault calibration policy."""
|
|
48
58
|
fields = [f"dim={self.dim}"]
|
|
49
59
|
if self.allow_distinct_input_qparams:
|
|
50
60
|
fields.append("allow_distinct_input_qparams=True")
|
|
@@ -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):
|
|
@@ -146,6 +146,9 @@ def _insert_quantize_op_after(node):
|
|
|
146
146
|
quantize.replace_input_with(quantize, node)
|
|
147
147
|
|
|
148
148
|
quantize.meta[QPARAM_KEY] = copy.deepcopy(qparam)
|
|
149
|
+
# Mirror ``_insert_quantize_op_before``: the Quantize output carries the
|
|
150
|
+
# destination storage dtype, whatever the producer's FX value dtype is.
|
|
151
|
+
quantize.meta["val"] = torch.empty_like(node.meta["val"], dtype=dtype)
|
|
149
152
|
|
|
150
153
|
return quantize
|
|
151
154
|
|
|
@@ -242,7 +245,41 @@ def _mul_handler(node, logger):
|
|
|
242
245
|
raise NotYetSupportedError("Unsupported dtype")
|
|
243
246
|
|
|
244
247
|
|
|
248
|
+
def _same_domain(lhs: QuantParam, rhs: QuantParam) -> bool:
|
|
249
|
+
"""Return whether two qparams describe one integer grid.
|
|
250
|
+
|
|
251
|
+
The grid is defined by the storage dtype, scale, zero point and the
|
|
252
|
+
granularity axis. Observer ``min``/``max`` statistics are metadata and must
|
|
253
|
+
not trigger a conversion. Scales compare exactly: an approximate match
|
|
254
|
+
would silently skip a conversion the backend requires.
|
|
255
|
+
"""
|
|
256
|
+
return (
|
|
257
|
+
lhs.dtype == rhs.dtype
|
|
258
|
+
and lhs.scale == rhs.scale
|
|
259
|
+
and lhs.zero_point == rhs.zero_point
|
|
260
|
+
and lhs.quantized_dimension == rhs.quantized_dimension
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
|
|
245
264
|
def _cat_handler(node, logger):
|
|
265
|
+
"""Make every CONCATENATION input and output share one quantization domain.
|
|
266
|
+
|
|
267
|
+
Circle CONCATENATION copies integer codes, so a backend expects identical
|
|
268
|
+
qparams on all of its inputs and its output. Any domain change is made
|
|
269
|
+
explicit with a per-tensor Quantize, regardless of the concat axis or the
|
|
270
|
+
module that produced the concat:
|
|
271
|
+
|
|
272
|
+
* identical input and output domains: nothing is inserted;
|
|
273
|
+
* every input shares domain ``A`` and the output requests ``B``: the
|
|
274
|
+
concat runs in ``A`` and one Quantize converts its output to ``B``;
|
|
275
|
+
* distinct input domains: each input connection whose domain differs from
|
|
276
|
+
the output domain gets a Quantize to that domain. Producers keep their
|
|
277
|
+
own domain, including graph inputs, graph outputs and tensors shared
|
|
278
|
+
with other consumers, and a repeated operand reuses one conversion.
|
|
279
|
+
|
|
280
|
+
An input that is itself a requantization keeps that earlier rounding step;
|
|
281
|
+
the new Quantize is chained after it instead of retargeting it.
|
|
282
|
+
"""
|
|
246
283
|
cat_args = CatArgs(*node.args, **node.kwargs)
|
|
247
284
|
tensors = cat_args.tensors
|
|
248
285
|
|
|
@@ -253,58 +290,52 @@ def _cat_handler(node, logger):
|
|
|
253
290
|
return
|
|
254
291
|
|
|
255
292
|
assert len(tensors) > 0
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
)
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
)
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
# producers may be graph inputs, graph outputs, or shared with other ops.
|
|
284
|
-
for inp in dict.fromkeys(tensors):
|
|
285
|
-
source = inp.meta[QPARAM_KEY]
|
|
286
|
-
if (
|
|
287
|
-
source.dtype != destination.dtype
|
|
288
|
-
or source.scale != destination.scale
|
|
289
|
-
or source.zero_point != destination.zero_point
|
|
290
|
-
):
|
|
291
|
-
_insert_quantize_op_before(node, inp)
|
|
292
|
-
logger.debug(
|
|
293
|
-
f"quantize_per_tensor.default is inserted before {node.name}."
|
|
294
|
-
)
|
|
295
|
-
return
|
|
296
|
-
|
|
297
|
-
if in_dtype == qparam_dtype(node):
|
|
298
|
-
return
|
|
299
|
-
|
|
300
|
-
if in_dtype == "int16" and qparam_dtype(node) == "uint8":
|
|
301
|
-
quantize = _insert_quantize_op_after(node)
|
|
293
|
+
destination: QuantParam = node.meta[QPARAM_KEY]
|
|
294
|
+
sources = [x.meta[QPARAM_KEY] for x in tensors]
|
|
295
|
+
if all(_same_domain(source, destination) for source in sources):
|
|
296
|
+
return
|
|
297
|
+
|
|
298
|
+
qparams = sources + [destination]
|
|
299
|
+
# Preserve the existing treatment of incompletely annotated concats,
|
|
300
|
+
# including MX domains that carry no affine scale.
|
|
301
|
+
if any(
|
|
302
|
+
not qparam.dtype or qparam.scale is None or qparam.zero_point is None
|
|
303
|
+
for qparam in qparams
|
|
304
|
+
):
|
|
305
|
+
return
|
|
306
|
+
|
|
307
|
+
if any(
|
|
308
|
+
qparam.dtype not in ("uint8", "int16")
|
|
309
|
+
or qparam.quantized_dimension is not None
|
|
310
|
+
or len(qparam.scale) != 1
|
|
311
|
+
or len(qparam.zero_point) != 1
|
|
312
|
+
for qparam in qparams
|
|
313
|
+
):
|
|
314
|
+
raise NotYetSupportedError(
|
|
315
|
+
f"Unsupported distinct-domain concat {node.name}: "
|
|
316
|
+
f"inputs={[qparam_dtype(x) for x in tensors]}, "
|
|
317
|
+
f"output={destination.dtype}. "
|
|
318
|
+
"Only per-tensor affine uint8/int16 qparams are supported."
|
|
319
|
+
)
|
|
302
320
|
|
|
303
|
-
|
|
304
|
-
|
|
321
|
+
first = sources[0]
|
|
322
|
+
if all(_same_domain(source, first) for source in sources[1:]):
|
|
323
|
+
# Every input already shares one grid. Concatenate in that grid and
|
|
324
|
+
# requantize the whole result once at the output boundary.
|
|
325
|
+
quantize = _insert_quantize_op_after(node)
|
|
326
|
+
quantize.meta[QPARAM_KEY] = copy.deepcopy(destination)
|
|
327
|
+
node.meta[QPARAM_KEY] = copy.deepcopy(first)
|
|
305
328
|
logger.debug(f"quantize_per_tensor.default is inserted after {node.name}.")
|
|
306
|
-
|
|
307
|
-
|
|
329
|
+
return
|
|
330
|
+
|
|
331
|
+
# Normalize to the intended output grid. Convert only this consumer's
|
|
332
|
+
# connections: producers may be graph inputs, graph outputs, or shared
|
|
333
|
+
# with other operators. ``replace_input_with`` rewires every occurrence of
|
|
334
|
+
# a repeated operand to the same Quantize.
|
|
335
|
+
for inp in dict.fromkeys(tensors):
|
|
336
|
+
if not _same_domain(inp.meta[QPARAM_KEY], destination):
|
|
337
|
+
_insert_quantize_op_before(node, inp)
|
|
338
|
+
logger.debug(f"quantize_per_tensor.default is inserted before {node.name}.")
|
|
308
339
|
|
|
309
340
|
|
|
310
341
|
def _bmm_handler(node, logger):
|
|
@@ -473,6 +504,11 @@ class InsertQuantizeOnDtypeMismatch(PassBase):
|
|
|
473
504
|
Comparing 1) and 2), the difference is that Reshape operation is conducted in uint8 or int16.
|
|
474
505
|
We go with 1), which does Reshape in uint8, for faster execution. Note that Reshape Op does not
|
|
475
506
|
change the value, so its dytpe does not affect accuracy.
|
|
507
|
+
|
|
508
|
+
For ``aten.cat`` the same mechanism legalizes every quantization-domain
|
|
509
|
+
mismatch, not only dtype changes: a Circle CONCATENATION must use one
|
|
510
|
+
scale, zero point and dtype on all of its inputs and its output. See
|
|
511
|
+
``_cat_handler`` for the input-connection and output-boundary rules.
|
|
476
512
|
"""
|
|
477
513
|
|
|
478
514
|
def __init__(self):
|
{tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/propagate_qparam_backward.py
RENAMED
|
@@ -22,7 +22,6 @@ import math
|
|
|
22
22
|
import torch
|
|
23
23
|
from torch.export import ExportedProgram
|
|
24
24
|
|
|
25
|
-
from tico.quantization.passes.concat_qparam import is_width_direction_concat
|
|
26
25
|
from tico.quantization.passes.mx_qparam import remap_mx_qparam
|
|
27
26
|
from tico.quantization.passes.remove_weight_dequant_op import infer_dtype
|
|
28
27
|
from tico.serialize.quant_param import QPARAM_KEY, QuantParam
|
|
@@ -45,6 +44,12 @@ def _retarget_affine_per_tensor_quantize(
|
|
|
45
44
|
"""Retarget a private Quantize boundary without changing its source domain."""
|
|
46
45
|
if len(dst.users) != 1 or src not in dst.users:
|
|
47
46
|
return
|
|
47
|
+
# Folding has already proven this to be a genuine requantization when
|
|
48
|
+
# its tensor input has a domain. Retargeting it would remove an earlier
|
|
49
|
+
# rounding/clamping step, even if it has just one consumer.
|
|
50
|
+
tensor = dst.args[0] if dst.args else dst.kwargs.get("input")
|
|
51
|
+
if isinstance(tensor, torch.fx.Node) and QPARAM_KEY in tensor.meta:
|
|
52
|
+
return
|
|
48
53
|
|
|
49
54
|
qparam = src.meta.get(QPARAM_KEY)
|
|
50
55
|
if not isinstance(qparam, QuantParam):
|
|
@@ -170,10 +175,10 @@ class PropagateQParamBackward(PassBase):
|
|
|
170
175
|
logger.debug(f"{src.name}'s MX quantparam is remapped to {dst.name}.")
|
|
171
176
|
return
|
|
172
177
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
178
|
+
# Producers own their existing domain, including when scale/ZP
|
|
179
|
+
# differ with the same storage dtype. Normalize consumer edges
|
|
180
|
+
# explicitly instead of changing this producer and all its users.
|
|
181
|
+
if QPARAM_KEY in dst.meta:
|
|
177
182
|
return
|
|
178
183
|
|
|
179
184
|
dst.meta[QPARAM_KEY] = copy.deepcopy(src_qparam)
|
|
@@ -186,15 +191,10 @@ class PropagateQParamBackward(PassBase):
|
|
|
186
191
|
continue
|
|
187
192
|
if node.target == torch.ops.aten.cat.default:
|
|
188
193
|
concat_args = CatArgs(*node.args, **node.kwargs)
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
node_qparam is None or not is_mx_dtype(node_qparam.dtype)
|
|
194
|
-
):
|
|
195
|
-
continue
|
|
196
|
-
|
|
197
|
-
for concat_input in concat_inputs:
|
|
194
|
+
# Only inputs without a domain inherit the concat domain.
|
|
195
|
+
# Established producer domains stay independent and are
|
|
196
|
+
# converted explicitly by InsertQuantizeOnDtypeMismatch.
|
|
197
|
+
for concat_input in concat_args.tensors:
|
|
198
198
|
_propagate_qparam_if_possible(node, concat_input)
|
|
199
199
|
elif node.target == torch.ops.aten.reshape.default:
|
|
200
200
|
args = ReshapeArgs(*node.args, **node.kwargs)
|
{tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/tico/quantization/passes/propagate_qparam_forward.py
RENAMED
|
@@ -22,7 +22,6 @@ import operator
|
|
|
22
22
|
import torch
|
|
23
23
|
from torch.export import ExportedProgram
|
|
24
24
|
|
|
25
|
-
from tico.quantization.passes.concat_qparam import is_width_direction_concat
|
|
26
25
|
from tico.quantization.passes.mx_qparam import remap_mx_qparam
|
|
27
26
|
from tico.serialize.quant_param import QPARAM_KEY
|
|
28
27
|
from tico.utils import logging
|
|
@@ -100,10 +99,9 @@ class PropagateQParamForward(PassBase):
|
|
|
100
99
|
logger.debug(f"{src.name}'s MX quantparam is remapped to {dst.name}.")
|
|
101
100
|
return
|
|
102
101
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
):
|
|
102
|
+
# An established destination domain is not an invitation to
|
|
103
|
+
# overwrite scale/ZP merely because the storage dtype agrees.
|
|
104
|
+
if QPARAM_KEY in dst.meta:
|
|
107
105
|
return
|
|
108
106
|
|
|
109
107
|
dst.meta[QPARAM_KEY] = copy.deepcopy(src_qparam)
|
|
@@ -186,9 +184,9 @@ class PropagateQParamForward(PassBase):
|
|
|
186
184
|
_propagate_qparam_if_possible(mx_source, node)
|
|
187
185
|
continue
|
|
188
186
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
# Inference only fills a missing output domain. An established
|
|
188
|
+
# output domain is preserved and legalized against the input
|
|
189
|
+
# domains by InsertQuantizeOnDtypeMismatch.
|
|
192
190
|
if any(
|
|
193
191
|
QPARAM_KEY not in concat_input.meta
|
|
194
192
|
for concat_input in concat_inputs
|
{tico-0.4.0.dev261028 → tico-0.4.0.dev261101}/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()
|