Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/game4all/brainz
Braaaaaaaaaaaaaaaaaaainnnnnss🧠🧟‍♂️🧟‍♂️
https://github.com/game4all/brainz
Last synced: about 2 months ago
JSON representation
Braaaaaaaaaaaaaaaaaaainnnnnss🧠🧟‍♂️🧟‍♂️
- Host: GitHub
- URL: https://github.com/game4all/brainz
- Owner: Game4all
- Created: 2024-04-27T15:38:04.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-08-14T09:52:32.000Z (5 months ago)
- Last Synced: 2024-08-15T00:11:15.102Z (5 months ago)
- Language: Zig
- Size: 222 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
brainz
Braaaaaaaaaaaaaiiiiiiiinnnnnnnnsssss 🧠🧟‍♂️
A small tensor library with just enough operators for Deep Learning written in pure Zig
> **Warning**
> This library is a work in progress. Design considerations aren't set in stone.This library implements a `Tensor` primitive and a subset of operators to design, train and run deep learning models using Zig, on any platform that runs Zig code.
See [ops.zig](src/ops.zig) for a list of currently implemented operators. Also note that making your own is quite straightforward too!
The library provides an abstraction for multithreading / accelerator support with _explicit synchronization_ through the `Device` interface. Operators take a device as parameter and are dispatched in a non-blocking way.
**Synchronization is totally explicit and it is up to the programmer to between insert sync points between dependent computations**.A multi-threaded CPU device is currently available, but we could maybe get some juicy GPU accel someday to go zoomin (soon-ish™).
## Installation
After adding the project to your `build.zig.zon`, add to your `build.zig`
```
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOptions(.{});const brainz = b.dependency("brainz", .{
.optimize = optimize,
.target = target,
});your_project_executable.root_module.addImport("brainz", brainz.module("brainz"));
}```
## Getting started
Please check the `examples/` directory to get started.Want something a little bigger to look at ? See [MNIST from scratch](https://github.com/Game4all/mnist-from-scratch)