Architecture
Follow the dependency layers from NumPy to Trainer.
Read the guideDEVELOPER DOCUMENTATION v0.2.0
Your guide from the first tensor to a complete training loop.
Read the code. Run the examples. Understand each step.
Python 3.9–3.12NumPy + Matplotlib · CPU first
Local. Open. Inspectable.No account or API key required
THE LEARNING PATH
New to EveryO? Follow the guide in order. Already comfortable? Jump to the API or bring an example into your editor.
01 / GETTING STARTED
Start with Python 3.9–3.12 and an isolated virtual environment. NumPy and Matplotlib power the core CPU workflow; no account or API key is required.
git clone https://github.com/krishanth7/EveryO.git
cd EveryO
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
everyo doctor
everyo demo
git clone https://github.com/krishanth7/EveryO.git
cd EveryO
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install -e .
everyo doctor
everyo demo
everyo doctor runs a real gradient check and
reports optional components. everyo demo trains a
digit classifier. Installation may download dependencies; core
experiments run locally once installed.
No. Start with the NumPy CPU core. Optional integrations have their own prerequisites.
python -m pip install -e ".[onnx]"
# Optional numerical reference:
python -m pip install -e ".[tensorflow]"
CUDA requires compatible hardware and a separate native extension build. Follow the CUDA setup guide. GPU runtime tests are not validated in project CI.
02 / THE NUMERICAL FOUNDATION
A tensor holds numerical data, its shape, and gradient state. Python lists use float32 by default; NumPy arrays retain their precision.
import everyo as eo
x = eo.tensor([[1.0, 2.0]])
y = eo.tensor([[3.0], [4.0]])
print(x.shape) # (1, 2)
print(eo.matmul(x, y))
# Tensor([[11.]], shape=(1, 1), dtype=float32)
shapeThe size of every dimension.
dtypeThe numerical precision.requires_gradWhether operations build a gradient graph.
03 / FOLLOW THE GRAPH
EveryO records the multiplication because x requires
gradients. The backward pass fills x.grad with
[4.]: the derivative of x² at x = 2.
import everyo as eo
x = eo.tensor([2.0], requires_grad=True)
y = x * x
y.backward()
print(x.grad) # [4.]
04 / COMPOSE LAYERS
Connect a four-feature input to a three-class output with a hidden layer and ReLU activation. This model has 131 trainable parameters.
import everyo as eo
model = eo.Sequential(
eo.Linear(4, 16, seed=0),
eo.ReLU(),
eo.Linear(16, 3, seed=1),
)
print(model.num_parameters()) # 131
CrossEntropyLoss applies log-softmax internally.
End your classifier with a plain Linear layer.
05 / A COMPLETE EXPERIMENT
This self-contained example creates a seeded dataset, holds out 20% for evaluation, and trains with Adam. Run it after installing EveryO.
import everyo as eo
from everyo.datasets import make_blobs
features, labels = make_blobs(
n_samples=600, n_features=4, centers=3, seed=0
)
x_train, x_test, y_train, y_test = eo.stratified_split(
features, labels, test_size=0.2, seed=0
)
model = eo.Sequential(
eo.Linear(4, 16, seed=0), eo.ReLU(),
eo.Linear(16, 3, seed=1),
)
trainer = eo.Trainer(
model, eo.Adam(model.parameters(), lr=0.01),
eo.CrossEntropyLoss(), metrics=["accuracy"],
)
train_loader = eo.DataLoader(
eo.ArrayDataset(x_train, y_train),
batch_size=32, shuffle=True, seed=0,
)
test_loader = eo.DataLoader(
eo.ArrayDataset(x_test, y_test), batch_size=64,
)
history = trainer.fit(
train_loader, epochs=20, validation_loader=test_loader
)
print(trainer.evaluate(test_loader))
Accuracy depends on the generated data and training run. Inspect the returned evaluation metrics rather than assuming a fixed result.
06 / KEEP YOUR WORK
EveryO stores model architecture and weights in a pickle-free
.evo archive. After training the model above, save it
and reload it for inference.
from pathlib import Path
Path("artifacts").mkdir(exist_ok=True)
eo.save(model, "artifacts/model.evo")
restored = eo.load("artifacts/model.evo")
restored.eval()
with eo.no_grad():
predictions = restored(eo.tensor(x_test[:3]))
print(predictions.shape) # (3, 3)
For supported ONNX exports, validate the exported graph in your target runtime. The traced exporter specializes control flow to the recorded execution.
See the save/load example07 / API REFERENCE
eo.tensor(data, ...)
Create a tensor. Set requires_grad=True to record operations.
Tensor.backward()
Differentiate a scalar result and accumulate gradients.
eo.Sequential(*layers)
Compose layers into a feed-forward model.
eo.Linear(in_features, out_features)
An affine layer with optional bias, initializer, and seed.
eo.Adam(parameters, lr=...)
Adaptive optimization with per-parameter state.
eo.Trainer(model, optimizer, loss_fn)
Train, evaluate, and predict with callbacks and history.
eo.save(model, path)
Write a pickle-free .evo archive.
eo.load(path)
Rebuild a supported model and restore its parameters.
08 / WHEN SOMETHING DOESN’T CLICK
Start with everyo doctor, then check the environment,
tensor shapes, and optional integrations.
Activate the same virtual environment used for installation, run
python -m pip install -e . from the framework
checkout, and use that interpreter to run your script.
Inspect x.shape and the input/output dimensions of
each layer. Dense layers expect the last dimension to match
in_features. Images use NHWC: batch, height, width,
channels.
Gradient accumulation is intentional. In a manual training loop,
call optimizer.zero_grad() before computing the
next backward pass. Trainer manages the standard
training loop.
The CPU workflow still works. CUDA requires the native extension
and compatible NVIDIA hardware. Review the
CUDA guide
and optional-component report from everyo doctor.
Use GitHub Discussions for usage questions. For a bug, include a minimal example, versions, hardware, and complete error text with private data removed.
09 / KEEP EXPLORING
Follow the dependency layers from NumPy to Trainer.
Read the guideUnderstand mixed precision, ONNX, and distributed limitations.
Read the guideDiagnose installation, shapes, devices, and optional components.
Find helpGo from a gradient to convolution and attention.
Pick an exampleThe complete installation and first-model guide, including tensors, gradients, CNNs, charts, and model saving.
Read the complete guide →Trace computation graphs, the reverse-mode backward pass, gradient accumulation, broadcasting, and finite-difference verification.
Read the complete guide →Explore the complete public API: tensors, layers, losses, optimizers, training, callbacks, serialization, profiling, and command-line tools.
Read the complete guide →Build the optional CUDA extension, understand fallback and strict mode, inspect kernels, and distinguish host-backed tensors from resident buffers.
Read the complete guide →YOU HAVE THE FOUNDATIONS.
Try a convolutional network, inspect attention, or change the classifier you just built.
Explore runnable examples Improve the upstream guide