Model Card for Model ID

The model is trained to generate document embeddings for math research papers and use the embeddings to find similar ranked documents.

Model Details

LLaMa model that is trained with contrastive learning for sequence classification.

How to use for generating embeddings

from transformers import AutoTokenizer, AutoModel import torch

sentences = ["Hello Who are you?", "I am fine thank you"]

tokenizer = AutoTokenizer.from_pretrained('AnkitSatpute/Llama-3.1-ReRank-AllFTbtAbstr')

model = AutoModel.from_pretrained('AnkitSatpute/Llama-3.1-ReRank-AllFTbtAbstr')

model.eval()

with torch.no_grad():

model_output = model(**encoded_input)

sentence_embeddings = model_output[0][:, 0]

sentence_embeddings = torch.nn.functional.normalize(sentence_embeddings, p=2, dim=1)

print("Sentence embeddings:", sentence_embeddings)

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for AnkitSatpute/Llama-3.1-ReRank-AllFTbtAbstr

Finetuned
(679)
this model

Dataset used to train AnkitSatpute/Llama-3.1-ReRank-AllFTbtAbstr