Giter VIP home page Giter VIP logo

openmatch's Introduction

OpenMatch v2

An all-in-one toolkit for information retrieval. Under active development.

Install

git clone https://github.com/OpenMatch/OpenMatch.git
cd OpenMatch
pip install -e .

-e means editable, i.e. you can change the code directly in your directory.

We do not include all the requirements in the package. You may need to manually install torch, tensorboard.

You may also need faiss for dense retrieval. You can install either faiss-cpu or faiss-gpu, according to your enviroment. Note that if you want to perform search on GPUs, you need to install the version of faiss-gpu compatible with your CUDA. In some cases (usually CUDA >= 11.0) pip installs a wrong version. If you encounter errors during search on GPUs, you may try installing it from conda.

Features

  • Human-friendly interface for dense retriever and re-ranker training and testing
  • Various PLMs supported (BERT, RoBERTa, T5...)
  • Native support for common IR & QA Datasets (MS MARCO, NQ, KILT, BEIR, ...)
  • Deep integration with Huggingface Transformers and Datasets
  • Efficient training and inference via stream-style data loading

Docs

Documentation Status

We are actively working on the docs.

Project Organizers

  • Zhiyuan Liu
  • Zhenghao Liu
  • Chenyan Xiong
  • Maosong Sun

Acknowledgments

Our implementation uses Tevatron as the starting point. We thank its authors for their contributions.

Contact

Please email to [email protected].

openmatch's People

Contributors

bokesyo avatar edwardzh avatar eureka336 avatar facico avatar gregxmhu avatar jiayuanding100 avatar jindavid avatar law991224 avatar littleroad593 avatar opkmn4x avatar pre-commit-ci[bot] avatar sunsishining avatar wangyx-ethan avatar yizhilll avatar yu-shi avatar yuzc19 avatar zkt12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openmatch's Issues

HuggingFace version

I ran OpenMatch dense retrieval according to docs/dr-msmarco-passage.md, but when installing the dependencies according to README, the evaluation on the dev set during training has problems when the huggingface is up to date(4.27.1)

Question about similarity functions in (T5-)ANCE.

In paper ANCE , the ANCE model uses cosine similarity; where in this repo, the T5-ANCE model seems to use dot similarity.

Have you tried using cosine similarity in T5-ANCE? Does it perform worse than dot similarity? Are there any criteria for determining which similarity function should be used in different models?

has_answers Issue

There is an error in current has_answers function when meeting special characters, such as "café".

We should refer to 'pyserini':

from pyserini.eval.evaluate_dpr_retrieval import has_answers

Feature Request: Support Soft prompt model from OpenDelta

Support and additional type of parameter efficient method from OpenDelta:

One key consideration for getting dense representations from such a model is to only mean pool the hidden state representations of real tokens.
For example:

elif self.pooling == "mean":
      soft_prompt_attention_mask = items.attention_mask
      soft_prompt_attention_mask[
          :, : model.soft_prompt_token_number
      ] = torch.zeros(
          (items.attention_mask.shape[0], model.soft_prompt_token_number)
      )
      reps = mean_pooling(
          hidden, soft_prompt_attention_mask
      )  # only pool hidden reps of real tokens

BEIR Eval Support

merge beir eval pipeline
fix split search for retrieve and successive search

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.