MCPcopy Create free account

hub / github.com/intel/neural-compressor / functions

Functions4,695 in github.com/intel/neural-compressor

↓ 2 callersMethodupdate
Update the state that need to be evaluated. Args: preds: The prediction result. labels: The reference. Defaults to No
examples/tensorflow/image_recognition/vision_transformer/quantization/ptq/data_process.py:276
↓ 2 callersMethodupdate
Update the state that need to be evaluated. Args: preds: The prediction result. labels: The reference. Defaults to No
examples/tensorflow/image_recognition/inception_v3/quantization/ptq/data_process.py:211
↓ 2 callersMethodupdate
Update the state that need to be evaluated. Args: preds: The prediction result. labels: The reference. Defaults to No
examples/tensorflow/keras/image_recognition/resnet_v2_50/quantization/ptq/data_process.py:243
↓ 2 callersMethodupdate
Update the state that need to be evaluated. Args: preds: The prediction result. labels: The reference. Defaults to No
examples/tensorflow/keras/image_recognition/inception_v3/quantization/ptq/data_process.py:243
↓ 2 callersFunctionupdate_mode
(config_path, measure_step=False, quant_step=False)
neural_compressor/torch/algorithms/fp8_quant/common.py:33
↓ 2 callersFunctionupdate_params
(target_cfg, ref_cfg)
neural_compressor/torch/algorithms/fp8_quant/_core/scale_methods/scale_method_parser.py:134
↓ 2 callersFunctionupdate_sq_scale
Update ipex_config.json with smoothquant scale info generated by our algorithm. Args: ipex_config_path (str): a path to temporary ipex
neural_compressor/torch/algorithms/smooth_quant/utility.py:401
↓ 2 callersFunctionupdate_tokenizer
(model, tokenizer)
neural_compressor/torch/utils/llm_utility.py:50
↓ 2 callersFunctionvalidate_and_inference_input_output
Validate and inference the input and output tensor names of graph_def. Args: graph_def (tf.compat.v1.GraphDef): tf.compat.v1.GraphDef obj
neural_compressor/tensorflow/utils/model_wrappers.py:136
↓ 2 callersFunctionvalues_from_const
Extracts the values from a const NodeDef as a numpy ndarray. Args: node_def: Const NodeDef that has the values we want to access. Re
neural_compressor/tensorflow/quantization/utils/graph_rewriter/generic/fuse_layer_norm.py:228
↓ 2 callersMethodweight_name_mapping
Return weight_name_mapping function.
neural_compressor/tensorflow/utils/model_wrappers.py:1256
↓ 1 callersMethodComputeMetrics
Compute detection metrics. Args: include_metrics_per_category: Whether include metrics per category. all_metrics_per_cate
examples/tensorflow/object_detection/mask_rcnn_inception_v2/quantization/ptq/coco_tools.py:353
↓ 1 callersMethodComputeMetrics
Compute detection metrics. Args: include_metrics_per_category: Whether include metrics per category. all_metrics_per_cate
examples/tensorflow/object_detection/faster_rcnn_resnet50/quantization/ptq/coco_tools.py:353
↓ 1 callersMethodComputeMetrics
Compute detection metrics. Args: include_metrics_per_category: Whether include metrics per category. all_metrics_per_cate
examples/tensorflow/object_detection/ssd_mobilenet_v1/quantization/ptq/coco_tools.py:353
↓ 1 callersFunctionExportSingleImageDetectionBoxesToCoco
Export detections of a single image to COCO format. This function converts detections represented as numpy arrays to dictionaries that can be
examples/tensorflow/object_detection/mask_rcnn_inception_v2/quantization/ptq/coco_tools.py:574
↓ 1 callersFunctionExportSingleImageDetectionBoxesToCoco
Export detections of a single image to COCO format. This function converts detections represented as numpy arrays to dictionaries that can be
examples/tensorflow/object_detection/faster_rcnn_resnet50/quantization/ptq/coco_tools.py:574
↓ 1 callersFunctionExportSingleImageDetectionBoxesToCoco
Export detections of a single image to COCO format. This function converts detections represented as numpy arrays to dictionaries that can be
examples/tensorflow/object_detection/ssd_mobilenet_v1/quantization/ptq/coco_tools.py:574
↓ 1 callersFunctionExportSingleImageGroundtruthToCoco
Export groundtruth of a single image to COCO format. This function converts groundtruth detection annotations represented as numpy arrays to
examples/tensorflow/object_detection/mask_rcnn_inception_v2/quantization/ptq/coco_tools.py:492
↓ 1 callersFunctionExportSingleImageGroundtruthToCoco
Export groundtruth of a single image to COCO format. This function converts groundtruth detection annotations represented as numpy arrays to
examples/tensorflow/object_detection/faster_rcnn_resnet50/quantization/ptq/coco_tools.py:492
↓ 1 callersFunctionExportSingleImageGroundtruthToCoco
Export groundtruth of a single image to COCO format. This function converts groundtruth detection annotations represented as numpy arrays to
examples/tensorflow/object_detection/ssd_mobilenet_v1/quantization/ptq/coco_tools.py:492
↓ 1 callersMethodGetAgnosticMode
Return whether COCO Eval is configured to evaluate in agnostic mode.
examples/tensorflow/object_detection/mask_rcnn_inception_v2/quantization/ptq/coco_tools.py:211
↓ 1 callersMethodGetAgnosticMode
Return whether COCO Eval is configured to evaluate in agnostic mode.
examples/tensorflow/object_detection/faster_rcnn_resnet50/quantization/ptq/coco_tools.py:211
↓ 1 callersMethodGetAgnosticMode
Return whether COCO Eval is configured to evaluate in agnostic mode.
examples/tensorflow/object_detection/ssd_mobilenet_v1/quantization/ptq/coco_tools.py:211
↓ 1 callersMethodGetCategory
Fetch dictionary holding category information given category id. Args: category_id: integer id Returns: dictiona
examples/tensorflow/object_detection/mask_rcnn_inception_v2/quantization/ptq/coco_tools.py:200
↓ 1 callersMethodGetCategory
Fetch dictionary holding category information given category id. Args: category_id: integer id Returns: dictiona
examples/tensorflow/object_detection/faster_rcnn_resnet50/quantization/ptq/coco_tools.py:200
↓ 1 callersMethodGetCategory
Fetch dictionary holding category information given category id. Args: category_id: integer id Returns: dictiona
examples/tensorflow/object_detection/ssd_mobilenet_v1/quantization/ptq/coco_tools.py:200
↓ 1 callersMethodGetCategoryIdList
Return the list of IDs of all valid categories.
examples/tensorflow/object_detection/mask_rcnn_inception_v2/quantization/ptq/coco_tools.py:215
↓ 1 callersMethodGetCategoryIdList
Return the list of IDs of all valid categories.
examples/tensorflow/object_detection/faster_rcnn_resnet50/quantization/ptq/coco_tools.py:215
↓ 1 callersMethodGetCategoryIdList
Return the list of IDs of all valid categories.
examples/tensorflow/object_detection/ssd_mobilenet_v1/quantization/ptq/coco_tools.py:215
↓ 1 callersMethodLoadAnnotations
Load annotations dictionary into COCO datastructure. See http://mscoco.org/dataset/#format for a description of the annotations forma
examples/tensorflow/object_detection/mask_rcnn_inception_v2/quantization/ptq/coco_tools.py:91
↓ 1 callersMethodLoadAnnotations
Load annotations dictionary into COCO datastructure. See http://mscoco.org/dataset/#format for a description of the annotations forma
examples/tensorflow/object_detection/faster_rcnn_resnet50/quantization/ptq/coco_tools.py:91
↓ 1 callersMethodLoadAnnotations
Load annotations dictionary into COCO datastructure. See http://mscoco.org/dataset/#format for a description of the annotations forma
examples/tensorflow/object_detection/ssd_mobilenet_v1/quantization/ptq/coco_tools.py:91
↓ 1 callersMethod__call__
The __call__ function of custom quantized AveragePooling2D layer.
neural_compressor/tensorflow/keras/layers/pool2d.py:67
↓ 1 callersMethod__init__
(self)
test/torch/quantization/test_mx_quant.py:11
↓ 1 callersMethod__init__
(self)
test/torch/quantization/test_static_quant.py:31
↓ 1 callersMethod__init__
(self)
test/torch/algorithms/pt2e_quant/test_pt2e_w8a8.py:19
↓ 1 callersMethod__init__
(self)
test/torch/algorithms/fp8_quant/unit_tests/test_runtime_scale_patching.py:23
↓ 1 callersMethod__init__
Initialization function.
neural_compressor/torch/algorithms/mx_quant/mx.py:36
↓ 1 callersMethod__init__
Init the GraphTrace object.
neural_compressor/torch/algorithms/weight_only/utility.py:731
↓ 1 callersMethod__init__
Init Static quantization config. Args: weight_dtype (str): Data type for weights, default is "fp8_e4m3". activation_d
neural_compressor/jax/quantization/config.py:222
↓ 1 callersMethod__init__
Initialize the min/max observer layer. Args: *args: Positional arguments for the base layer. **kwargs: Keyword argume
neural_compressor/jax/quantization/layers_static.py:71
↓ 1 callersMethod__init__
Init static quantization config. Args: weight_dtype (str): Data type for weights, default is "int". weight_sym (bool)
neural_compressor/tensorflow/quantization/config.py:74
↓ 1 callersMethod__init__
Initialization. Args: local_config_file: local configuration file name. performance_only: oob performance only mode.
neural_compressor/tensorflow/algorithms/static_quant/tensorflow.py:917
↓ 1 callersMethod__init__
Initialize custom quantized AveragePooling2D layer.
neural_compressor/tensorflow/keras/layers/pool2d.py:30
↓ 1 callersMethod__init__
(self)
examples/helloworld/fp8_example/b2b_unitest_2_steps.py:27
↓ 1 callersMethod__init__
Construct a COCOWrapper. See http://mscoco.org/dataset/#format for a description of the format. By default, the coco.COCO class const
examples/tensorflow/object_detection/mask_rcnn_inception_v2/quantization/ptq/coco_tools.py:64
↓ 1 callersMethod__init__
Construct a COCOWrapper. See http://mscoco.org/dataset/#format for a description of the format. By default, the coco.COCO class const
examples/tensorflow/object_detection/faster_rcnn_resnet50/quantization/ptq/coco_tools.py:64
↓ 1 callersMethod__init__
Construct a COCOWrapper. See http://mscoco.org/dataset/#format for a description of the format. By default, the coco.COCO class const
examples/tensorflow/object_detection/ssd_mobilenet_v1/quantization/ptq/coco_tools.py:64
↓ 1 callersMethod__init__
Initialize the score list.
examples/tensorflow/nlp/bert_large_squad_model_zoo/quantization/ptq/data_process.py:233
↓ 1 callersMethod__init__
( self, m_spa=None, ln_emb=None, ln_bot=None, ln_top=None, sig
examples/pytorch/recommendation/dlrm/static_quant/ipex/dlrm_s_pytorch.py:227
↓ 1 callersMethod__init__
( self, lr_crossnet, )
examples/pytorch/recommendation/dlrm_v2/fp8_quant/cpu/dlrm_model.py:117
↓ 1 callersMethod__len__
Return the number of batches.
neural_compressor/tensorflow/utils/data.py:224
↓ 1 callersMethod__new__
Bypass BaseModel __new__ to allow manual initialization. Args: *args: Positional arguments for object creation. **kwa
neural_compressor/jax/quantization/saving.py:410
↓ 1 callersMethod__repr__
(self)
examples/tensorflow/nlp/bert_large_squad_model_zoo/quantization/ptq/create_tf_record.py:71
↓ 1 callersMethod__setattr__
Override the setattr function to propagate updates.
neural_compressor/common/base_config.py:236
↓ 1 callersMethod__str__
(self)
examples/tensorflow/nlp/bert_large_squad_model_zoo/quantization/ptq/create_pretraining_data.py:85
↓ 1 callersMethod_absorb_scales
Absorb the scale to the layer at output channel. Args: layer: the module. scale: the scale to be absorbed.
neural_compressor/torch/algorithms/weight_only/teq.py:168
↓ 1 callersMethod_add_blockwise_observer
Insert observers into the block modules. Args: block_modules (list): The block modules to which the observer will be inserted.
neural_compressor/torch/algorithms/smooth_quant/utility.py:1337
↓ 1 callersMethod_add_min_max_observer
Insert observers into the given modules. Args: modules (list): The modules to which the observer will be inserted.
neural_compressor/torch/algorithms/smooth_quant/utility.py:885
↓ 1 callersMethod_add_pool_function
Set quantized pooling node attributes.
neural_compressor/tensorflow/quantization/utils/quantize_graph/qdq/fuse_qdq_pooling.py:37
↓ 1 callersMethod_adjust_parameters
Adjust the weights and biases. Args: absorb_to_layer (dict): A dictionary mapping absorb layers to smooth quantized layers.
neural_compressor/torch/algorithms/smooth_quant/utility.py:2158
↓ 1 callersMethod_adjust_weight
In-place adjust weight by scale. Args: scale: smooth scale with the shape (ic,) weight_node: reference to the origina
neural_compressor/tensorflow/algorithms/smoother/scaler.py:74
↓ 1 callersMethod_analyze_concat_node_recursively
Analyze all the ConcatV2 nodes recursively.
neural_compressor/tensorflow/quantization/utils/transform_graph/rerange_quantized_concat.py:84
↓ 1 callersMethod_apply_concatv2_quantization
Quantize ConcatV2 if it's quantizable.
neural_compressor/tensorflow/quantization/utils/quantize_graph/quantize_graph_concatv2.py:79
↓ 1 callersMethod_apply_concatv2_quantization
Quantize ConcatV2.
neural_compressor/tensorflow/quantization/utils/quantize_graph/qdq/fuse_qdq_concatv2.py:110
↓ 1 callersMethod_apply_concatv2_transform
Quantize ConcatV2.
neural_compressor/tensorflow/quantization/utils/quantize_graph/quantize_graph_concatv2.py:32
↓ 1 callersMethod_apply_pool_quantization
Quantize AvgPool/MaxPool.
neural_compressor/tensorflow/quantization/utils/quantize_graph/quantize_graph_pooling.py:44
↓ 1 callersMethod_apply_pool_quantization
Quantize AvgPool/MaxPool. Dequantize + MaxPool + QuantizeV2 Dequantize + MaxPool3D + QuantizeV2 Dequantize + AvgPool + Quanti
neural_compressor/tensorflow/quantization/utils/quantize_graph/qdq/fuse_qdq_pooling.py:49
↓ 1 callersFunction_assert_quantized_correctly
In quantized mode, assert the reference model is not quantized, and the quantized model is. Otherwise, assert that both are not quantized.
test/torch/algorithms/fp8_quant/tester.py:93
↓ 1 callersMethod_assign_state_dict
(self, state_dict: Mapping[str, Any], strict: bool = True, assign: bool = False)
neural_compressor/torch/algorithms/weight_only/hqq/core.py:374
↓ 1 callersMethod_auto_tune_alpha
Perform alpha-tuning to obtain layer-wise optimal alpha values and adjust parameters accordingly.
neural_compressor/torch/algorithms/smooth_quant/utility.py:1751
↓ 1 callersMethod_auto_tune_alpha_blockwise
Perform blockwise-alpha-tuning to obtain optimal alpha values and adjust parameters accordingly.
neural_compressor/torch/algorithms/smooth_quant/utility.py:1821
↓ 1 callersMethod_bf16_convert
BF16 conversion for the model. Args: bf16_node_name: nodes converted to BF16 op list
neural_compressor/tensorflow/quantization/utils/graph_rewriter/bf16/bf16_convert.py:130
↓ 1 callersFunction_build_all_layers
Reconstructs layers' weights by building each layer from its saved input shape and then assigning the original variable values.
neural_compressor/jax/quantization/clone_model.py:89
↓ 1 callersMethod_build_hqq_model
Replace quantized Linear with HQQLinear.
neural_compressor/torch/algorithms/weight_only/save_load.py:393
↓ 1 callersFunction_build_inc_dataloader
(dataloader)
examples/pytorch/nlp/huggingface_models/question-answering/quantization/static_quant/ipex/run_qa.py:629
↓ 1 callersFunction_build_new_model
Replaces original add_weight() (used internally by from_config()) with faster version, which creates copies of original weights. Then calls f
neural_compressor/jax/quantization/clone_model.py:57
↓ 1 callersFunction_build_sample_dict
(manifest)
examples/pytorch/diffusion_model/diffusers/wan/evaluate_manifest_no_gt.py:20
↓ 1 callersFunction_build_synset_lookup
Build lookup for synset to human-readable label. Args: imagenet_metadata_file: string, path to file containing mapping from synset to hum
examples/tensorflow/keras/image_recognition/imagenet_prepare/build_imagenet_data.py:522
↓ 1 callersFunction_build_var_map
Builds a path->value map for name-based copy in add_weight. Keys use the path with the top-level model name stripped, because from_config reb
neural_compressor/jax/quantization/clone_model.py:107
↓ 1 callersMethod_cac_transformation
Scale propagation pattern match and create new const nodes.
neural_compressor/tensorflow/quantization/utils/graph_rewriter/int8/scale_propagation.py:68
↓ 1 callersMethod_cal_scales
Calculate the adjustment scales. Args: absorb_to_layer (dict): A dictionary mapping absorb layers to smooth quantized layers.
neural_compressor/torch/algorithms/smooth_quant/utility.py:2122
↓ 1 callersFunction_calculate_correct_fan
(shape, mode)
examples/pytorch/recommendation/dlrm_v2/fp8_quant/cpu/dlrm_model.py:49
↓ 1 callersMethod_calculate_qparams
Calculate scale and zero-point for quantization. Args: input_scale (Tensor): The scale for input features. input_
neural_compressor/torch/algorithms/smooth_quant/utility.py:2607
↓ 1 callersMethod_calibrate
Apply calibration. Args: model(tf.keras.Model): The model inserted with FakeQuant layers for calibration. dataloader(
neural_compressor/tensorflow/algorithms/static_quant/keras.py:389
↓ 1 callersMethod_check_add_bos_token
(self)
neural_compressor/evaluation/lm_eval/utils.py:92
↓ 1 callersMethod_check_args
Check model's arguments.
neural_compressor/tensorflow/quantization/utils/graph_converter.py:418
↓ 1 callersFunction_check_config
Checks if the given config matches all specified criteria for weight and activation (scale_value_type, rounding_method, granularity). Returns
neural_compressor/torch/algorithms/fp8_quant/_core/scale_methods/scale_method_config.py:241
↓ 1 callersFunction_check_is_max_context
Check if this is the 'max context' doc span for the token.
examples/tensorflow/nlp/bert_large_squad_model_zoo/quantization/ptq/create_tf_record.py:402
↓ 1 callersMethod_check_itex
Verify that Intel Extension for TensorFlow is installed.
neural_compressor/tensorflow/algorithms/static_quant/tensorflow.py:112
↓ 1 callersFunction_check_keras_format
Decide which method will be used to get graph from the saved_model . Args: model (string or tf.keras.Model): model path or tf.keras.Model
neural_compressor/tensorflow/utils/model_wrappers.py:439
↓ 1 callersMethod_check_need_calibration
Check if calibration is needed. Args: alpha (float or dict): Current alpha values. percentile (float): Current pe
neural_compressor/torch/algorithms/smooth_quant/utility.py:2185
↓ 1 callersMethod_check_op_list
Check if the node_type in the allowed op list.
neural_compressor/tensorflow/quantization/utils/graph_rewriter/qdq/insert_qdq_pattern.py:222
↓ 1 callersMethod_check_quantize_format
The function that checks format for conv ops.
neural_compressor/tensorflow/algorithms/static_quant/keras.py:111
↓ 1 callersMethod_check_tf_version
Check if the installed tensorflow version is supported.
neural_compressor/tensorflow/quantization/utils/graph_converter.py:356
↓ 1 callersMethod_check_valid_conv
Remove group convolution layers except depthwise convolution. Args: module (torch.nn.Module): The module to process.
neural_compressor/torch/algorithms/smooth_quant/utility.py:1140
↓ 1 callersMethod_check_valid_conv
Remove group conv except depthwise conv.
neural_compressor/torch/algorithms/weight_only/utility.py:906
↓ 1 callersMethod_clean_text
Performs invalid character removal and whitespace cleanup on text.
examples/tensorflow/nlp/bert_large_squad_model_zoo/quantization/ptq/tokenization.py:289
↓ 1 callersFunction_common_hqq_test
( nbits=4, group_size=64, quant_zero=True, quant_scale=False, scale_quant_group_size=128, device=None )
test/torch/quantization/weight_only/test_hqq.py:21
↓ 1 callersMethod_compute_softmax
Compute softmax probability over raw logits.
examples/tensorflow/nlp/bert_large_squad_model_zoo/quantization/ptq/data_process.py:728
← previousnext →901–1,000 of 4,695, ranked by callers