yujiepan commited on
Commit
7bbe5a6
1 Parent(s): 1b510f2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -39,9 +39,10 @@ model.save_pretrained(save_path)
39
  tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
40
  tokenizer.save_pretrained(save_path)
41
 
42
- # from optimum.intel.openvino import OVModelForCausalLM
43
- # ovmodel = OVModelForCausalLM.from_pretrained(save_path, export=True)
44
- # ovmodel.save_pretrained(save_path)
 
45
 
46
  os.system(f'ls -alh {save_path}')
47
  create_repo(repo_id, exist_ok=True)
 
39
  tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
40
  tokenizer.save_pretrained(save_path)
41
 
42
+ from optimum.intel.openvino import OVModelForCausalLM
43
+ ovmodel = OVModelForCausalLM.from_pretrained(save_path, export=True)
44
+ ovmodel = ovmodel.half()
45
+ ovmodel.save_pretrained(save_path)
46
 
47
  os.system(f'ls -alh {save_path}')
48
  create_repo(repo_id, exist_ok=True)