From caa4df7ff5ce0369396354f7c7b11e2462c817ba Mon Sep 17 00:00:00 2001 From: jinkun Date: Thu, 16 Jul 2026 14:26:49 +0800 Subject: [PATCH 1/3] recipe(lt-wikidata-comp-zh): add feature extraction recipes --- examples/recipes/README.md | 3 +- .../feature-extraction_fp16_config.json | 101 ++++++++++++++++++ .../feature-extraction_w8a16_config.json | 99 +++++++++++++++++ 3 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_fp16_config.json create mode 100644 examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_w8a16_config.json diff --git a/examples/recipes/README.md b/examples/recipes/README.md index 1077e4f74..1a7ac7a37 100644 --- a/examples/recipes/README.md +++ b/examples/recipes/README.md @@ -14,7 +14,7 @@ Each *(model, task)* includes: ## Models -Total: **75** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. +Total: **76** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. | Model | Task | |---|---| @@ -42,6 +42,7 @@ Total: **75** (model, task) tuples that pass fp16 eval on all 10 (EP, device) bu | deepset/bert-large-uncased-whole-word-masking-squad2 | question-answering | | deepset/roberta-base-squad2 | question-answering | | deepset/tinyroberta-squad2 | question-answering | +| dell-research-harvard/lt-wikidata-comp-zh | feature-extraction | | dima806/fairface_age_image_detection | image-classification | | distilbert/distilbert-base-cased-distilled-squad | question-answering | | distilbert/distilbert-base-uncased | fill-mask | diff --git a/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_fp16_config.json b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_fp16_config.json new file mode 100644 index 000000000..787760f0d --- /dev/null +++ b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_fp16_config.json @@ -0,0 +1,101 @@ +{ + "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/stsbenchmark-sts", + "split": "test", + "samples": 100, + "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/feature-extraction_w8a16_config.json b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_w8a16_config.json new file mode 100644 index 000000000..c5519d6be --- /dev/null +++ b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_w8a16_config.json @@ -0,0 +1,99 @@ +{ + "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": "static", + "samples": 10, + "calibration_method": "minmax", + "weight_type": "uint8", + "activation_type": "uint16", + "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" + }, + "compile": null, + "loader": { + "task": "feature-extraction", + "model_class": "AutoModel", + "model_type": "bert" + }, + "eval": { + "task": "feature-extraction", + "dataset": { + "path": "mteb/stsbenchmark-sts", + "split": "test", + "samples": 1000, + "columns_mapping": { + "input_column_1": "sentence1", + "input_column_2": "sentence2", + "score_column": "score" + } + } + } +} From 0cef49c127a86c8340b5ff1764ae2c3879a167fa Mon Sep 17 00:00:00 2001 From: Shiyi Zheng Date: Wed, 22 Jul 2026 21:05:56 +0800 Subject: [PATCH 2/3] Remove recipe README changes --- examples/recipes/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/recipes/README.md b/examples/recipes/README.md index 1a7ac7a37..1077e4f74 100644 --- a/examples/recipes/README.md +++ b/examples/recipes/README.md @@ -14,7 +14,7 @@ Each *(model, task)* includes: ## Models -Total: **76** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. +Total: **75** (model, task) tuples that pass fp16 eval on all 10 (EP, device) buckets. | Model | Task | |---|---| @@ -42,7 +42,6 @@ Total: **76** (model, task) tuples that pass fp16 eval on all 10 (EP, device) bu | deepset/bert-large-uncased-whole-word-masking-squad2 | question-answering | | deepset/roberta-base-squad2 | question-answering | | deepset/tinyroberta-squad2 | question-answering | -| dell-research-harvard/lt-wikidata-comp-zh | feature-extraction | | dima806/fairface_age_image_detection | image-classification | | distilbert/distilbert-base-cased-distilled-squad | question-answering | | distilbert/distilbert-base-uncased | fill-mask | From e1e9bbb3c148d29a8b298af91c831b87121c12e5 Mon Sep 17 00:00:00 2001 From: Shiyi Zheng Date: Thu, 23 Jul 2026 03:25:57 +0800 Subject: [PATCH 3/3] recipe(lt-wikidata-comp-zh): align CPU precision recipes --- .../cpu}/feature-extraction_fp16_config.json | 9 ++++-- .../cpu/feature-extraction_fp32_config.json} | 31 +++++-------------- 2 files changed, 15 insertions(+), 25 deletions(-) rename examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/{ => cpu/cpu}/feature-extraction_fp16_config.json (90%) rename examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/{feature-extraction_w8a16_config.json => cpu/cpu/feature-extraction_fp32_config.json} (67%) diff --git a/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_fp16_config.json b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp16_config.json similarity index 90% rename from examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_fp16_config.json rename to examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp16_config.json index 787760f0d..9d34ee370 100644 --- a/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_fp16_config.json +++ b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp16_config.json @@ -88,9 +88,14 @@ "eval": { "task": "feature-extraction", "dataset": { - "path": "mteb/stsbenchmark-sts", + "path": "mteb/sts22-crosslingual-sts", + "name": "zh", "split": "test", - "samples": 100, + "samples": 20, + "shuffle": false, + "seed": 42, + "streaming": true, + "revision": "91d97a5b9d761e285ac3e1b4f239797bbd21c4b8", "columns_mapping": { "input_column_1": "sentence1", "input_column_2": "sentence2", diff --git a/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_w8a16_config.json b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp32_config.json similarity index 67% rename from examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_w8a16_config.json rename to examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp32_config.json index c5519d6be..5d6302441 100644 --- a/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/feature-extraction_w8a16_config.json +++ b/examples/recipes/dell-research-harvard_lt-wikidata-comp-zh/cpu/cpu/feature-extraction_fp32_config.json @@ -56,27 +56,7 @@ "optim": { "clamp_constant_values": true }, - "quant": { - "mode": "static", - "samples": 10, - "calibration_method": "minmax", - "weight_type": "uint8", - "activation_type": "uint16", - "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" - }, + "quant": null, "compile": null, "loader": { "task": "feature-extraction", @@ -86,9 +66,14 @@ "eval": { "task": "feature-extraction", "dataset": { - "path": "mteb/stsbenchmark-sts", + "path": "mteb/sts22-crosslingual-sts", + "name": "zh", "split": "test", - "samples": 1000, + "samples": 20, + "shuffle": false, + "seed": 42, + "streaming": true, + "revision": "91d97a5b9d761e285ac3e1b4f239797bbd21c4b8", "columns_mapping": { "input_column_1": "sentence1", "input_column_2": "sentence2",