Skip to content

Commit efe311c

Browse files
authored
Fix the onnx export custom model example (#2203)
fix the export custom model example; fix repo name; fix opset version;
1 parent 99bc877 commit efe311c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/source/exporters/onnx/usage_guides/export_a_model.mdx

+3-2
Original file line numberDiff line numberDiff line change
@@ -396,14 +396,13 @@ class CustomMPTOnnxConfig(TextDecoderOnnxConfig):
396396
inputs_or_outputs[f"{name}.{i}.value"] = {0: "batch_size", 2: decoder_sequence_name}
397397

398398

399-
model_id = "/home/fxmarty/hf_internship/optimum/tiny-mpt-random-remote-code"
399+
model_id = "fxmarty/tiny-mpt-random-remote-code"
400400
config = AutoConfig.from_pretrained(model_id, trust_remote_code=True)
401401

402402
onnx_config = CustomMPTOnnxConfig(
403403
config=config,
404404
task="text-generation",
405405
use_past_in_inputs=False,
406-
use_present_in_outputs=True,
407406
)
408407
onnx_config_with_past = CustomMPTOnnxConfig(config, task="text-generation", use_past=True)
409408

@@ -419,6 +418,8 @@ main_export(
419418
trust_remote_code=True,
420419
custom_onnx_configs=custom_onnx_configs,
421420
no_post_process=True,
421+
legacy=True,
422+
opset=14
422423
)
423424
```
424425

0 commit comments

Comments
 (0)