Hi,
I am trying to convert some of the trained model weights to fp16 (for inference use only). The model was trained with fp32, but I’d like to convert some layers to fp16, hoping to increase the inference speed. I cannot do half() on the whole model since there are some layers that need to be in fp32, e.g. layernorm.
Can I iterate over the model’s named parameters, something like e.g.
for name, param in model.named_parameters():
  if name is in converted_list:
     model.named_parameters[name].half()

Is this something which might work or there is anything I am unaware of?
Thanks!