Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.31 KB

README.md

File metadata and controls

34 lines (26 loc) · 1.31 KB

textContrastiveLib

A collection of text contrastive methods, reproducing existing text-based methods or application of CV domain methods.

Model list

All encoders of these models are based on pretrained BERT.

  • DirectBYOLSE: combination of DirectCSE and BYOLSE

Requirement

  • PyTorch 1.9
  • python 3.8
  • transformers 4.8
  • jupyter-notebook

Usage

  1. prepare datasets (data-prepare notebook) and pretrained BERT weights
  2. change all the file path in PATH.py to your own path
  3. Follow the example-usage notebook to init&train models

Note: only SimCSE model can get good results (STS ~ 76 ), other models are more of an experimental nature. Feel free to change the model architecture or training parameters for better results, try it!

Bugs or questions?

If you have any questions or suggestions, feel free to open an issue!