Skip to content

liangyuxin42/textContrastiveLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

a collection of text contrastive methods

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published