Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Game4all/brainz
π§ Braaaaaaaaainnnnnss π§ββοΈ - half finished zig ml lib
https://github.com/Game4all/brainz
Last synced: about 1 month ago
JSON representation
π§ Braaaaaaaaainnnnnss π§ββοΈ - half finished zig ml lib
- 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-10-01T20:58:52.000Z (3 months ago)
- Last Synced: 2024-11-21T08:42:02.402Z (about 1 month ago)
- Language: Zig
- Homepage:
- Size: 232 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)