Giter Site home page Giter Site logo

kunshou123 / nlp-series-sentence-embeddings Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhoujx4/nlp-series-sentence-embeddings

0.0 0.0 0.0 122 KB

NLP句子编码、句子embedding、语义相似度:BERT_avg、BERT_whitening、SBERT、SmiCSE

Home Page: https://zhuanlan.zhihu.com/p/388680608

Python 100.00%

nlp-series-sentence-embeddings's Introduction

项目说明

本项目是句子embedding、语义匹配任务的代码复现,是在sbert库的基础上做的二次开发
包括以下方法:

  • BERT_avg
  • BERT_whitening
  • SBERT
  • SimCSE
  • ConSERT
  • ESimCSE

部分实验效果如下:

Chines-STS-B dev Chines-STS-B test
BERT-avg(CLS-token) 54.39 48.34
BERT-whitening 74.70 66.98
SBERT(SNLI) 74.40 72.41
SBERT(STS-B) 82.10 77.69
SimCSE 76.55 71.91
ConSERT 78.35 72.48
ESimCSE 78.82 71.81

更具体方法原理和效果,请看我的知乎博客https://zhuanlan.zhihu.com/p/450993543?

环境

  • python=3.6
  • torch=1.7
  • transformers=4.5.0

数据集

https://github.com/pluto-junzeng/CNSD 中的Chinese-SNLI数据集和Chinese-STS-B数据集

nlp-series-sentence-embeddings's People

Contributors

zhoujx4 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.