Skip to main content

A bio-inspired Spiking Neural Network engine with Hugging Face-like pipeline APIs (CPU-only, Backprop-free).

Project description

SARA Engine (Liquid Harmony)

SARA (Spiking Advanced Recursive Architecture) is a next-generation AI engine that mimics the biological brain's power efficiency and event-driven processing.

It completely eliminates the "backpropagation (BP)" and "matrix operations" that modern deep learning (ANNs) rely on, achieving advanced recognition, text generation, and retrieval capabilities using only sparse spike communication.

It operates completely on CPU, without using any GPU or NumPy.

Current Version: v0.2.1

Features

  • Hugging Face-like Pipelines: Incredibly easy-to-use API (pipeline("text-generation"), pipeline("image-classification"), etc.).
  • No Backpropagation: Learns natively using biological rules like Spike-Timing-Dependent Plasticity (STDP) and Homeostatic Plasticity.
  • Zero Matrix Math: Replaces dense tensor multiplications with purely discrete spike routing.
  • CPU Only & Eco-Friendly: Does not require expensive GPU resources.

Installation

pip install sara-engine

Quick Start

SARA v0.2.1 introduces an incredibly intuitive pipeline API, bringing the ease of modern NLP frameworks to Spiking Neural Networks.

1. Text Generation (Zero-Shot Inference)

You can easily load pre-trained STDP synapses and generate text autoregressively.

from sara_engine import pipeline

# Load a biologically trained model and tokenizer
generator = pipeline("text-generation", model="path/to/saved_snn_model")

output = generator("Hello, I am a spiking", max_new_tokens=15)
print(output[0]['generated_text'])

2. Feature Extraction & RAG

Extract semantic embeddings using Liquid State Machines (LSM) without any mathematical attention layers.

from sara_engine import pipeline

extractor = pipeline("feature-extraction", model="path/to/saved_extractor")

# Extracts a high-dimensional membrane potential vector
vector = extractor("Artificial intelligence is evolving.")
print(f"Spike Vector Length: {len(vector)}")

3. Image Classification

Process pixels via Retinal Rate Coding directly into SNN layers.

from sara_engine import pipeline

vision_classifier = pipeline("image-classification", model="path/to/vision_model")

# Pass a 2D array of pixel intensities (0.0 to 1.0)
image = [
    [1.0, 0.0, 1.0],
    [0.0, 1.0, 0.0],
    [1.0, 0.0, 1.0]
]
prediction = vision_classifier(image)
print(prediction[0]['label']) # e.g., "Cross (X)"

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sara_engine-0.2.1.tar.gz (46.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sara_engine-0.2.1-cp310-cp310-macosx_11_0_arm64.whl (338.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file sara_engine-0.2.1.tar.gz.

File metadata

  • Download URL: sara_engine-0.2.1.tar.gz
  • Upload date:
  • Size: 46.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.11.5

File hashes

Hashes for sara_engine-0.2.1.tar.gz
Algorithm Hash digest
SHA256 373777fd405481faf7e5d82b8e74ccce03909d5edba7398f2c73db8c7d3674c7
MD5 60ca49255c1f66953d6423933bbe1a66
BLAKE2b-256 168fcf4d63197be3e4d1c5a670d6ae4c39f272312a5aa8593bd9adc63c8f26b3

See more details on using hashes here.

File details

Details for the file sara_engine-0.2.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sara_engine-0.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 830de3b01a2248207eba447862265db84c4b788806ffbadc53a1a48415e1a139
MD5 5251132e5b2f4a68d1d7c0d2fac94977
BLAKE2b-256 2dde69acfc11c460d3284382083a999c9d52651197114600e590ffd8b74ef816

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page