Downloads · 30 days
0
Kogero/ms-marco-dual-encoder
ms-marco-dual-encoder is a machine learning model from Kogero. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This repository contains a Dual Encoder (Two-Tower) model trained on the Microsoft MS MARCO dataset for information retrieval tasks.
Downloads · 30 days
0
Access
Public
Updated Apr 21, 2025
Repo size
136 KB
Likes
0
Public
Click a slice to open those files.
.pth136 KB · 98%
From the Hugging Face model README
This repository contains a Dual Encoder (Two-Tower) model trained on the Microsoft MS MARCO dataset for information retrieval tasks.
import torch
from model import QryTower, DocTower
# Load the models
embedding_dim = 128
qry_model = QryTower(embedding_dim)
doc_model = DocTower(embedding_dim)
qry_model.load_state_dict(torch.load("qry_tower.pth"))
doc_model.load_state_dict(torch.load("doc_tower.pth"))
# Get embeddings for query and document
query_embedding = qry_model(preprocessed_query)
document_embedding = doc_model(preprocessed_document)
# Calculate similarity
similarity = torch.cosine_similarity(query_embedding, document_embedding)
This model was trained for 5 epochs with a batch size of 32 and learning rate of 0.001.
MIT