tico 0.4.0.dev261101__tar.gz → 0.4.0.dev261102__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/PKG-INFO +1 -1
- tico-0.4.0.dev261102/tico/_version.py +1 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/adapters/gemma4.py +50 -0
- tico-0.4.0.dev261102/tico/quantization/recipes/evaluation/cached_nll.py +440 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_text_attention.py +143 -9
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico.egg-info/PKG-INFO +1 -1
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico.egg-info/SOURCES.txt +1 -0
- tico-0.4.0.dev261101/tico/_version.py +0 -1
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/LICENSE +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/README.md +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/pyproject.toml +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/setup.cfg +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/_buffer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/_object.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/_schema.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/analysis/effects.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/analysis/purity.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/analysis/structural_hash.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/analysis/tensor_contract.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/builder.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/cli/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/cli/__main__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/cli/main.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/document.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/errors.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/export.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/graph.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/inspect/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/inspect/printer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/inspect/summary.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/io.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/mutation.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/operations/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/operations/extract.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/base.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/cleanup/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/cleanup/compact_indices.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/cleanup/dead_code_elimination.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/cleanup/graph_inputs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/manager.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/_pattern_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/canonicalize/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/canonicalize/equivalent_ops.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/compatibility/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/compatibility/custom_ops.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/compatibility/fc_gelu_fc.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/cse.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fold/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fold/constant_subgraph.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fold/evaluators/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fold/evaluators/base.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fold/evaluators/elementwise.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fold/evaluators/heavy.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fold/evaluators/indexing.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fold/evaluators/shape.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fold/profiles.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fuse/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fuse/activation.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fuse/composite.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fuse/linear.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fuse/requantize.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/fuse/spatial.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/legalize/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/legalize/dynamic_fully_connected.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/policy.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/simplify/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/simplify/_layout_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/simplify/arithmetic.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/simplify/identity_ops.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/simplify/reductions.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/simplify/transpose_region.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/simplify/transpose_region_rules.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/optimization/simplify/views.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/presets.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/rules.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/passes/worklist.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/rewrite.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/errors.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/executor.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/kernels/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/kernels/base.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/kernels/elementwise.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/kernels/nn.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/kernels/quantize.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/kernels/reduction.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/kernels/shape_ops.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/program.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/runtime/quantization.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/selector.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/session.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/value/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/value/codec.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/value/dtype.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/value/tensor.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/circle/verify.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/config/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/config/base.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/config/factory.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/config/v1.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/experimental/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/interpreter/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/interpreter/backends.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/interpreter/infer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/interpreter/interpreter.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/ops/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/ops/concat.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/ops/resize_bilinear.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/ops/same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/cast_aten_where_arg_type.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/cast_clamp_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/cast_mixed_type_args.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/const_prop_pass.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/convert_conv1d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/convert_conv3d_to_conv2d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/convert_expand_to_slice_cat.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/convert_gather_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/convert_layout_op_to_reshape.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/convert_matmul_to_linear.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/convert_repeat_to_expand_copy.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/convert_sym_size_to_circle_shape.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/convert_to_relu6.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/decompose_addmm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/decompose_batch_norm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/decompose_fake_quantize.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/decompose_fake_quantize_tensor_qparams.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/decompose_group_norm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/decompose_grouped_conv2d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/decompose_slice_scatter.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/eliminate_rank_round_trip_region.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/extract_dtype_kwargs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/fill_meta_val.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/fuse_leading_unsqueeze_reshape.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/fuse_redundant_reshape_to_mean.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/legalize_causal_mask_value.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/legalize_predefined_layout_operators.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/lower_copy.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/lower_multi_index_to_gather_nd.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/lower_pow2_to_mul.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/lower_to_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/lower_to_slice.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/merge_consecutive_cat.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/ops.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/remove_empty_cat_inputs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/remove_nop.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/remove_redundant_assert_nodes.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/remove_redundant_expand.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/remove_redundant_permute.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/remove_redundant_reshape.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/remove_redundant_slice.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/remove_redundant_to_copy.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/remove_unused_placeholder.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/restore_linear.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/passes/segment_index_select.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/pt2_to_circle.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/adaround/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/adaround/discrete_refinement.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/adaround/global_refinement.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/adaround/joint.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/adaround/joint_runner.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/adaround/rounding.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/adaround/runner.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/adaround/screened_refinement.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/block_reconstruction/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/block_reconstruction/cache.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/block_reconstruction/multistart.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/block_reconstruction/observer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/block_reconstruction/qdrop.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/block_reconstruction/runner.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/block_reconstruction/selection.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/cle/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/cle/cle.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/cle/quantizer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/fpi_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/fpi_gptq/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/fpi_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/fpi_gptq/util.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/gemma4_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/gemma4_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/gemma4_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/gemma4_gptq/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/gptq/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/gptq/gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/gptq/quant.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/gptq/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/qwen3_vl_gptq/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/qwen3_vl_gptq/gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/qwen3_vl_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/qwen3_vl_gptq/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/smoothquant/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/smoothquant/observer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/smoothquant/quantizer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/smoothquant/smooth_quant.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/spinquant/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/spinquant/fuse_norm_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/spinquant/hadamard_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/spinquant/quantizer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/spinquant/qwen3_vl_model_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/spinquant/qwen3_vl_quantizer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/spinquant/qwen3_vl_rotation_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/spinquant/rotation_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/spinquant/spin_llama.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/spinquant/spin_qwen3_vl.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/algorithm/universal_gptq/quantizer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/analysis/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/analysis/ablation.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/analysis/clipping.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/analysis/inputs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/analysis/metrics.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/analysis/output_quantization.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/analysis/outputs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/analysis/profile.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/analysis/report.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/analysis/selector.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/analysis/sensitivity.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/base.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/builders.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/cle.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/fpi_gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/gemma4_assistant_builders.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/gemma4_attention.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/gemma4_builders.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/gemma4_gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/llama_attention.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/ptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/qwen3_vl_attention.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/qwen3_vl_gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/qwen3_vl_spinquant.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/smoothquant.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/specs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/spinquant.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/config/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/backend.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/evaluate.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/executor/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/executor/backend_executor.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/executor/circle_executor.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/executor/triv24_executor.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/hellaswag_eval_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/llava_bench_judge_eval_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/lmms_eval_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/lmms_gemma4.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/lmms_tasks/videomme_mini/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/metric.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/mmlu_eval_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/mmmu_eval_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/optional_deps.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/script/llm_tasks_eval.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/script/mini_vqa_eval.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/vlm_eval_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/evaluation/vlm_generation_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/examples/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/examples/compare_side_by_side.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/examples/configs/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/examples/evaluate.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/examples/export.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/examples/generate.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/examples/inspector.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/examples/quantize.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/passes/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/passes/fold_quant_ops.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/passes/insert_quantize_on_dtype_mismatch.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/passes/legalize_quantized_clamp.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/passes/mx_qparam.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/passes/propagate_qparam_backward.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/passes/propagate_qparam_forward.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/passes/qparam_safe_const_prop.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/passes/quantize_bias.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/passes/remove_weight_dequant_op.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/public_interface.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/quant_stub.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/quantizer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/quantizer_registry.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/adapters/base.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/adapters/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/adapters/llama.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/adapters/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/config.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/context.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/data/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/data/dataset_config.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/data/dataset_usage.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/data/llm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/data/vlm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/cpu_fixtures.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/cpu_static_cache.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/cpu_validation.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/export_regression.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/static_gemma4_assistant_runtime.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/static_gemma4_runtime.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/static_llama_runtime.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/static_qwen3_vl_runtime.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/tied_embedding.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/token_mask.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/trace.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/verify_llama_rope.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/case.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/cases/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/cases/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/cases/llama.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/cases/nn.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/cases/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/registry.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/result.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/runner.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/debug/wrapper_smoke/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/evaluation/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/evaluation/eager.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/evaluation/hellaswag.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/evaluation/llava_bench.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/evaluation/llava_bench_judge.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/evaluation/llm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/evaluation/mmlu.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/evaluation/mmmu.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/evaluation/selection.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/evaluation/video_mme.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/evaluation/vlm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/export/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/export/checkpoint.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/export/circle.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/export/gemma4.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/export/gemma4_assistant.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/export/llama.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/export/llama_bundle.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/export/qwen3_vl.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/extensions.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/override_policies.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/qparams.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/runner.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/runtime/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/runtime/llama.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/sequence_length.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/stages/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/stages/base.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/stages/cle.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/stages/gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/stages/ptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/stages/smoothquant.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/stages/spinquant.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/recipes/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/control.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/dtypes.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/compare_ppl.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/debug_quant_outputs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/evaluate_fk_llama_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/gemma4/quantize_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/gemma4/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/gemma4/quantize_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/gemma4/quantize_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/gemma4/quantize_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/gemma4/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/gemma4/quantize_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/gemma4/quantize_vision_pooler.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/llama/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/llama/quantize_attention_decode.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/llama/quantize_attention_prefill.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_decode.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/llama/quantize_decoder_layer_prefill.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/llama/quantize_mlp.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/nn/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/nn/quantize_conv3d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/nn/quantize_conv3d_special_case.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/nn/quantize_layernorm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/nn/quantize_linear.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/nn/quantize_tied_embedding.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/quantize_full_qmodel_with_gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/quantize_qwen3_vl_with_gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/quantize_with_gptq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_text_attention.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_text_mlp.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_text_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_vision_attention.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_vision_block.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_vision_mlp.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_vision_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/quantize_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/qwen/trace_qwen.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/examples/static_llama_layer_runtime.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/lifecycle.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/mode.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/observers/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/observers/affine_base.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/observers/base.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/observers/ema.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/observers/identity.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/observers/minmax.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/observers/mx.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/observers/percentile.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/qscheme.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/quantizer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/utils/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/utils/check_missing_qparam.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/utils/introspection.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/utils/linear_folding.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/utils/metrics.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/utils/reduce_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/utils/static_export.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/utils/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/utils/version.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrap_helper.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/fairseq/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/fairseq/decoder_export_single_step.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/fairseq/quant_decoder_layer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/fairseq/quant_encoder_layer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/fairseq/quant_mha.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/embedding_scale_fusion.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/export_adapters.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/ple_embedding_host.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_clippable_linear.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_multimodal_embedder.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_text_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_text_scaled_word_embedding.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_encoder_layer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_patch_embedder.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/quant_vision_pooler.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/rope.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/static_vision_profile.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4/vision_split_export.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4_assistant/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4_assistant/export_adapters.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_backbone.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4_assistant/quant_masked_embedder.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4_assistant/sparse_head.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4_assistant/static_inputs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/gemma4_assistant/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/llama/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/llama/export_adapters.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/llama/position.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/llama/quant_attention.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/llama/quant_decoder_layer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/llama/quant_mlp.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/llama/quant_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/llama/quant_model_for_causal_lm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/llama/static_inputs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/nn/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/nn/quant_conv2d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/nn/quant_conv3d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/nn/quant_conv3d_decomposed.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/nn/quant_conv_transpose2d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/nn/quant_embedding.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/nn/quant_layernorm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/nn/quant_linear.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/nn/quant_maxpool2d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/nn/quant_prelu.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/nn/quant_silu.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/ops/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/ops/quant_concat.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/ops/quant_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/ops/quant_rmsnorm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/ops/quant_same_padding_conv2d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/ptq_wrapper.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/quant_elementwise.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/quant_module_base.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/quant_stub.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/export_adapters.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_for_conditional_generation.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_attention.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_decoder_layer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_mlp.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_text_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_attention.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_block.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_mlp.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_embed.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/quant_vision_patch_merger.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/static_inputs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/qwen_vl/vision_profile.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/quantization/wrapq/wrappers/registry.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/circle_binary.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/circle_graph.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/circle_mapping.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/circle_serializer.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/adapters/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/adapters/llama_rmsnorm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/adapters/onert/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/adapters/onert/llama_attention.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/hashable_opcode.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/node_visitor.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_abs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_add.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_alias_copy.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_any.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_arange_start_step.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_argmax.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_attention.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_avg_pool2d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_bitwise_and.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_bmm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_cat.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_circle_gather_nd.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_circle_shape.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_clamp.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_clone.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_constant_pad_nd.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_conv2d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_cos.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_cumsum.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_depthwise_conv2d.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_dequantize_per_channel.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_dequantize_per_tensor.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_div.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_elu.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_embedding.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_eq.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_exp.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_expand.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_full.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_full_like.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_ge.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_gelu.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_gt.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_index.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_index_select.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_instance_norm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_le.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_leaky_relu.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_linear.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_log.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_log1p.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_logical_and.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_logical_not.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_lt.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_max_dim.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_max_pool2d_with_indices.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_maximum.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_mean.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_minimum.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_mm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_mul.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_ne.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_neg.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_permute.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_pow.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_prelu.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_quantize_per_tensor.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_reciprocal.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_relu.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_relu6.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_repeat.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_reshape.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_resize_bilinear.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_resize_nearest_neighbor.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_rmsnorm.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_round.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_rsqrt.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_scalar_tensor.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_select_copy.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_sigmoid.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_sin.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_slice.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_softmax.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_split_with_sizes.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_sqrt.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_squeeze.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_sub.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_sum.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_tanh.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_to_copy.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_transpose_conv.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_unsqueeze.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_view.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/op_where.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/operators/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/pack.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/serialize/quant_param.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/compat/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/compat/torch.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/compat/torch_version_policy.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/compat/transformers.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/convert.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/define.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/diff_graph.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/dtype.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/errors.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/graph.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/installed_packages.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/logging.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/model.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/mx/__init__.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/mx/dtypes.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/mx/elemwise_ops.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/mx/formats.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/mx/mx_ops.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/padding.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/passes.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/pytree_utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/record_input.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/register_custom_op.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/serialize.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/signature.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/trace_decorators.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/utils.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/validate_args_kwargs.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico/utils/version.py +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico.egg-info/dependency_links.txt +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico.egg-info/entry_points.txt +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico.egg-info/requires.txt +0 -0
- {tico-0.4.0.dev261101 → tico-0.4.0.dev261102}/tico.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.0.dev261102"
|
|
@@ -27,6 +27,11 @@ from tico.quantization.recipes.adapters.base import ModelAdapter
|
|
|
27
27
|
from tico.quantization.recipes.config import stage_name_matches
|
|
28
28
|
from tico.quantization.recipes.context import RecipeContext
|
|
29
29
|
from tico.quantization.recipes.data.vlm import build_vlm_calibration_inputs
|
|
30
|
+
from tico.quantization.recipes.evaluation.cached_nll import (
|
|
31
|
+
CachedNLLProtocol,
|
|
32
|
+
evaluate_text_cached_nll,
|
|
33
|
+
print_cached_nll_results,
|
|
34
|
+
)
|
|
30
35
|
from tico.quantization.recipes.evaluation.eager import prepare_eager_evaluation
|
|
31
36
|
from tico.quantization.recipes.evaluation.hellaswag import evaluate_and_print_hellaswag
|
|
32
37
|
from tico.quantization.recipes.evaluation.llava_bench import run_llava_bench_evaluation
|
|
@@ -108,6 +113,7 @@ class Gemma4Adapter(ModelAdapter):
|
|
|
108
113
|
"hellaswag",
|
|
109
114
|
"mmmu",
|
|
110
115
|
"ppl",
|
|
116
|
+
"cached_nll",
|
|
111
117
|
}
|
|
112
118
|
)
|
|
113
119
|
evaluation_target_requirements = {"vqa": "vlm_tasks"}
|
|
@@ -839,6 +845,50 @@ class Gemma4Adapter(ModelAdapter):
|
|
|
839
845
|
f"({ppl_cfg.get('dataset', 'wikitext2')}): {ppl_value:.2f}"
|
|
840
846
|
)
|
|
841
847
|
|
|
848
|
+
if should_run_mapping_evaluation(eval_cfg, "cached_nll"):
|
|
849
|
+
self._evaluate_cached_nll(ctx, max_seq_len=max_seq_len)
|
|
850
|
+
|
|
851
|
+
def _evaluate_cached_nll(self, ctx: RecipeContext, *, max_seq_len: int) -> None:
|
|
852
|
+
"""Score held-out chunks through real prefill and cached decode."""
|
|
853
|
+
eval_cfg = ctx.cfg.get("evaluation", {})
|
|
854
|
+
cfg = get_mapping_evaluation_config(eval_cfg, "cached_nll")
|
|
855
|
+
mode = str(cfg.get("mode", "chat-prefix")).lower()
|
|
856
|
+
if mode not in {"raw", "chat-prefix"}:
|
|
857
|
+
raise ValueError(
|
|
858
|
+
f"Unsupported cached_nll mode: {mode!r}. Must be 'raw' or 'chat-prefix'."
|
|
859
|
+
)
|
|
860
|
+
protocol = CachedNLLProtocol(
|
|
861
|
+
prefix_tokens=int(cfg.get("prefix_tokens", 512)),
|
|
862
|
+
target_tokens=int(cfg.get("target_tokens", 256)),
|
|
863
|
+
n_chunks=int(cfg.get("n_chunks", 16)),
|
|
864
|
+
start_offset=int(cfg.get("start_offset", 0)),
|
|
865
|
+
chat_prefix=mode == "chat-prefix",
|
|
866
|
+
)
|
|
867
|
+
# The helper checks H + P + T <= max_seq_len with the actual chat-prefix
|
|
868
|
+
# token count before the first forward; no separate P + T check here.
|
|
869
|
+
results = evaluate_text_cached_nll(
|
|
870
|
+
model=ctx.model,
|
|
871
|
+
processor_or_tokenizer=ctx.processor,
|
|
872
|
+
dataset_name=str(cfg.get("dataset", "wikitext2")),
|
|
873
|
+
split=str(cfg.get("split", "test")),
|
|
874
|
+
protocol=protocol,
|
|
875
|
+
device=str(ctx.device),
|
|
876
|
+
max_seq_len=int(max_seq_len),
|
|
877
|
+
show_progress=bool(ctx.cfg.get("runtime", {}).get("show_progress", True)),
|
|
878
|
+
)
|
|
879
|
+
print_cached_nll_results(results)
|
|
880
|
+
ctx.artifacts["cached_nll"] = results
|
|
881
|
+
output_json = cfg.get("output_json")
|
|
882
|
+
if output_json:
|
|
883
|
+
import json
|
|
884
|
+
|
|
885
|
+
path = Path(str(output_json))
|
|
886
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
887
|
+
# Exclusive creation: FP and each quantized variant get their own file.
|
|
888
|
+
with path.open("x", encoding="utf-8") as handle:
|
|
889
|
+
json.dump(results, handle, indent=2, sort_keys=True)
|
|
890
|
+
print(f"Saved cached NLL results to {path.resolve()}")
|
|
891
|
+
|
|
842
892
|
def export(self, ctx: RecipeContext) -> None:
|
|
843
893
|
"""Export configured Gemma4 E2B artifacts."""
|
|
844
894
|
export_cfg = ctx.cfg.get("export", {})
|
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
# Copyright (c) 2026 Samsung Electronics Co., Ltd. All Rights Reserved
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""Teacher-forced cached-decode NLL/PPL on fixed held-out token chunks.
|
|
16
|
+
|
|
17
|
+
The existing perplexity helpers score every window with one uncached forward.
|
|
18
|
+
That never exercises the past-KV read path whose quantization policy a cached
|
|
19
|
+
deployment depends on. This helper scores each chunk the way a cached runtime
|
|
20
|
+
would produce it:
|
|
21
|
+
|
|
22
|
+
1. The prefix is prefilled once with ``use_cache=True``. Its last logit scores
|
|
23
|
+
the first target token; the remaining prefix logits give a separate
|
|
24
|
+
prefill-only score.
|
|
25
|
+
2. Each target token is then fed one at a time through the returned cache.
|
|
26
|
+
The logit of step ``t`` scores target ``t + 1``, so ``T`` targets need
|
|
27
|
+
``T - 1`` decode steps and the final target is never fed.
|
|
28
|
+
|
|
29
|
+
Every chunk is a contiguous, non-overlapping token span of the same corpus
|
|
30
|
+
stream, so no token is scored twice and all variants see identical targets.
|
|
31
|
+
|
|
32
|
+
Context budget: with ``H`` chat-prefix tokens (0 in raw mode), ``P`` prefix
|
|
33
|
+
tokens and ``T`` targets, a chunk is accepted only when ``H + P + T <= M`` for
|
|
34
|
+
the resolved evaluation context ``M``. The true peak input/cache length is
|
|
35
|
+
``H + P + T - 1`` because the final target is never fed back, but the budget
|
|
36
|
+
deliberately keeps the whole-chunk contract and merely adds the previously
|
|
37
|
+
missing ``H``; the one-token slack is intentional.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
from __future__ import annotations
|
|
41
|
+
|
|
42
|
+
import math
|
|
43
|
+
from dataclasses import asdict, dataclass
|
|
44
|
+
from typing import Any, Iterable, Mapping, Optional
|
|
45
|
+
|
|
46
|
+
import torch
|
|
47
|
+
import torch.nn.functional as F
|
|
48
|
+
import tqdm
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@dataclass(frozen=True)
|
|
52
|
+
class CachedNLLProtocol:
|
|
53
|
+
"""Fixed scoring budget shared by every model under comparison."""
|
|
54
|
+
|
|
55
|
+
prefix_tokens: int
|
|
56
|
+
target_tokens: int
|
|
57
|
+
n_chunks: int
|
|
58
|
+
start_offset: int = 0
|
|
59
|
+
chat_prefix: bool = True
|
|
60
|
+
|
|
61
|
+
def __post_init__(self) -> None:
|
|
62
|
+
if self.prefix_tokens < 1:
|
|
63
|
+
raise ValueError("prefix_tokens must be positive.")
|
|
64
|
+
if self.target_tokens < 1:
|
|
65
|
+
raise ValueError("target_tokens must be positive.")
|
|
66
|
+
if self.n_chunks < 1:
|
|
67
|
+
raise ValueError("n_chunks must be positive.")
|
|
68
|
+
if self.start_offset < 0:
|
|
69
|
+
raise ValueError("start_offset must be non-negative.")
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def span(self) -> int:
|
|
73
|
+
return self.prefix_tokens + self.target_tokens
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def chunk_token_ranges(
|
|
77
|
+
sequence_length: int, protocol: CachedNLLProtocol
|
|
78
|
+
) -> list[tuple[int, int]]:
|
|
79
|
+
"""Return ``n_chunks`` contiguous, non-overlapping ``[begin, end)`` ranges."""
|
|
80
|
+
ranges = [
|
|
81
|
+
(protocol.start_offset + index * protocol.span,)
|
|
82
|
+
for index in range(protocol.n_chunks)
|
|
83
|
+
]
|
|
84
|
+
needed = protocol.start_offset + protocol.n_chunks * protocol.span
|
|
85
|
+
if needed > sequence_length:
|
|
86
|
+
raise ValueError(
|
|
87
|
+
"Corpus is too short for the cached NLL protocol: "
|
|
88
|
+
f"{needed} tokens required (start_offset={protocol.start_offset}, "
|
|
89
|
+
f"n_chunks={protocol.n_chunks}, span={protocol.span}), "
|
|
90
|
+
f"got {sequence_length}."
|
|
91
|
+
)
|
|
92
|
+
return [(begin, begin + protocol.span) for (begin,) in ranges]
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def _logits(outputs: Any, expected_positions: int) -> torch.Tensor:
|
|
96
|
+
logits = getattr(outputs, "logits", None)
|
|
97
|
+
if logits is None:
|
|
98
|
+
raise RuntimeError("Model output does not contain logits.")
|
|
99
|
+
if (
|
|
100
|
+
logits.ndim != 3
|
|
101
|
+
or logits.shape[0] != 1
|
|
102
|
+
or logits.shape[1] != expected_positions
|
|
103
|
+
):
|
|
104
|
+
raise RuntimeError(
|
|
105
|
+
f"Expected logits shaped [1, {expected_positions}, V], "
|
|
106
|
+
f"got {tuple(logits.shape)}."
|
|
107
|
+
)
|
|
108
|
+
return logits.float()
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def _cache(outputs: Any, expected_length: int) -> Any:
|
|
112
|
+
"""Require a real growing cache; an uncached forward cannot stand in."""
|
|
113
|
+
cache = getattr(outputs, "past_key_values", None)
|
|
114
|
+
get_length = getattr(cache, "get_seq_length", None)
|
|
115
|
+
if not callable(get_length) or int(get_length()) != expected_length:
|
|
116
|
+
raise RuntimeError(
|
|
117
|
+
"Cached NLL requires past_key_values with cache length "
|
|
118
|
+
f"{expected_length}; the model did not return a valid cache."
|
|
119
|
+
)
|
|
120
|
+
return cache
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def _token_nll(logits: torch.Tensor, targets: torch.Tensor) -> torch.Tensor:
|
|
124
|
+
"""Return per-token NLL in float64 for ``logits[i]`` predicting ``targets[i]``."""
|
|
125
|
+
if logits.shape[0] != targets.shape[0]:
|
|
126
|
+
raise RuntimeError("Logit/target alignment mismatch.")
|
|
127
|
+
if targets.numel() == 0:
|
|
128
|
+
return torch.zeros((0,), dtype=torch.float64, device=logits.device)
|
|
129
|
+
return F.cross_entropy(logits, targets, reduction="none").to(torch.float64)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def score_cached_chunk(
|
|
133
|
+
model: torch.nn.Module,
|
|
134
|
+
*,
|
|
135
|
+
context_ids: torch.Tensor,
|
|
136
|
+
prefix_ids: torch.Tensor,
|
|
137
|
+
target_ids: torch.Tensor,
|
|
138
|
+
device: torch.device,
|
|
139
|
+
) -> dict[str, Any]:
|
|
140
|
+
"""Score one chunk with a prefill and ``T - 1`` cached decode steps.
|
|
141
|
+
|
|
142
|
+
``context_ids`` are unscored template tokens (may be empty); ``prefix_ids``
|
|
143
|
+
are corpus tokens scored by the prefill logits only; ``target_ids`` are the
|
|
144
|
+
``T`` corpus tokens scored through the cache.
|
|
145
|
+
"""
|
|
146
|
+
for name, ids in (
|
|
147
|
+
("context_ids", context_ids),
|
|
148
|
+
("prefix_ids", prefix_ids),
|
|
149
|
+
("target_ids", target_ids),
|
|
150
|
+
):
|
|
151
|
+
if ids.ndim != 1 or ids.dtype not in (torch.int32, torch.int64):
|
|
152
|
+
raise ValueError(f"{name} must be a 1-D integer tensor.")
|
|
153
|
+
if prefix_ids.numel() == 0 or target_ids.numel() == 0:
|
|
154
|
+
raise ValueError("prefix_ids and target_ids must be nonempty.")
|
|
155
|
+
|
|
156
|
+
input_ids = torch.cat((context_ids, prefix_ids)).to(device).unsqueeze(0)
|
|
157
|
+
prefill_length = input_ids.shape[1]
|
|
158
|
+
targets = target_ids.to(device)
|
|
159
|
+
attention_mask = torch.ones_like(input_ids)
|
|
160
|
+
position_ids = torch.arange(prefill_length, device=device).unsqueeze(0)
|
|
161
|
+
with torch.inference_mode():
|
|
162
|
+
outputs = model(
|
|
163
|
+
input_ids=input_ids,
|
|
164
|
+
attention_mask=attention_mask,
|
|
165
|
+
position_ids=position_ids,
|
|
166
|
+
use_cache=True,
|
|
167
|
+
return_dict=True,
|
|
168
|
+
)
|
|
169
|
+
logits = _logits(outputs, prefill_length)[0]
|
|
170
|
+
cache = _cache(outputs, prefill_length)
|
|
171
|
+
|
|
172
|
+
# Prefill-only score: corpus prefix tokens that have a predecessor.
|
|
173
|
+
first_scored = max(int(context_ids.numel()), 1)
|
|
174
|
+
prefill_nll = _token_nll(
|
|
175
|
+
logits[first_scored - 1 : prefill_length - 1],
|
|
176
|
+
input_ids[0, first_scored:],
|
|
177
|
+
)
|
|
178
|
+
token_nll = [_token_nll(logits[-1:], targets[:1])]
|
|
179
|
+
for step in range(int(targets.numel()) - 1):
|
|
180
|
+
attention_mask = torch.cat(
|
|
181
|
+
(attention_mask, torch.ones_like(attention_mask[:, :1])), dim=-1
|
|
182
|
+
)
|
|
183
|
+
outputs = model(
|
|
184
|
+
input_ids=targets[step : step + 1].unsqueeze(0),
|
|
185
|
+
attention_mask=attention_mask,
|
|
186
|
+
position_ids=torch.full(
|
|
187
|
+
(1, 1), prefill_length + step, device=device, dtype=torch.long
|
|
188
|
+
),
|
|
189
|
+
past_key_values=cache,
|
|
190
|
+
use_cache=True,
|
|
191
|
+
return_dict=True,
|
|
192
|
+
)
|
|
193
|
+
step_logits = _logits(outputs, 1)[0]
|
|
194
|
+
cache = _cache(outputs, prefill_length + step + 1)
|
|
195
|
+
token_nll.append(_token_nll(step_logits, targets[step + 1 : step + 2]))
|
|
196
|
+
per_token = torch.cat(token_nll).cpu()
|
|
197
|
+
if per_token.numel() != targets.numel() or not bool(
|
|
198
|
+
torch.isfinite(per_token).all()
|
|
199
|
+
):
|
|
200
|
+
raise RuntimeError("Cached NLL produced a missing or non-finite target score.")
|
|
201
|
+
return {
|
|
202
|
+
"target_tokens": int(per_token.numel()),
|
|
203
|
+
"target_nll_sum": float(per_token.sum()),
|
|
204
|
+
"target_nll": [float(value) for value in per_token],
|
|
205
|
+
"prefill_tokens": int(prefill_nll.numel()),
|
|
206
|
+
"prefill_nll_sum": float(prefill_nll.sum()),
|
|
207
|
+
"prefill_length": int(prefill_length),
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
def chat_prefix_ids(processor_or_tokenizer: Any, tokenizer: Any) -> torch.Tensor:
|
|
212
|
+
"""Render and tokenize the chat prefix once; callers reuse the result."""
|
|
213
|
+
from tico.quantization.wrapq.utils.metrics import _render_chat_prefix
|
|
214
|
+
|
|
215
|
+
rendered = _render_chat_prefix(processor_or_tokenizer, tokenizer)
|
|
216
|
+
encoded = tokenizer(rendered, return_tensors="pt", add_special_tokens=False)
|
|
217
|
+
ids = encoded["input_ids"]
|
|
218
|
+
if ids.ndim != 2 or ids.shape[0] != 1 or ids.shape[1] == 0:
|
|
219
|
+
raise ValueError("Chat prefix must tokenize to a nonempty [1, N] tensor.")
|
|
220
|
+
return ids[0].to(torch.long)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def validate_context_budget(
|
|
224
|
+
context_tokens: int, protocol: CachedNLLProtocol, max_seq_len: Optional[int]
|
|
225
|
+
) -> None:
|
|
226
|
+
"""Reject a chunk whose whole length exceeds the evaluation context.
|
|
227
|
+
|
|
228
|
+
``H + P + T <= M`` is enforced on the actual chat-prefix token count. The
|
|
229
|
+
peak cached length is ``H + P + T - 1`` (the last target is never fed), but
|
|
230
|
+
the pre-existing ``P + T`` whole-chunk contract is kept and only the missing
|
|
231
|
+
``H`` is added; the one-token slack is intentional, not an oversight.
|
|
232
|
+
"""
|
|
233
|
+
if max_seq_len is None:
|
|
234
|
+
return
|
|
235
|
+
limit = int(max_seq_len)
|
|
236
|
+
required = int(context_tokens) + protocol.span
|
|
237
|
+
if required > limit:
|
|
238
|
+
raise ValueError(
|
|
239
|
+
"cached NLL chunk exceeds the evaluation context: "
|
|
240
|
+
f"chat_prefix_tokens H={int(context_tokens)} + prefix_tokens P="
|
|
241
|
+
f"{protocol.prefix_tokens} + target_tokens T={protocol.target_tokens} "
|
|
242
|
+
f"= {required} > max_seq_len M={limit}. Reduce prefix_tokens or "
|
|
243
|
+
"target_tokens, or evaluate with a larger context."
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
def evaluate_cached_nll(
|
|
248
|
+
model: torch.nn.Module,
|
|
249
|
+
token_stream: torch.Tensor,
|
|
250
|
+
protocol: CachedNLLProtocol,
|
|
251
|
+
*,
|
|
252
|
+
device: torch.device | str | None = None,
|
|
253
|
+
context_ids: Optional[torch.Tensor] = None,
|
|
254
|
+
max_seq_len: Optional[int] = None,
|
|
255
|
+
show_progress: bool = True,
|
|
256
|
+
) -> dict[str, Any]:
|
|
257
|
+
"""Score fixed chunks of ``token_stream`` (1-D) with real cached decode.
|
|
258
|
+
|
|
259
|
+
``context_ids`` are the exact chat-prefix tokens used for every chunk; the
|
|
260
|
+
same tensor is checked against ``max_seq_len`` and fed to the model, so the
|
|
261
|
+
budget check and the scoring can never disagree.
|
|
262
|
+
"""
|
|
263
|
+
if token_stream.ndim != 1:
|
|
264
|
+
raise ValueError("token_stream must be a 1-D token tensor.")
|
|
265
|
+
if device is None:
|
|
266
|
+
try:
|
|
267
|
+
device = next(model.parameters()).device
|
|
268
|
+
except StopIteration:
|
|
269
|
+
device = torch.device("cpu")
|
|
270
|
+
device = torch.device(device)
|
|
271
|
+
context = (
|
|
272
|
+
torch.zeros((0,), dtype=torch.long) if context_ids is None else context_ids
|
|
273
|
+
)
|
|
274
|
+
if context.ndim != 1:
|
|
275
|
+
raise ValueError("context_ids must be a 1-D token tensor.")
|
|
276
|
+
# Both checks run before the first model forward.
|
|
277
|
+
validate_context_budget(int(context.numel()), protocol, max_seq_len)
|
|
278
|
+
ranges = chunk_token_ranges(int(token_stream.numel()), protocol)
|
|
279
|
+
model.eval()
|
|
280
|
+
chunks = []
|
|
281
|
+
target_nll_sum = 0.0
|
|
282
|
+
target_tokens = 0
|
|
283
|
+
prefill_nll_sum = 0.0
|
|
284
|
+
prefill_tokens = 0
|
|
285
|
+
for index, (begin, end) in enumerate(
|
|
286
|
+
tqdm.tqdm(ranges, desc="cached NLL", disable=not show_progress)
|
|
287
|
+
):
|
|
288
|
+
span = token_stream[begin:end].to(torch.long)
|
|
289
|
+
record = score_cached_chunk(
|
|
290
|
+
model,
|
|
291
|
+
context_ids=context,
|
|
292
|
+
prefix_ids=span[: protocol.prefix_tokens],
|
|
293
|
+
target_ids=span[protocol.prefix_tokens :],
|
|
294
|
+
device=device,
|
|
295
|
+
)
|
|
296
|
+
record.update(
|
|
297
|
+
index=index,
|
|
298
|
+
begin=int(begin),
|
|
299
|
+
end=int(end),
|
|
300
|
+
mean_target_nll=record["target_nll_sum"] / record["target_tokens"],
|
|
301
|
+
)
|
|
302
|
+
chunks.append(record)
|
|
303
|
+
target_nll_sum += record["target_nll_sum"]
|
|
304
|
+
target_tokens += record["target_tokens"]
|
|
305
|
+
prefill_nll_sum += record["prefill_nll_sum"]
|
|
306
|
+
prefill_tokens += record["prefill_tokens"]
|
|
307
|
+
if target_tokens == 0:
|
|
308
|
+
raise ValueError("No cached target tokens were scored.")
|
|
309
|
+
mean_nll = target_nll_sum / target_tokens
|
|
310
|
+
prefill_mean = prefill_nll_sum / prefill_tokens if prefill_tokens else None
|
|
311
|
+
return {
|
|
312
|
+
"protocol": asdict(protocol),
|
|
313
|
+
"max_seq_len": None if max_seq_len is None else int(max_seq_len),
|
|
314
|
+
"context_tokens": int(context.numel()),
|
|
315
|
+
"context_token_ids": [int(value) for value in context],
|
|
316
|
+
"corpus_tokens": int(token_stream.numel()),
|
|
317
|
+
"scored_tokens": int(target_tokens),
|
|
318
|
+
"mean_nll": float(mean_nll),
|
|
319
|
+
"ppl": float(math.exp(mean_nll)),
|
|
320
|
+
"prefill_only": {
|
|
321
|
+
"scored_tokens": int(prefill_tokens),
|
|
322
|
+
"mean_nll": None if prefill_mean is None else float(prefill_mean),
|
|
323
|
+
"ppl": None if prefill_mean is None else float(math.exp(prefill_mean)),
|
|
324
|
+
},
|
|
325
|
+
"chunks": chunks,
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
def normalize_text_examples(dataset: Iterable[Any], adapter: Any) -> list[str]:
|
|
330
|
+
"""Apply the registered dataset adapter once and collect the ``text`` fields.
|
|
331
|
+
|
|
332
|
+
The dataset is consumed in a single pass (streaming sources cannot be
|
|
333
|
+
re-iterated). Every normalized item must provide a string ``text``; a
|
|
334
|
+
missing or non-string field is a schema error, never an empty substitute.
|
|
335
|
+
"""
|
|
336
|
+
if not callable(adapter):
|
|
337
|
+
raise TypeError(
|
|
338
|
+
"Cached NLL requires the registered dataset adapter returned by "
|
|
339
|
+
f"get_dataset(); got {type(adapter).__name__}."
|
|
340
|
+
)
|
|
341
|
+
texts: list[str] = []
|
|
342
|
+
for index, example in enumerate(dataset):
|
|
343
|
+
item = adapter(example)
|
|
344
|
+
if not isinstance(item, Mapping) or "text" not in item:
|
|
345
|
+
raise ValueError(
|
|
346
|
+
f"Dataset adapter output for example {index} lacks the 'text' "
|
|
347
|
+
f"field required by cached NLL (got {type(item).__name__})."
|
|
348
|
+
)
|
|
349
|
+
text = item["text"]
|
|
350
|
+
if not isinstance(text, str):
|
|
351
|
+
raise ValueError(
|
|
352
|
+
f"Dataset adapter output for example {index} must provide a string "
|
|
353
|
+
f"'text', got {type(text).__name__}."
|
|
354
|
+
)
|
|
355
|
+
texts.append(text)
|
|
356
|
+
return texts
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
def tokenize_text_stream(tokenizer: Any, texts: Iterable[str]) -> torch.Tensor:
|
|
360
|
+
"""Tokenize a corpus once into a 1-D stream, as the PPL helpers do.
|
|
361
|
+
|
|
362
|
+
Rows are joined with ``"\\n\\n"`` exactly as given: empty WikiText rows and
|
|
363
|
+
surrounding whitespace are preserved so the token stream matches the
|
|
364
|
+
existing perplexity helpers. A corpus without any non-whitespace text is
|
|
365
|
+
rejected before the tokenizer or the model runs.
|
|
366
|
+
"""
|
|
367
|
+
rows = [str(text) for text in texts]
|
|
368
|
+
if not any(row.strip() for row in rows):
|
|
369
|
+
raise ValueError(
|
|
370
|
+
"The dataset contains no non-whitespace text after adapter "
|
|
371
|
+
"normalization; refusing to score an empty corpus."
|
|
372
|
+
)
|
|
373
|
+
joined = "\n\n".join(rows)
|
|
374
|
+
encoded = tokenizer(joined, return_tensors="pt", add_special_tokens=False)
|
|
375
|
+
ids = encoded["input_ids"]
|
|
376
|
+
if ids.ndim != 2 or ids.shape[0] != 1:
|
|
377
|
+
raise ValueError(f"Expected tokenized shape [1, sequence], got {ids.shape}.")
|
|
378
|
+
return ids[0].to(torch.long)
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
def evaluate_text_cached_nll(
|
|
382
|
+
*,
|
|
383
|
+
model: torch.nn.Module,
|
|
384
|
+
processor_or_tokenizer: Any,
|
|
385
|
+
dataset_name: str,
|
|
386
|
+
split: str,
|
|
387
|
+
protocol: CachedNLLProtocol,
|
|
388
|
+
device: torch.device | str,
|
|
389
|
+
max_seq_len: Optional[int] = None,
|
|
390
|
+
show_progress: bool = True,
|
|
391
|
+
) -> dict[str, Any]:
|
|
392
|
+
"""Load a registered evaluation text dataset and score it with cached decode.
|
|
393
|
+
|
|
394
|
+
``max_seq_len`` is the resolved evaluation context; the chat prefix is
|
|
395
|
+
rendered and tokenized once, and that tensor is used both for the
|
|
396
|
+
``H + P + T <= M`` check and for scoring.
|
|
397
|
+
"""
|
|
398
|
+
from tico.quantization.evaluation.vlm_eval_utils import get_dataset
|
|
399
|
+
from tico.quantization.recipes.data.dataset_usage import EVALUATION_ROLE
|
|
400
|
+
|
|
401
|
+
tokenizer = getattr(processor_or_tokenizer, "tokenizer", processor_or_tokenizer)
|
|
402
|
+
context = (
|
|
403
|
+
chat_prefix_ids(processor_or_tokenizer, tokenizer)
|
|
404
|
+
if protocol.chat_prefix
|
|
405
|
+
else None
|
|
406
|
+
)
|
|
407
|
+
# Fail on the budget before loading or tokenizing the corpus.
|
|
408
|
+
validate_context_budget(
|
|
409
|
+
0 if context is None else int(context.numel()), protocol, max_seq_len
|
|
410
|
+
)
|
|
411
|
+
dataset, adapter = get_dataset(
|
|
412
|
+
dataset_name, role=EVALUATION_ROLE, split=split, n=-1
|
|
413
|
+
)
|
|
414
|
+
stream = tokenize_text_stream(tokenizer, normalize_text_examples(dataset, adapter))
|
|
415
|
+
results = evaluate_cached_nll(
|
|
416
|
+
model,
|
|
417
|
+
stream,
|
|
418
|
+
protocol,
|
|
419
|
+
device=device,
|
|
420
|
+
context_ids=context,
|
|
421
|
+
max_seq_len=max_seq_len,
|
|
422
|
+
show_progress=show_progress,
|
|
423
|
+
)
|
|
424
|
+
results["dataset"] = {"name": dataset_name, "split": split}
|
|
425
|
+
return results
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
def print_cached_nll_results(results: Mapping[str, Any]) -> None:
|
|
429
|
+
prefill = results["prefill_only"]
|
|
430
|
+
print("\n=== Cached decode NLL ===")
|
|
431
|
+
print(
|
|
432
|
+
f"cached targets: {results['scored_tokens']} tokens over "
|
|
433
|
+
f"{len(results['chunks'])} chunks | mean NLL {results['mean_nll']:.6f} | "
|
|
434
|
+
f"PPL {results['ppl']:.4f}"
|
|
435
|
+
)
|
|
436
|
+
if prefill["mean_nll"] is not None:
|
|
437
|
+
print(
|
|
438
|
+
f"prefill-only: {prefill['scored_tokens']} tokens | "
|
|
439
|
+
f"mean NLL {prefill['mean_nll']:.6f} | PPL {prefill['ppl']:.4f}"
|
|
440
|
+
)
|