src/transformers/models/chinese_clip/convert_chinese_clip_original_pytorch_to_hf.py/copy_text_model_and_projection
def copy_text_model_and_projection(hf_model, pt_weights):
    # copy projection
    hf_model.text_projection.weight.data = pt_weights["text_projection"].data.T

    # copy text encoder
    for name, param in hf_model.text_model.named_parameters():
        param.data = pt_weights[f"bert.{name}"].data