flpelerin commited on
Commit
2b1c712
·
1 Parent(s): 4f246b8

Update 2 files

Browse files

- /export.py
- /trainer.cli.py

Files changed (2) hide show
  1. export.py +2 -3
  2. trainer.cli.py +3 -1
export.py CHANGED
@@ -236,12 +236,11 @@ def ExportConfig(model, config, output_path):
236
 
237
 
238
 
239
- def ExportAll(model, tokenizer):
240
- model.save_pretrained()
241
  model = LoadModel('pytorch_model.bin')
242
  config = LoadConfig('config.json')
243
 
244
- tokenizer.to_file('tokenizer.bin')
245
 
246
  ExportModelFP32(model, config, 'model.fp32.bin')
247
  ExportModelINT8(model, config, 'model.int8.bin')
 
236
 
237
 
238
 
239
+ def ExportAll():
 
240
  model = LoadModel('pytorch_model.bin')
241
  config = LoadConfig('config.json')
242
 
243
+
244
 
245
  ExportModelFP32(model, config, 'model.fp32.bin')
246
  ExportModelINT8(model, config, 'model.int8.bin')
trainer.cli.py CHANGED
@@ -56,4 +56,6 @@ if __name__ == '__main__':
56
  trainer.train(batches)
57
 
58
 
59
- ExportAll(model, tokenizer)
 
 
 
56
  trainer.train(batches)
57
 
58
 
59
+ model.save_pretrained()
60
+ tokenizer.to_file('tokenizer.bin')
61
+ ExportAll()