Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 854 Bytes

README.md

File metadata and controls

40 lines (27 loc) · 854 Bytes

jsgrad - Fast and Simple ML library for JS

website docs discord

jsgrad is a ML library based on tinygrad, has 0 dependencies and it runs in web, Node, Deno and Bun.

More info and examples: jsgrad.org

Getting Started

With hosted esm script (minimal Llama HTLM example)

<script type="module">
  import { Tensor } from 'https://esm.sh/@jsgrad/jsgrad'

  console.log(await new Tensor([2, 2, 2]).add(5).tolist())
</script>

Install package from npm

Install with:

# with npm
npm install @jsgrad/jsgrad
# with deno
deno install npm:@jsgrad/jsgrad
# with bun
bun install @jsgrad/jsgrad

Use:

import { Tensor } from '@jsgrad/jsgrad'

console.log(await new Tensor([2, 2, 2]).add(5).tolist())