Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
This model is korsts and kornli finetuning model from
intfloat/multilingual-e5-base
. 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.
from sentence_transformers import SentenceTransformer
# Download from the ๐ค Hub
model = SentenceTransformer("upskyy/e5-base-korean")
# Run inference
sentences = [
'์์ด๋ฅผ ๊ฐ์ง ์๋ง๊ฐ ํด๋ณ์ ๊ฑท๋๋ค.',
'๋ ์ฌ๋์ด ํด๋ณ์ ๊ฑท๋๋ค.',
'ํ ๋จ์๊ฐ ํด๋ณ์์ ๊ฐ๋ฅผ ์ฐ์ฑ ์ํจ๋ค.',
]
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]
Usage (HuggingFace Transformers)
Without sentence-transformers, you can use the model like this:
First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
from transformers import AutoTokenizer, AutoModel
import torch
# Mean Pooling - Take attention mask into account for correct averagingdefmean_pooling(model_output, attention_mask):
token_embeddings = model_output[0] # First element of model_output contains all token embeddings
input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
# Sentences we want sentence embeddings for
sentences = ["์๋ ํ์ธ์?", "ํ๊ตญ์ด ๋ฌธ์ฅ ์๋ฒ ๋ฉ์ ์ํ ๋ฒํธ ๋ชจ๋ธ์ ๋๋ค."]
# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained("upskyy/e5-base-korean")
model = AutoModel.from_pretrained("upskyy/e5-base-korean")
# Tokenize sentences
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors="pt")
# Compute token embeddingswith torch.no_grad():
model_output = model(**encoded_input)
# Perform pooling. In this case, mean pooling.
sentence_embeddings = mean_pooling(model_output, encoded_input["attention_mask"])
print("Sentence embeddings:")
print(sentence_embeddings)
@article{wang2024multilingual,
title={Multilingual E5 Text Embeddings: A Technical Report},
author={Wang, Liang and Yang, Nan and Huang, Xiaolong and Yang, Linjun and Majumder, Rangan and Wei, Furu},
journal={arXiv preprint arXiv:2402.05672},
year={2024}
}
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
Runs of upskyy e5-base-korean on huggingface.co
2.1K
Total runs
0
24-hour runs
0
3-day runs
470
7-day runs
2.1K
30-day runs
More Information About e5-base-korean huggingface.co Model
e5-base-korean huggingface.co is an AI model on huggingface.co that provides e5-base-korean's model effect (), which can be used instantly with this upskyy e5-base-korean model. huggingface.co supports a free trial of the e5-base-korean model, and also provides paid use of the e5-base-korean. Support call e5-base-korean model through api, including Node.js, Python, http.
e5-base-korean huggingface.co is an online trial and call api platform, which integrates e5-base-korean's modeling effects, including api services, and provides a free online trial of e5-base-korean, you can try e5-base-korean online for free by clicking the link below.
upskyy e5-base-korean online free url in huggingface.co:
e5-base-korean is an open source model from GitHub that offers a free installation service, and any user can find e5-base-korean on GitHub to install. At the same time, huggingface.co provides the effect of e5-base-korean install, users can directly use e5-base-korean installed effect in huggingface.co for debugging and trial. It also supports api for free installation.