> For the complete documentation index, see [llms.txt](https://docs.brain4j.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brain4j.org/readme.md).

# Brain4J

Welcome to the official documentation of **Brain4J**. Here you will find explanations, practical examples, and detailed references covering the core features and design principles of the framework.

### What's Brain4J?

Brain4J is an open-source machine learning framework written entirely in Java, designed for the development, training, and deployment of neural networks with a strong focus on performance, efficiency, and portability.

Unlike traditional machine learning frameworks such as DL4J, PyTorch, or TensorFlow, **Brain4J** does not rely on large external ecosystems or heavyweight native bindings. Its architecture is intentionally minimal, explicit, and close to the underlying math, making behavior predictable and controllable.

### Why choose Brain4J?

* **Pure Java, minimal footprint**: Two <10 MB JARs, almost no external dependencies.
* **Fast by design**: Custom tensor engine with SIMD CPU optimizations and GPU support.
* **Predictable and explicit**: No hidden magic, no opaque graphs, full control over execution.
* **Production-friendly**: Ideal for plugins, lightweight servers, JVM-only and edge environments.
* **More than a toy**: Supports modern models (CNN, RNN, LSTM, Transformers, GCN) and optimizers.

### Start now

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-download">:download:</i></h4></td><td><strong>Installation</strong></td><td>Add Brain4J to your next project</td><td></td><td></td><td><a href="/pages/a3pEKkx1e6ZEJiGKZKFI">/pages/a3pEKkx1e6ZEJiGKZKFI</a></td></tr><tr><td><h4><i class="fa-play">:play:</i></h4></td><td><strong>Quickstart</strong></td><td>Train and deploy your first model in under 30 seconds</td><td></td><td></td><td><a href="/pages/xuoQUNYvoKPM9mxGdPnC">/pages/xuoQUNYvoKPM9mxGdPnC</a></td></tr><tr><td><h4><i class="fa-sitemap">:sitemap:</i></h4></td><td><strong>Basics</strong></td><td>Understand the foundamentals</td><td></td><td></td><td><a href="/pages/DFt47SmvceFKjloYzCkC">/pages/DFt47SmvceFKjloYzCkC</a></td></tr><tr><td><h4><i class="fa-layer-group">:layer-group:</i></h4></td><td><strong>Tensors</strong></td><td>Understand the basic building unit</td><td></td><td></td><td><a href="/pages/koxPkR2K4YstQJ0MPH4h">/pages/koxPkR2K4YstQJ0MPH4h</a></td></tr><tr><td><h4><i class="fa-gauge-max">:gauge-max:</i></h4></td><td>GPU</td><td>Discover how to boost performance using the GPU</td><td></td><td></td><td><a href="/pages/95pIvUZok096eW5xe3qg">/pages/95pIvUZok096eW5xe3qg</a></td></tr><tr><td><h4><i class="fa-notebook">:notebook:</i></h4></td><td>Kotlin Notebooks</td><td>Learn how to use Brain4J in a Jupyter-fashioned way</td><td></td><td></td><td><a href="/pages/0dyo6C80kMFXDTbMX9xR">/pages/0dyo6C80kMFXDTbMX9xR</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.brain4j.org/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
