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.2

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.2 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.2.tar.gz (49.5 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.2-cp310-cp310-macosx_11_0_arm64.whl (343.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for sara_engine-0.2.2.tar.gz
Algorithm Hash digest
SHA256 6798bf431d8e8b7ee57e20fc9fc6415941a9aef86052a2f9fed4ceca43bbfb9f
MD5 4758dbff2fcf0c8a0f0053ae23b78312
BLAKE2b-256 28d726ab22e1c13c9fb82e4903d6015752e058d92d1532b261275c987365cb3c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sara_engine-0.2.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd112e0c8dc0203636caecb92b6738dbfe52aa49b083c9884201792629050422
MD5 8a0a3a36e7b30c734e7dc88bbb621d77
BLAKE2b-256 fe94b35f3a543c76c5a81e0be01ac60d5729d8eec1736eb33f06352046586dab

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