MCPcopy Create free account

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

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

↓ 1 callersFunction_contains_function_with_implements_attr
Check whether SavedModel functions declare implementation attributes. Args: saved_model_proto: Loaded SavedModel protocol buffer. Re
neural_compressor/tensorflow/utils/model_wrappers.py:255
↓ 1 callersFunction_convert
(model, config_path)
neural_compressor/torch/algorithms/fp8_quant/quantizer.py:60
↓ 1 callersFunction_convert
(model)
neural_compressor/torch/algorithms/mixed_low_precision/quantizer.py:58
↓ 1 callersMethod_convert_hqq_module_config
(self, config)
neural_compressor/torch/algorithms/weight_only/hqq/quantizer.py:148
↓ 1 callersMethod_convert_qdq
Convert Dequantize + Op + QuantizeV2 into QuantizedOps.
neural_compressor/tensorflow/quantization/utils/graph_converter.py:957
↓ 1 callersFunction_convert_to_example
Build an Example proto for an example. Args: filename: string, path to an image file, e.g., '/path/to/example.JPG' image_buffer: string, JP
examples/tensorflow/keras/image_recognition/imagenet_prepare/build_imagenet_data.py:152
↓ 1 callersFunction_count_and_gen_subtokens
Count number of times subtokens appear, and generate new subtokens. Args: token_counts: dict mapping tokens to the number of times they appear
examples/tensorflow/nlp/transformer_lt/quantization/ptq/utils/tokenizer.py:452
↓ 1 callersFunction_count_tokens
Return token counts of words in the files. Samples file_byte_limit bytes from each file, and counts the words that appear in the samples. The sam
examples/tensorflow/nlp/transformer_lt/quantization/ptq/utils/tokenizer.py:327
↓ 1 callersFunction_create_evaluator_for_eval_fns
(eval_fns: Optional[Union[Callable, Dict, List[Dict]]] = None)
test/tensorflow/test_autotune.py:18
↓ 1 callersFunction_create_fp8_config_from_quant_config
(model)
neural_compressor/torch/algorithms/mixed_low_precision/modules.py:148
↓ 1 callersMethod_create_model
Initializes an HF or HF-compatible PreTrainedModel from scratch inside HFLM, using the kwargs passed into self.__init__(). Also handl
neural_compressor/evaluation/lm_eval/models/huggingface.py:462
↓ 1 callersMethod_create_tokenizer
Helper method during initialization. Create a tokenizer object corresponding to the correct tokenizer for value of `pretrained`, or u
neural_compressor/evaluation/lm_eval/models/huggingface.py:723
↓ 1 callersMethod_dequantize
(cls, W_q, meta)
neural_compressor/torch/algorithms/weight_only/hqq/core.py:181
↓ 1 callersMethod_detect_absorb_to_layer
(self, model, folding, example_inputs)
neural_compressor/torch/algorithms/weight_only/teq.py:61
↓ 1 callersMethod_detect_cores
Detect physical CPU core count using psutil. Returns: int: Number of physical CPU cores.
neural_compressor/common/utils/utility.py:138
↓ 1 callersMethod_dtype_val
Get the dtype value of the node.
neural_compressor/tensorflow/quantization/utils/graph_rewriter/bf16/bf16_convert.py:83
↓ 1 callersMethod_dump_min_max
Dump min-max per channel information; the min-max values will be saved in the input_maxes attribute. Args: calibration_method
neural_compressor/torch/algorithms/smooth_quant/utility.py:911
↓ 1 callersFunction_evaluate
Evaluates model. Computes and prints AUROC Args: model (torch.nn.Module): model for evaluation. eval_dataloader (DataLoader)
examples/pytorch/recommendation/dlrm_v2/fp8_quant/cpu/main.py:221
↓ 1 callersFunction_export_hf_checkpoint
Exports the torch model to the packed checkpoint with original HF naming. The packed checkpoint will be consumed by the TensorRT-LLM unified conv
neural_compressor/torch/export/export_hf.py:53
↓ 1 callersFunction_export_quantized_weight
For the given weight attr of the sub_module, export the quantization info of it. The export includes converting weight tensor to correct quantize
neural_compressor/torch/export/export_hf.py:25
↓ 1 callersMethod_export_sq_info
Export information required for SmoothQuant including scales and min/max values. Args: absorb_to_layer (dict): A dictionary ma
neural_compressor/torch/algorithms/smooth_quant/utility.py:2063
↓ 1 callersFunction_f_lcs
Computes the LCS-based F-measure score. Source: http://research.microsoft.com/en-us/um/people/cyl/download/papers/ rouge-working-note-v1.3.1.pdf
examples/tensorflow/nlp/transformer_lt/quantization/ptq/utils/metrics.py:470
↓ 1 callersFunction_face_mouth_roi
(gray: np.ndarray, face_cascade)
examples/pytorch/diffusion_model/diffusers/wan/evaluate_manifest_no_gt.py:148
↓ 1 callersFunction_fetch_from_string
Return op_name and op_type from key, such as "('transformer.h.0.attn.k_proj', 'Linear')".
neural_compressor/common/utils/save_load.py:51
↓ 1 callersFunction_filter_and_bucket_subtokens
Return a bucketed list of subtokens that are filtered by count. Args: subtoken_counts: defaultdict mapping subtokens to their counts min_co
examples/tensorflow/nlp/transformer_lt/quantization/ptq/utils/tokenizer.py:485
↓ 1 callersMethod_filter_unquantizable_concat
Filter out unquantizable ConcatV2 Ops based on the positive input rule.
neural_compressor/tensorflow/algorithms/static_quant/tensorflow.py:485
↓ 1 callersMethod_filter_unquantizable_concat_performance_only
OOB filter out unquantizable ConcatV2 OPs by checking the control flow rule.
neural_compressor/tensorflow/algorithms/static_quant/tensorflow.py:514
↓ 1 callersFunction_find_human_readable_labels
Build a list of human-readable labels. Args: synsets: list of strings; each string is a unique WordNet ID. synset_to_human: dict of synset
examples/tensorflow/keras/image_recognition/imagenet_prepare/build_imagenet_data.py:487
↓ 1 callersFunction_find_image_files
Build a list of all images files and labels in the data set. Args: data_dir: string, path to the root directory of images. Assumes that
examples/tensorflow/keras/image_recognition/imagenet_prepare/build_imagenet_data.py:411
↓ 1 callersMethod_fold_value
Calculate values of end node of constant node sequence. there may be layers whose inputs are all constant in the graph, like: const
neural_compressor/tensorflow/quantization/utils/graph_rewriter/generic/fold_constant.py:42
↓ 1 callersMethod_from_list_of_configs
Expand a list of configs into a single list. Args: fwk_configs (List[BaseConfig]): Configurations to expand. Returns:
neural_compressor/common/base_tuning.py:233
↓ 1 callersMethod_fuse_bn
Fusing Batch Normalization.
neural_compressor/tensorflow/algorithms/static_quant/keras.py:248
↓ 1 callersFunction_gen_new_subtoken_list
Generate candidate subtokens ordered by count, and new max subtoken length. Add subtokens to the candidate list in order of length (longest subtoke
examples/tensorflow/nlp/transformer_lt/quantization/ptq/utils/tokenizer.py:506
↓ 1 callersMethod_gen_node_hash
Generate nodes hash md5 data.
neural_compressor/tensorflow/quantization/utils/graph_rewriter/int8/post_quantized_op_cse.py:36
↓ 1 callersMethod_gen_tmp_filenames
Generate the temporary file names.
neural_compressor/tensorflow/quantization/utils/graph_converter.py:428
↓ 1 callersMethod_generate_calibration_data
Generate the calibration data.
neural_compressor/tensorflow/algorithms/smoother/calibration.py:168
↓ 1 callersMethod_generate_calibration_data
Generate the calibration data.
neural_compressor/tensorflow/algorithms/smoother/calibration.py:466
↓ 1 callersMethod_generate_dataloader
Yield batches from the dataset using the configured sampler. Args: dataset: Dataset to iterate. batch_size (int): Bat
neural_compressor/tensorflow/utils/data.py:327
↓ 1 callersMethod_generate_dataloader
Yield data.
examples/tensorflow/object_detection/mask_rcnn_inception_v2/quantization/ptq/data_process.py:676
↓ 1 callersMethod_generate_dataloader
Yield data.
examples/tensorflow/object_detection/faster_rcnn_resnet50/quantization/ptq/data_process.py:564
↓ 1 callersMethod_generate_dataloader
Yield data.
examples/tensorflow/object_detection/ssd_mobilenet_v1/quantization/ptq/data_process.py:564
↓ 1 callersMethod_generate_dataloader
Yield data.
examples/tensorflow/image_recognition/vgg16/quantization/ptq/data_process.py:490
↓ 1 callersMethod_generate_dataloader
Yield data.
examples/tensorflow/image_recognition/mobilenet_v2/quantization/ptq/data_process.py:420
↓ 1 callersMethod_generate_dataloader
Yield data.
examples/tensorflow/image_recognition/resnet_v2_50/quantization/ptq/data_process.py:420
↓ 1 callersMethod_generate_dataloader
Yield data.
examples/tensorflow/image_recognition/vision_transformer/quantization/ptq/data_process.py:485
↓ 1 callersMethod_generate_dataloader
Yield data.
examples/tensorflow/image_recognition/inception_v3/quantization/ptq/data_process.py:420
↓ 1 callersMethod_generate_dataloader
Yield data.
examples/tensorflow/nlp/bert_large_squad_model_zoo/quantization/ptq/data_process.py:330
↓ 1 callersMethod_generate_dataloader
Yield data.
examples/tensorflow/keras/image_recognition/resnet_v2_50/quantization/ptq/data_process.py:452
↓ 1 callersMethod_generate_dataloader
Yield data.
examples/tensorflow/keras/image_recognition/inception_v3/quantization/ptq/data_process.py:452
↓ 1 callersMethod_generate_params_list
(cls)
neural_compressor/torch/quantization/config.py:107
↓ 1 callersFunction_generate_subtokens_with_target_vocab_size
Generate subtoken vocabulary close to the target size.
examples/tensorflow/nlp/transformer_lt/quantization/ptq/utils/tokenizer.py:397
↓ 1 callersMethod_generate_unique_id
Generate a unique identifier for a trial record. Returns: str: Unique identifier string.
neural_compressor/common/base_tuning.py:415
↓ 1 callersFunction_get_absorb_dict
Get absorbed layer per block from absorbed layer dict. Args: model (torch.nn.Module): input model absorb_layer_dict (dict): The l
neural_compressor/torch/algorithms/weight_only/awq.py:98
↓ 1 callersFunction_get_absorb_per_block
Get absorbed layer per block. Args: model (torch.nn.Module): input model. example_inputs (tensor/tuple/dict, optional): used to t
neural_compressor/torch/algorithms/weight_only/awq.py:40
↓ 1 callersFunction_get_accelerate_args
Returns the kwargs needed to apply `accelerate` in `AutoModel.from_pretrained`.
neural_compressor/evaluation/lm_eval/models/huggingface.py:53
↓ 1 callersFunction_get_act_scale
(input_val)
neural_compressor/torch/algorithms/weight_only/awq.py:151
↓ 1 callersMethod_get_backend
Helper method during initialization. Determines the backend ("causal" (decoder-only) or "seq2seq" (encoder-decoder)) model type to be
neural_compressor/evaluation/lm_eval/models/huggingface.py:408
↓ 1 callersMethod_get_batch_fmtstr
(self, num_batches)
examples/pytorch/image_recognition/torchvision_models/quantization/static_quant/ipex/main.py:520
↓ 1 callersMethod_get_batch_fmtstr
(self, num_batches)
examples/pytorch/cv/fp8_quant/main.py:360
↓ 1 callersMethod_get_batch_fmtstr
(self, num_batches)
examples/pytorch/cv/mixed_precision/main.py:336
↓ 1 callersMethod_get_batch_fmtstr
(self, num_batches)
examples/pytorch/cv/static_quant/main.py:408
↓ 1 callersMethod_get_config
( self, pretrained: str, revision: str = "main", trust_remote_code: bool = Fal
neural_compressor/evaluation/lm_eval/models/huggingface.py:450
↓ 1 callersMethod_get_device
Get the model device. Returns: torch.device: The device on which the model is located.
neural_compressor/torch/algorithms/smooth_quant/utility.py:1959
↓ 1 callersMethod_get_device
Get the model device. Returns: str: Model device.
neural_compressor/torch/algorithms/weight_only/teq.py:85
↓ 1 callersMethod_get_dispatch_func
(self)
neural_compressor/torch/algorithms/fp8_quant/_quant_common/helper_modules.py:940
↓ 1 callersMethod_get_dtype
(self)
neural_compressor/torch/algorithms/weight_only/teq.py:94
↓ 1 callersFunction_get_enum_from_string
(EnumClass, string, key)
neural_compressor/torch/algorithms/fp8_quant/_quant_common/quant_config.py:129
↓ 1 callersMethod_get_extra_kwargs
(self, tokens_num: int)
neural_compressor/torch/algorithms/fp8_quant/_quant_common/helper_modules.py:933
↓ 1 callersFunction_get_graph_from_original_keras_v2
The version 2 function that get graph from the original keras model. Args: model (string or tf.keras.Model): model path or tf.keras.Model
neural_compressor/tensorflow/utils/model_wrappers.py:385
↓ 1 callersFunction_get_in_memory_dataloader
( args: argparse.Namespace, stage: str, )
examples/pytorch/recommendation/dlrm_v2/fp8_quant/cpu/data_process/dlrm_dataloader.py:90
↓ 1 callersMethod_get_loaded_state_dict
(self, config)
neural_compressor/torch/algorithms/weight_only/save_load.py:617
↓ 1 callersMethod_get_model_class_and_config
(self)
neural_compressor/torch/algorithms/weight_only/save_load.py:567
↓ 1 callersMethod_get_module_quantization_config
Gt quantization config of current module. 1. INC weight-only quantization model, quantization_config will be structured in module level like:
neural_compressor/torch/algorithms/weight_only/save_load.py:456
↓ 1 callersFunction_get_module_type_filter
(module_type)
neural_compressor/torch/algorithms/pt2e_quant/half_precision_rewriter.py:226
↓ 1 callersMethod_get_number_of_sockets
Detect the number of CPU sockets available. Returns: int: Number of CPU sockets detected.
neural_compressor/common/utils/utility.py:188
↓ 1 callersMethod_get_one_batch_auto_loss
Calculate the losses for all alpha values given an input. Returns: dict: A dictionary of operation-wise loss values with respe
neural_compressor/torch/algorithms/smooth_quant/utility.py:1567
↓ 1 callersMethod_get_one_batch_auto_loss_blockwise
Calculate the losses for all alpha values given an input in blockwise tuning mode. Returns: dict: A dictionary of blockwise lo
neural_compressor/torch/algorithms/smooth_quant/utility.py:1618
↓ 1 callersMethod_get_op_list
Get op list by recursive sorting the graph.
neural_compressor/tensorflow/quantization/utils/quantize_graph_common.py:52
↓ 1 callersMethod_get_output_index_mapping
Get the output_node_name and index mapping.
neural_compressor/tensorflow/quantization/utils/transform_graph/insert_logging.py:90
↓ 1 callersFunction_get_quantization_from_layer
(layer)
neural_compressor/torch/algorithms/qat/quant_utils.py:126
↓ 1 callersMethod_get_resolved_archive_file
Get weight archive file of model.
neural_compressor/torch/algorithms/weight_only/save_load.py:764
↓ 1 callersMethod_get_scale_repr
(self)
neural_compressor/torch/algorithms/weight_only/hqq/qtensor.py:87
↓ 1 callersMethod_get_specified_version_cfg
Get the configuration for the current runtime. If there's no matched configuration in the input yaml, we'll use the configuration of
neural_compressor/tensorflow/algorithms/static_quant/tensorflow.py:934
↓ 1 callersMethod_get_specified_version_cfg
Get the configuration for the current runtime. If there's no matched configuration in the input yaml, we'll use the `default` field o
neural_compressor/tensorflow/algorithms/static_quant/keras.py:598
↓ 1 callersMethod_get_suffix
Split the node name into two parts. Returns: Pure string name without suffix Index of the node
neural_compressor/tensorflow/quantization/utils/transform_graph/insert_logging.py:77
↓ 1 callersFunction_get_weight_scale
Get scale for weight. Args: weight (tensor): input weight q_group_size (int, optional): how many elements share one scale/zp. Def
neural_compressor/torch/algorithms/weight_only/awq.py:131
↓ 1 callersMethod_get_weight_scale
Get the weight scale and zero-point. Returns: Tensor: The scale of the weight.
neural_compressor/torch/algorithms/smooth_quant/utility.py:2633
↓ 1 callersMethod_get_weight_tensors
Load and cache weight tensors needed for smooth quantization.
neural_compressor/tensorflow/algorithms/smoother/calibration.py:454
↓ 1 callersMethod_get_zero_repr
(self)
neural_compressor/torch/algorithms/weight_only/hqq/qtensor.py:100
↓ 1 callersMethod_group_block
Collect attention and ffn blocks from detect result.
neural_compressor/torch/algorithms/static_quant/utility.py:743
↓ 1 callersFunction_has_child
(module: torch.nn.Module)
neural_compressor/torch/algorithms/weight_only/hqq/quantizer.py:28
↓ 1 callersMethod_has_positive_input
Check the start_node if has positive input.
neural_compressor/tensorflow/quantization/utils/graph_util.py:72
↓ 1 callersFunction_import_cpu_modules
()
neural_compressor/torch/algorithms/fp8_quant/_core/patching_common.py:139
↓ 1 callersFunction_import_device_modules
()
neural_compressor/torch/algorithms/fp8_quant/_core/patching_common.py:154
↓ 1 callersFunction_import_hpu_modules
()
neural_compressor/torch/algorithms/fp8_quant/_core/patching_common.py:114
↓ 1 callersFunction_import_xpu_modules
()
neural_compressor/torch/algorithms/fp8_quant/_core/patching_common.py:126
↓ 1 callersFunction_improve_answer_span
Returns tokenized answer spans that better match the annotated answer.
examples/tensorflow/nlp/bert_large_squad_model_zoo/quantization/ptq/create_tf_record.py:365
↓ 1 callersMethod_inference
Inference the model to apply calibration. Args: sampling_graph_def: The temporary graph_def for inference.
neural_compressor/tensorflow/algorithms/smoother/calibration.py:417
↓ 1 callersMethod_inference_for_calibration
Run the calibration on the input graph. Args: model(TensorflowBaseModel): input TensorflowBaseModel
neural_compressor/tensorflow/algorithms/smoother/calibration.py:69
↓ 1 callersMethod_inference_for_calibration
Run the calibration on the input graph.
neural_compressor/tensorflow/algorithms/smoother/calibration.py:445
← previousnext →1,001–1,100 of 4,695, ranked by callers