diff --git a/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp16_config.json b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp16_config.json new file mode 100644 index 000000000..9d34ee370 --- /dev/null +++ b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp16_config.json @@ -0,0 +1,106 @@ +{ + "export": { + "opset_version": 17, + "batch_size": 1, + "export_params": true, + "do_constant_folding": true, + "verbose": false, + "dynamo": false, + "enable_hierarchy_tags": true, + "clean_onnx": false, + "hierarchy_tag_format": "full", + "input_tensors": [ + { + "name": "input_ids", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 21128 + ] + }, + { + "name": "attention_mask", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 2 + ] + }, + { + "name": "token_type_ids", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 2 + ] + } + ], + "output_tensors": [ + { + "name": "last_hidden_state" + } + ] + }, + "optim": { + "clamp_constant_values": true + }, + "quant": { + "mode": "fp16", + "samples": 10, + "calibration_method": "minmax", + "weight_type": "uint8", + "activation_type": "uint8", + "per_channel": false, + "symmetric": false, + "weight_symmetric": null, + "activation_symmetric": null, + "save_calibration": false, + "distribution": "uniform", + "seed": null, + "calibration_load_path": null, + "calibration_save_path": null, + "op_types_to_quantize": null, + "nodes_to_exclude": null, + "task": "feature-extraction", + "model_id": "dell-research-harvard/lt-wikidata-comp-zh", + "model_type": "bert", + "fp16_keep_io_types": true, + "fp16_op_block_list": null + }, + "compile": null, + "loader": { + "task": "feature-extraction", + "model_class": "AutoModel", + "model_type": "bert" + }, + "eval": { + "task": "feature-extraction", + "dataset": { + "path": "mteb/sts22-crosslingual-sts", + "name": "zh", + "split": "test", + "samples": 20, + "shuffle": false, + "seed": 42, + "streaming": true, + "revision": "91d97a5b9d761e285ac3e1b4f239797bbd21c4b8", + "columns_mapping": { + "input_column_1": "sentence1", + "input_column_2": "sentence2", + "score_column": "score" + } + } + } +} diff --git a/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp32_config.json b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp32_config.json new file mode 100644 index 000000000..5d6302441 --- /dev/null +++ b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp32_config.json @@ -0,0 +1,84 @@ +{ + "export": { + "opset_version": 17, + "batch_size": 1, + "export_params": true, + "do_constant_folding": true, + "verbose": false, + "dynamo": false, + "enable_hierarchy_tags": true, + "clean_onnx": false, + "hierarchy_tag_format": "full", + "input_tensors": [ + { + "name": "input_ids", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 21128 + ] + }, + { + "name": "attention_mask", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 2 + ] + }, + { + "name": "token_type_ids", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 2 + ] + } + ], + "output_tensors": [ + { + "name": "last_hidden_state" + } + ] + }, + "optim": { + "clamp_constant_values": true + }, + "quant": null, + "compile": null, + "loader": { + "task": "feature-extraction", + "model_class": "AutoModel", + "model_type": "bert" + }, + "eval": { + "task": "feature-extraction", + "dataset": { + "path": "mteb/sts22-crosslingual-sts", + "name": "zh", + "split": "test", + "samples": 20, + "shuffle": false, + "seed": 42, + "streaming": true, + "revision": "91d97a5b9d761e285ac3e1b4f239797bbd21c4b8", + "columns_mapping": { + "input_column_1": "sentence1", + "input_column_2": "sentence2", + "score_column": "score" + } + } + } +}