sequence

Sequence algorithms for use in Flashlight.

https://github.com/flashlight/sequence

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

Sequence algorithms for use in Flashlight.

Basic Info
  • Host: GitHub
  • Owner: flashlight
  • License: mit
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 75.2 KB
Statistics
  • Stars: 14
  • Watchers: 27
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Created over 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

Flashlight Sequence: Algorithms for Sequence Data

Quickstart | Installation | Python Documentation | Citing

CircleCI Join the chat at https://gitter.im/flashlight-ml/community Codecov Vcpkg

Flashlight Sequence is a library with fast implementations of sequence-based operations. It includes: - A fast, parallel CPU implementation of the Viterbi algorithm for greedy "argmax-style" decoding - Fast implementations (CPU and CUDA) of the Wav2letter ASG loss function including the fully-connected and forced-alignment algorithms.

Quickstart

Flashlight Sequence has Python bindings. To install the bindings from source, [optionally install CUDA] then clone the repo and build: shell git clone https://github.com/flashlight/sequence && cd sequence pip install . To install with CUDA support, set the environment variable USE_CUDA=1 when running the install command. By default, bindings are installed with OpenMP support; to build and install without OpenMP, set the environment to have USE_OPENMP=0 when buildling.

See the full Python binding documentation for examples and more.

Building and Installing

From Source (C++) | With vcpkg (C++) | From Source (Python) | Adding to Your Own Project (C++)

Requirements

At minimum, C++ compilation requires: - A C++ compiler with good C++17 support (e.g. gcc/g++ >= 7) - CMake — version 3.16 or later, and make - A Linux-based operating system.

CUDA Support: If building with CUDA support, CUDA >= 9 is recommended. To toggle CUDA support use the FL_SEQUENCE_USE_CUDA CMake option or the USE_CUDA environment variable when building the Python bindings. To toggle OpenMP support, use the FL_SEQUENCE_USE_OPENMP CMake option or use the USE_OPENMP environment variable when building the Python bindings.

Tests: If building tests, Google Test >= 1.12 is required, but is installed automatically on build if not found. The FL_SEQUENCE_BUILD_TESTS CMake option toggles building tests.

Instructions for building/installing the Python bindings from source can be found here.

Building from Source

Building the C++ project from source is simple: bash git clone https://github.com/flashlight/sequence && cd sequence cmake -S . -B build cmake --build build --parallel cd build && ctest && cd .. # run tests cmake --install build # install at the CMAKE_INSTALL_PREFIX To enable CUDA while building, pass -DFL_SEQUENCE_USE_CUDA=ON to CMake. To enable building with OpenMP, pass -DFL_SEQUENCE_USE_OPENMP=ON to CMake. To disable building tests, pass -DFL_SEQUENCE_BUILD_TESTS=OFF.

If building with CUDA < 11, NVIDIA cub is required. It will be downloaded automatically if not found; the FL_SEQUENCE_BUILD_STANDALONE build option controls this behavior.

With vcpkg

Flashlight Sequence can also be installed and used downstream with the vcpkg package manager. The port contains optional features for building with OpenMP and/or CUDA: bash vcpkg install flashlight-sequence # no dependencies, or: vcpkg install "flashlight-sequence[cuda]" # with CUDA vcpkg install "flashlight-sequence[openmp]" # with OpenMP vcpkg install "flashlight-sequence[cuda,openmp]" # with both!

Adding Flashlight Sequence to a C++ Project

Given a simple project.cpp file that includes and links to Flashlight Sequence: ```c++

include

include

int main() { auto res = fl::lib::cpu::ViterbiPath::compute(...); std::cout << "ViterbiPath result[0] " << res[0] << std::endl; return 0; } ```

The following CMake configuration links Flashlight and sets include directories:

```cmake cmakeminimumrequired(VERSION 3.16) set(CMAKECXXSTANDARD 17) set(CMAKECXXSTANDARD_REQUIRED ON)

add_executable(myProject project.cpp)

findpackage(flashlight-sequence CONFIG REQUIRED) targetlink_libraries(myProject PRIVATE flashlight::flashlight-sequence) ```

Contributing and Contact

Contact: jacobkahn@fb.com

Flashlight Sequence is actively developed. See CONTRIBUTING for more on how to help out.

Citing

You can cite Flashlight using: @misc{kahn2022flashlight, title={Flashlight: Enabling Innovation in Tools for Machine Learning}, author={Jacob Kahn and Vineel Pratap and Tatiana Likhomanenko and Qiantong Xu and Awni Hannun and Jeff Cai and Paden Tomasello and Ann Lee and Edouard Grave and Gilad Avidov and Benoit Steiner and Vitaliy Liptchinsky and Gabriel Synnaeve and Ronan Collobert}, year={2022}, eprint={2201.12465}, archivePrefix={arXiv}, primaryClass={cs.LG} }

For the AutoSegmentation Criterion (ASG), cite: @article{collobert2016wav2letter, title={Wav2letter: an end-to-end convnet-based speech recognition system}, author={Collobert, Ronan and Puhrsch, Christian and Synnaeve, Gabriel}, journal={arXiv preprint arXiv:1609.03193}, year={2016} }

License

Flashlight Sequence is under an MIT license. See LICENSE for more information.

Owner

  • Name: flashlight
  • Login: flashlight
  • Kind: organization
  • Email: jacobkahn@fb.com

A C++ standalone library for machine learning.

Citation (CITATION)

@misc{kahn2022flashlight,
      title={Flashlight: Enabling Innovation in Tools for Machine Learning},
      author={Jacob Kahn and Vineel Pratap and Tatiana Likhomanenko and Qiantong Xu and Awni Hannun and Jeff Cai and Paden Tomasello and Ann Lee and Edouard Grave and Gilad Avidov and Benoit Steiner and Vitaliy Liptchinsky and Gabriel Synnaeve and Ronan Collobert},
      year={2022},
      eprint={2201.12465},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

GitHub Events

Total
  • Issues event: 2
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 1
  • Fork event: 1
Last Year
  • Issues event: 2
  • Watch event: 1
  • Issue comment event: 1
  • Push event: 1
  • Fork event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 24
  • Total Committers: 3
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.208
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
jacobkahn j****1@g****m 19
generatedunixname89002005287564 g****4@m****m 3
Richard Barnes r****s@m****m 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 4
  • Total pull requests: 18
  • Average time to close issues: 19 days
  • Average time to close pull requests: 6 days
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 1.5
  • Average comments per pull request: 2.61
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • asadullah797 (2)
  • mukherjeesougata (1)
  • haoyunlf (1)
  • jacobkahn (1)
Pull Request Authors
  • jacobkahn (18)
Top Labels
Issue Labels
Pull Request Labels
CLA Signed (18) Merged (9) fb-exported (2)