From 160ae684a2b26b3b9b77a0d07b5338f3729a8770 Mon Sep 17 00:00:00 2001 From: Shiyi Zheng Date: Tue, 25 Aug 2026 16:27:06 +0800 Subject: [PATCH 1/2] Add cpu recipe candidates for lt-wikidata-comp-en fp32/fp16 --- .../cpu/sentence-similarity_fp16_config.json | 121 +++++++++--------- .../cpu/sentence-similarity_fp32_config.json | 119 ++++++++--------- 2 files changed, 114 insertions(+), 126 deletions(-) diff --git a/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp16_config.json b/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp16_config.json index 25b22809c..8d563d5ed 100644 --- a/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp16_config.json +++ b/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp16_config.json @@ -1,64 +1,59 @@ { - "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, - 30527 - ] - }, - { - "name": "attention_mask", - "dtype": "int32", - "shape": [ - 1, - 512 - ], - "value_range": [ - 0, - 2 - ] - } - ], - "output_tensors": [ - { - "name": "last_hidden_state" - } - ] - }, - "optim": {}, - "quant": null, - "loader": { - "task": "sentence-similarity", - "model_class": "AutoModel", - "model_type": "mpnet" - }, - "eval": { - "task": "sentence-similarity", - "dataset": { - "path": "mteb/stsbenchmark-sts", - "split": "test", - "samples": 100, - "columns_mapping": { - "input_column_1": "sentence1", - "input_column_2": "sentence2", - "score_column": "score" - } - } - } -} + "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, + 30527 + ] + }, + { + "name": "attention_mask", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 2 + ] + } + ], + "output_tensors": [ + { + "name": "last_hidden_state" + } + ], + "compatibility": { + "transformers_attention": "eager" + } + }, + "optim": { + + }, + "quant": { + "mode": "fp16" + }, + "compile": null, + "loader": { + "task": "feature-extraction", + "model_class": "AutoModel", + "model_type": "mpnet" + } +} \ No newline at end of file diff --git a/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp32_config.json b/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp32_config.json index 25b22809c..e94d8e103 100644 --- a/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp32_config.json +++ b/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp32_config.json @@ -1,64 +1,57 @@ { - "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, - 30527 - ] - }, - { - "name": "attention_mask", - "dtype": "int32", - "shape": [ - 1, - 512 - ], - "value_range": [ - 0, - 2 - ] - } - ], - "output_tensors": [ - { - "name": "last_hidden_state" - } - ] - }, - "optim": {}, - "quant": null, - "loader": { - "task": "sentence-similarity", - "model_class": "AutoModel", - "model_type": "mpnet" - }, - "eval": { - "task": "sentence-similarity", - "dataset": { - "path": "mteb/stsbenchmark-sts", - "split": "test", - "samples": 100, - "columns_mapping": { - "input_column_1": "sentence1", - "input_column_2": "sentence2", - "score_column": "score" - } - } - } -} + "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, + 30527 + ] + }, + { + "name": "attention_mask", + "dtype": "int32", + "shape": [ + 1, + 512 + ], + "value_range": [ + 0, + 2 + ] + } + ], + "output_tensors": [ + { + "name": "last_hidden_state" + } + ], + "compatibility": { + "transformers_attention": "eager" + } + }, + "optim": { + + }, + "quant": null, + "compile": null, + "loader": { + "task": "feature-extraction", + "model_class": "AutoModel", + "model_type": "mpnet" + } +} \ No newline at end of file From 679262929391003678bb479a5c034e7691d2854c Mon Sep 17 00:00:00 2001 From: Shiyi Zheng Date: Tue, 25 Aug 2026 21:57:58 +0800 Subject: [PATCH 2/2] recipe(lt-wikidata-comp-en): preserve fp16 IO types --- .../cpu/cpu/sentence-similarity_fp16_config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp16_config.json b/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp16_config.json index 8d563d5ed..2f2b420ce 100644 --- a/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp16_config.json +++ b/examples/recipes/dell-research-harvard_lt-wikidata-comp-en/cpu/cpu/sentence-similarity_fp16_config.json @@ -48,7 +48,8 @@ }, "quant": { - "mode": "fp16" + "mode": "fp16", + "fp16_keep_io_types": true }, "compile": null, "loader": {