GithubHelp home page GithubHelp logo

oliviershi / lightrnn-nips2016-tensorflow_code Goto Github PK

View Code? Open in Web Editor NEW

This project forked from soloice/lightrnn-nips2016-tensorflow_code

0.0 1.0 0.0 1.91 MB

The tensorflow implementation of NIPS2016 paper "LightRNN: Memory and Computation-Efficient Recurrent Neural Networks" (https://arxiv.org/abs/1610.09893)

Python 100.00%

lightrnn-nips2016-tensorflow_code's Introduction

LightRNN-NIPS2016-Tensorflow_code

The tensorflow implementation of NIPS2016 paper "LightRNN: Memory and Computation-Efficient Recurrent Neural Networks" (https://arxiv.org/abs/1610.09893)

LightRNN: Memory and Computation-Efficient Recurrent Neural Networks

To address the both model size and running time, especially for text corpora with large vocabularies, the author proposed to use 2-Component (2C) shared embedding for word representations. They allocate every word in the vocabulary into a table, each row of which is associated with a vector, and each column associated with another vector. Depending on its position in the table, a word is jointly represented by two components: a row vector and a column vector. Since the words in the same row share the row vector and the words in the same column share the column vector, we only need 2 \sqrt(V) vectors to represent a vocabulary of |V| unique words, which are far less than the |V| vectors required by existing approaches. The LightRNN algorithm significantly reduces the model size and speeds up the training process, without sacrifice of accuracy (it achieves similar, if not better, perplexity as compared to state-of-the-art language models).

More details please refer the LightRNN paper (https://arxiv.org/abs/1610.09893)

Dependencies

Usage

python train_lm.py --data_path=./data/

Others

  • For minimum weight perfect matching algorithm, we use the minimum cost flow solver in ortools.
  • Currently, we test the code on PTB dataset.
  • This is a initital version, I may optimize it in the future time. If you find any problems, please don't hesitate to contact me: eewangyisen AT gmail DOT com

Update

  • Fix one bug on the loss_dict_r and loss_dict_c. (Feb. 15, 2017)

lightrnn-nips2016-tensorflow_code's People

Contributors

yisenwang avatar

Watchers

James Cloos 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.