Developed as a solution to the complexity of modern deep learning frameworks, rriftt_ai.h is a single-header C library that allows users to build, train, and run Transformer models without external dependencies or verbose build systems. Experience pure machine learning efficiency with total memory control.
rriftt_ai.h is a minimal, dependency-free AI library implemented in pure C, designed for developers who require a straightforward and efficient solution for creating neural networks. This single-header C23 library serves as a bare-metal neural network engine, alleviating the complexities associated with modern deep learning frameworks that often rely on extensive dependencies and complex build systems.
rriftt_ai.h in your project to get started.RaiArena, ensuring efficient memory management without any dynamic allocation during execution. This guarantees predictable performance in your applications.Developers can easily start utilizing the library with limited code, as demonstrated in the following example:
#define RRIFTT_AI_IMPLEMENTATION
#include "rriftt_ai.h"
int main(void) {
RaiArena arena = rai_arena_create(1024 * 1024);
RaiTensor A = RAI_TENSOR_ALLOC_FILL(&arena, 2.0f, 2, 2);
RaiTensor B = RAI_TENSOR_ALLOC_FILL(&arena, 3.0f, 2, 2);
RaiTensor C = rai_tensor_add(&arena, A, B);
rai_arena_destroy(&arena);
return 0;
}
Compile your code using a standard C compiler with a simple command:
gcc main.c -o engine -lm
./engine
rriftt_ai.h is actively developed, welcoming contributions for enhancements, optimizations, and new features. The project aims for scalability, allowing community involvement in its evolution.
This library is ideal for those who need a lightweight, efficient solution for AI model implementation without the overhead of traditional machine learning frameworks.
No comments yet.
Sign in to be the first to comment.