You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Finetuned CLIP Projection Head (Persian)

This repository contains the file finetune_clip_fa.pt,
a projection head (linear layer) fine-tuned on top of a Persian CLIP model.

Contents

  • finetune_clip_fa.pt → PyTorch checkpoint of the projection head.

How to Use

import torch
from huggingface_hub import hf_hub_download

# Repository and filename
REPO_ID = "ahm1378/finetune-clip-fa-head"
FILENAME = "finetune_clip_fa.pt"

# Download checkpoint
ckpt_path = hf_hub_download(
    repo_id=REPO_ID,
    filename=FILENAME,
    repo_type="model"
)

# Load into a linear projection head
state = torch.load(ckpt_path, map_location="cpu")

proj_txt = torch.nn.Linear(512, 512, bias=False)

if "proj_txt" in state:
    proj_txt.load_state_dict(state["proj_txt"])
elif "state_dict" in state:
    proj_txt.load_state_dict(state["state_dict"])
else:
    proj_txt.load_state_dict(state)

proj_txt.eval()
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support