Git Product home page Git Product logo

cdssm's Introduction

Convolutional Deep Semantic Similarity Model

This repository implements CDSSM, which seeks to rank documents given some inputs.

Be sure to read the paper before continuing, as my implementation has begun to differ from the paper.

Instructions

Entry point: clsm_pytorch.py

Relevant Files

A lot of these evidences have been preprocessed into pickle format; the following files / parameters are useful to speed up compute / training time.

  • claims_dict.pkl is used to get a mapping of claims to preprocessed representations, similarly.
  • feature_encoder.pkl and encoder.pkl are used to preprocess text on the fly. They contain a mapping of the trigrams to one-hot vectors, and characters to trigrams respectively. Make sure you have these.
  • The data folder contains all data input needed to run the documents.

These documents are stored in /usr/users/mnadeem/CDSSM_github. The following commands should be able to copy them locally:

cp /usr/users/mnadeem/CDSSM_github/claims_dict.pkl .
cp /usr/users/mnadeem/CDSSM_github/feature_encoder.pkl .
cp /usr/users/mnadeem/CDSSM_github/encoder.pkl .
cp -r /usr/users/mnadeem/CDSSM_github/data/ .

Create the following folders: models and predicted_labels:

mkdir models
mkdir predicted_labels

To run: python3 clsm_pytorch.py --data data/large ARGS

Speedups

  • Running it with the --sparse-evidences flag: this loads a dictionary of preprocessed matricies rather than building it on runtime; that speeds up training significantly.
  • claims_dict.pkl is used to get a mapping of claims to preprocessed representations, similarly.

Notes:

  • I normally run it on a Titan X, and each 2% of the batch takes 20-30s, or around 16 minutes per epoch.
  • I normally use 1 GPU, and haven't noticed a performance speedup with several GPUs.

cdssm's People

Contributors

dependabot[bot] avatar

Stargazers

 avatar rafael-pacheco avatar Ruiyang You avatar Shubham Pachori avatar  avatar Meng Zhao avatar Petr Houška avatar gaoliming avatar Quentin avatar  avatar Ramsey avatar xiaofengzhu avatar Devin Hua avatar Joa(quim) Gómez avatar  avatar Aniket Pradhan avatar  avatar  avatar Cogmeta avatar Rong Zhang avatar

Watchers

Moin Nadeem avatar James Cloos avatar Wei Fang avatar

cdssm's Issues

/usr/users/mnadeem/CDSSM_github

I don't have the folder "/usr/users/mnadeem/CDSSM_github", can you provide the following:

/usr/users/mnadeem/CDSSM_github/claims_dict.pkl
/usr/users/mnadeem/CDSSM_github/feature_encoder.pkl
/usr/users/mnadeem/CDSSM_github/encoder.pkl
/usr/users/mnadeem/CDSSM_github/data/

Thank you very much!

could you provide claims_dict.pkl, feature_encoder.pkl, encoder.pkl?

I also don't have the folder "/usr/users/mnadeem/CDSSM_github", can you provide the following:

/usr/users/mnadeem/CDSSM_github/claims_dict.pkl
/usr/users/mnadeem/CDSSM_github/feature_encoder.pkl
/usr/users/mnadeem/CDSSM_github/encoder.pkl
/usr/users/mnadeem/CDSSM_github/data/

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.