sentence-t5-base-fp32 / convert_to_fp16.py
Jackmin108's picture
initial_commit
8575d20
raw
history blame
198 Bytes
import sys
from transformers import T5EncoderModel
in_path = sys.argv[1]
out_path = sys.argv[2]
model = T5EncoderModel.from_pretrained(in_path)
model.half()
model.save_pretrained(out_path)