Sentence Similarity
sentence-transformers
ONNX
Safetensors
Vietnamese
roberta
feature-extraction
Generated from Trainer
dataset_size:100000
loss:MatryoshkaLoss
loss:MultipleNegativesRankingLoss
Eval Results (legacy)
Instructions to use CODE4LIFEOFFICIAL/huydang-dek21-embedding with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use CODE4LIFEOFFICIAL/huydang-dek21-embedding with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("CODE4LIFEOFFICIAL/huydang-dek21-embedding") sentences = [ "Điều 2 Quyết định 185/QĐ-UB năm 1998 Bảng giá đất tỉnh Bến Tre có nội dung như sau:\n\nĐiều 2. Giá đất trên được áp dụng cho những trường hợp: Tính thuế chuyển quyền sử dụng cho những trường hợp: Tính thuế chuyển quyền sử dụng đất, thu lệ phí trước bạ, thu tiền sử dụng đất khi giao đất, cho thuê đất, tính giá trị tài sản khi giao đất, bồi thường thiệt hại về đất khi Nhà nước thu hồi.\nTrường hợp giao đất theo hình thức đấu giá, thì giá đất sẽ do Uỷ ban nhân dân tỉnh cho trường hợp cụ thể.\nGiá cho thuê đất đối với các tổ chức, cá nhân nước ngoài hoặc xí nghiệp có vốn đầu tư nước ngoài được áp dụng theo quy định của Chính phủ.", "Điều 2 Quyết định 55/2012/QĐ-UBND dự toán ngân sách phân bổ dự toán ngân sách 2013 Bình Dương", "Điều 2 Quyết định 185/QĐ-UB năm 1998 Bảng giá đất tỉnh Bến Tre", "Điều 3 Quyết định 79/2019/QĐ-UBND mức thu học phí quản lý và sử dụng học phí giáo dục mầm non Huế" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Inference
- Notebooks
- Google Colab
- Kaggle
Add new SentenceTransformer model with an onnx backend
#1
by iambestfeed - opened
Hello!
This pull request has been automatically generated from the push_to_hub method from the Sentence Transformers library.
Full Model Architecture:
SentenceTransformer(
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: ORTModelForFeatureExtraction
(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})
)
Tip:
Consider testing this pull request before merging by loading the model from this PR with the revision argument:
from sentence_transformers import SentenceTransformer
# TODO: Fill in the PR number
pr_number = 2
model = SentenceTransformer(
"huyydangg/DEk21_hcmute_embedding",
revision=f"refs/pr/{pr_number}",
backend="onnx",
)
# Verify that everything works as expected
embeddings = model.encode(["The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium."])
print(embeddings.shape)
similarities = model.similarity(embeddings, embeddings)
print(similarities)
huyydangg changed pull request status to merged