Giter Site home page Giter Site logo

shademe / thinc-rust-ops Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danieldk/thinc-rust-ops

0.0 1.0 0.0 107 KB

Non-official(!) Rust Thinc Ops, with SIMD-vectorized implementations of many ops. Because Ops are fun to implement.

Python 26.20% Rust 73.80%

thinc-rust-ops's Introduction

๐Ÿงช thinc-rust-ops

This is an experimental, non-official, Python package that implements some Thinc ops using vectorized SIMD functions in Rust ๐Ÿฆ€. The following SIMD instruction sets are currently supported:

  • Scalar
  • ARM64:
    • NEON
  • x86_64:
    • SSE2
    • SSE4.1
    • AVX
    • AVX2 + FMA

โณ Install

Make sure that you have a Rust toolchain installed and then install with pip:

python -m pip install git+https://github.com/danieldk/thinc-rust-ops#subdirectory=thinc-rust-ops

๐Ÿš€ Quickstart

After installation, you can import RustOps and use it like any other Ops implementation:

>>> import numpy as np
>>> from rust_ops import RustOps
>>> ops = RustOps()
>>> ops.gelu(np.arange(-5., 5.))
array([-1.43552511e-06, -1.26744153e-04, -4.04990215e-03, -4.55001283e-02,
       -1.58655251e-01,  0.00000000e+00,  8.41344749e-01,  1.95449987e+00,
        2.99595010e+00,  3.99987326e+00])

thinc-rust-ops's People

Contributors

danieldk avatar shademe avatar

Watchers

 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.