Code Monkey home page Code Monkey logo

extremely-efficient-query-encoder's Introduction

extremely-efficient-online-query-encoding-for-dense-retrieval is an extension of the popular Tevatron package (commit), adding the ability to use a small query encoder (with a large passage encoder) to have very low encoding time, while incurring minor impact in quality.

Instructions

  1. Create (teacher) embeddings for all queries in the train set, using
    python -m tevatron.driver.encode --output_dir /tmp/encode --model_name_or_path Luyu/co-condenser-marco --fp16 \
    --per_device_eval_batch_size 128 \
    --encode_in_path ../resources/pretrain_data/train_queries_tokens.jsonl \
    --encoded_save_path ../resources/pretrain_data/train_queries.pt`
  2. Run pretraining using python -m run_pretraining.pretrain
  3. Run training using marco_train_pretrained_model.sh
  4. Evaluate using full_eval.sh

Citations

@article{cohen2024indi,
  title={Extremely efficient online query encoding for dense retrieval},
  author={Cohen, Nachshon and Fairstein, Yaron and Kushilevitz, Guy},
  booktitle={Findings of the Association for Computational Linguistics: NAACL 2024},
  year={2024}
}

extremely-efficient-query-encoder's People

Contributors

amazon-auto avatar

Stargazers

 avatar Adeel Ahmad avatar Aman Talwar avatar Hakeem Demi avatar Mohammed OE Abdallah avatar steip avatar Mike avatar  avatar Andrejs Agejevs avatar

Watchers

Mike avatar  avatar  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.