Edit model card

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.

SentenceTransformer based on distilbert/distilbert-base-multilingual-cased

This is a sentence-transformers model finetuned from distilbert/distilbert-base-multilingual-cased. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.

matryoshka_dims = [768, 512, 384, 256, 128, 64, 32]

Model Details

Model Description

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
  (2): Normalize()
)

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

pip install -U sentence-transformers

Then you can load this model and run inference.

from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("lemon-mint/KoEn-Embed-Turbo-Matryoshka-v0.11-final")
# Run inference
sentences = [
    'query: 로마는 왜 분열 되었는가?',
    'passage: 고대 로마\n로마 제국은 기독교 공인 후 교황 선출 문제를 기화로 서로마, 동로마로 분할됐으며 이민족의 침략으로 쇠퇴기에 접어들었다. 서기 5세기 경 서로마 제국은 멸망 후 게르만족의 여러 독립 국가로 갈라져 프랑크 왕국, 신성 로마 제국 등 로마의 후계자를 자처하는 여타 서유럽의 정치 세력들이 나타난다. 한편 동로마 제국은 중세 시대에 비잔티움 제국으로 발전했으나 1453년 오스만 투르크에게 멸망한다.',
    'passage: 판노니아 속주\n102년에서 107년경 트라야누스 황제는 이 지역을 다시 동서로 분할하여 ‘판노니아 수페리오르’와 ‘판노니아 인페리오르’로 나누었다. 3세기에 이르면서 이 지역 출신의 황제가 여러 명이 배출되었고 전통적으로 로마 군단의 병력을 제공하는 속주로 변모하였다. 그러나 로마 제국이 쇠퇴하기 시작하면서 야만족의 침입을 받았고 395년에 로마군이 이 지역에서 완전히 철수하고 반달족이 거주하면서 판노니아는 그 명맥이 끊어졌다.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

Training Details

Framework Versions

  • Python: 3.10.13
  • Sentence Transformers: 3.0.1
  • Transformers: 4.41.2
  • PyTorch: 2.1.2+cpu
  • Accelerate: 0.30.1
  • Datasets: 2.19.2
  • Tokenizers: 0.19.1

Citation

BibTeX

Downloads last month
6
Safetensors
Model size
73.9M params
Tensor type
F32
·
Inference API
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 lemon-mint/MiniKoEn-Matryoshka-Experiment-001

Finetuned
this model