kvaishnavi commited on
Commit
1b16cfc
1 Parent(s): bc6397c

Update onnx/builder.py

Browse files
Files changed (1) hide show
  1. onnx/builder.py +2 -2
onnx/builder.py CHANGED
@@ -92,7 +92,7 @@ def build_vision(args):
92
  "--output_model", fpath_4,
93
  "--block_size", str(32),
94
  ]
95
- if args.precision == "fp32": cmd.extend(["--accuracy_level", str(4)])
96
  subprocess.run(cmd)
97
  shutil.rmtree(temp_folder_3)
98
 
@@ -182,7 +182,7 @@ def build_text(args):
182
  "exclude_embeds": "true",
183
  "filename": "phi-3-v-128k-instruct-text.onnx",
184
  }
185
- if args.precision == "fp32": extra_options["int4_accuracy_level"] = 4
186
  create_model(model_name, args.input, args.output, precision, args.execution_provider, args.cache_dir, **extra_options)
187
 
188
  def get_args():
 
92
  "--output_model", fpath_4,
93
  "--block_size", str(32),
94
  ]
95
+ if args.precision == torch.float32: cmd.extend(["--accuracy_level", str(4)])
96
  subprocess.run(cmd)
97
  shutil.rmtree(temp_folder_3)
98
 
 
182
  "exclude_embeds": "true",
183
  "filename": "phi-3-v-128k-instruct-text.onnx",
184
  }
185
+ if args.precision == torch.float32: extra_options["int4_accuracy_level"] = 4
186
  create_model(model_name, args.input, args.output, precision, args.execution_provider, args.cache_dir, **extra_options)
187
 
188
  def get_args():