Skip to content

About

"High-performance, atomic neural network weight synchronization library for live AI inference."

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

Repository files navigation

PyPI version License: MIT

Synaptic-Delta-Sync (SDS) 🚀

Synaptic-Delta-Sync (SDS) is a high-performance, production-grade infrastructure library designed for atomic, secure, and zero-downtime neural network weight updates.

In modern AI environments, updating models often requires a full restart, leading to service disruption. SDS bridges this gap by enabling hot-swapping of weights directly into live inference engines without stopping the process.


🏗️ Architecture Overview

The SDS pipeline is designed for modularity, speed, and integrity. The architecture separates weight extraction, cryptographic validation, and device-specific injection into distinct, highly optimized layers.

graph TD
subgraph "Phase 1: Preparation"
A[Live Model] -->|Extract| B[Delta Engine]
B -->|Sparse Diff| C[Serialized .sds Patch]
end
subgraph "Phase 2: Injection"
C -->|Verify| D[Patch Validator]
D -->|Hash Check| E[Atomic Injector]
end
subgraph "Phase 3: Execution"
E -->|Route| F{Device Selection}
F -->|CPU| G[Atomic Injection]
F -->|GPU| H[Async CUDA Stream]
G --> I[Updated Model]
H --> I
end
Loading

💎 Core Technical Pillars

  • Atomic Injection & Zero-Downtime: SDS modifies model weights at the memory-pointer level using torch.no_grad(), ensuring zero-drop inference.
  • Sparse Delta Engine: Reduces patch sizes from MBs to KBs using mathematical delta computation.
  • Cryptographic Security: SHA-256 integrity handshake verifies every patch before application.
  • Dual-Engine Performance: Optimized paths for both CPU (direct memory) and GPU (Async CUDA Streams).

📦 Quick Start

Installation

Clone the repository to your local workspace:

git clone [https://github.com/ANSH-GIT77/synaptic-delta-sync.git](https://github.com/ANSH-GIT77/synaptic-delta-sync.git)
cd synaptic-delta-sync

Basic Usage

The AtomicInjector class handles all the heavy lifting automatically:

from sds.core.injection import AtomicInjector
from sds.protocol.serializer import load_patch

# 1. Initialize engine
injector = AtomicInjector(model)

# 2. Load secure patch
delta, metadata, patch_hash = load_patch("updates.sds")

# 3. Apply patch
injector.apply_patch(delta, patch_hash=patch_hash)

📁 Project Structure

synaptic-delta-sync/
├── sds/
│   ├── core/           # Engine Logic
│   ├── hot_swap/       # Validation
│   └── protocol/       # Serialization
├── examples/           # Tests
└── pyproject.toml      # Config


📈 Roadmap

  • v0.1.0: Core Engine & Security Validator.
  • Next: Distributed Patching (RPC) & Multi-GPU sharding.

🤝 Author

Ansh Nimbalkar | AI Infrastructure Engineer

GitHub Profile

About

"High-performance, atomic neural network weight synchronization library for live AI inference."

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages