https://github.com/abdouaziz/sbert
Sentence-BERT (SBERT),is a modification of the pretrained BERT network that use siamese and triplet network structures to derive semantically meaningful sentence embeddings that can be compared using cosine-similarity.
https://github.com/abdouaziz/sbert
Last synced: about 1 month ago
JSON representation
Sentence-BERT (SBERT),is a modification of the pretrained BERT network that use siamese and triplet network structures to derive semantically meaningful sentence embeddings that can be compared using cosine-similarity.
- Host: GitHub
- URL: https://github.com/abdouaziz/sbert
- Owner: abdouaziz
- Created: 2022-01-06T14:05:53.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-22T17:30:54.000Z (over 3 years ago)
- Last Synced: 2025-03-24T20:16:58.372Z (about 2 months ago)
- Language: Python
- Size: 41.4 MB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
This repository is the implementation of the paper [Sentence-Bert](https://arxiv.org/pdf/1908.10084.pdf) a modification of the pretrained BERT network that use siamese and triplet network structures to derive semantically meaningful sentence embeddings that can be compared using cosine-similarity.
This reduces the effort for finding the most similar pair from 65 hours with BERT / RoBERTa to about 5 seconds with SBERT, while maintaining the accuracy from BERT
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
install the dependencies for this project by running the following commands in your terminal:```
pip install -r requirements.txt
```run the model by running the following command in your terminal:
```
python src/sbert.py --train_file="./input/wolof.csv" \
--max_length=150 \
--epochs=10 \
--learning_rate=3e-8 \
--epsilone=1e-9 \
--train_batch_size=3 \
--model_name="bert-base-cased"
```