Skip to main content

OXS: Optimized X-Scale SOTA Engine

Project description

OXS: Optimized X-Scale SOTA Engine

OXS is a high-performance Neural-Symbolic AI Operating System kernel designed for extreme efficiency on consumer and server-grade hardware. It features a custom CUDA backend (maxwell_core) optimized for Pascal, Volta, Ampere, and Hopper architectures.

Features

  • SOTA CUDA Kernels:
    • Tiled FP32 execution for Pascal (GTX 1050 Ti+).
    • Tensor Core (WMMA) support for newer GPUs.
    • Fused Backward Pass (Weight Gradients calculated on GPU).
  • Quantization: Native support for 2-bit Packed Weights (Ternary {-1, 0, 1}).
  • Pythonic API: PyTorch-like interface (oxs.Linear, oxs.SGD).

Installation

Prerequisites

  • Python 3.8+
  • NVIDIA CUDA Toolkit 11.0+ (Tested on 12.5)
  • Visual Studio 2019/2022 (Windows) or GCC (Linux) with C++17 support.
  • CMake 3.18+

Install from Source

git clone https://github.com/pantheon/oxs.git
cd oxs
pip install .

Quick Start

import oxs
import numpy as np

# 1. Define Model
layer = oxs.Linear(in_features=1024, out_features=10)
optimizer = oxs.SGD([layer], lr=0.1)

# 2. Dummy Data
x = np.random.randn(32, 1024).astype(np.float32)
y_target = np.random.randn(32, 10).astype(np.float32)

# 3. Training Loop
for epoch in range(50):
    # Forward (Quantized on the fly)
    y_pred = layer.forward(x)
    
    # Loss (MSE)
    diff = y_pred - y_target
    loss = np.mean(diff**2)
    
    # Backward
    grad_loss = 2.0 * diff / x.size
    layer.backward(grad_loss)
    
    # Update
    optimizer.step()
    
    print(f"Epoch {epoch}: Loss {loss:.4f}")

License

MIT License. See LICENSE for details.

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

oxs-0.1.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

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

oxs-0.1.0-cp311-cp311-win_amd64.whl (167.2 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

Details for the file oxs-0.1.0.tar.gz.

File metadata

  • Download URL: oxs-0.1.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for oxs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 522d7b28c611bb1aa663b7bfe002a96e862a22bac77744b3f5877fb58314d746
MD5 a6845eb741b8907496e132c9c9fd59de
BLAKE2b-256 999bc41905e54cbd84dad96b651cbb702b242f2b6dbb9623ea5d531afe2ef474

See more details on using hashes here.

File details

Details for the file oxs-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: oxs-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 167.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for oxs-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7316ecb37a86c837bdb54b84711aa41e2e80770246bd497c8a6ce7e73f4af2ae
MD5 58e3c4fbe7f3cfdde5ec556e0d841f0f
BLAKE2b-256 1198bef54fe00d85a06bc6a3d44713be1843fe870e2e8b69110f23241db50007

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