src/transformers/models/flava/convert_dalle_to_flava_codebook.py/count_parameters
def count_parameters(state_dict):
    # encoder.embeddings are double copied in original FLAVA
    return sum(param.float().sum() if "encoder.embeddings" not in key else 0 for key, param in state_dict.items())