GithubHelp home page GithubHelp logo

amyhei / cdssm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from moinnadeem/cdssm

0.0 0.0 0.0 10.87 MB

Convolutional Deep Semantic Similarity Model

Jupyter Notebook 70.57% Python 28.39% Roff 1.03%

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

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.