Can we run this in FP16 instead of FP32 ?
#3
by
vince62s
- opened
Hi Ricardo
Would that make sense to release a checkpoint in FP16 ? would the accuracy change ?
answering to myself: converting to fp16, changing two lines of code model.half() and in_features.to(torch.float16) makes thing twice faster, twice less ram, same scores.
I modified the comet code, only two lines to change as mentioned in my previous message.
@vince62s which files did you change?
in score.py you need to add half() to the line: model = load_from_checkpoint(model_path).half()
in feed_forward?py you need to change the last line: return self.ff(in_features.to(torch.float16))
Confirmed, it works. Thanks so much!
Maybe a PR for unbabels would be appreciated?