Skip to main content

ASGT Engine: zero-float FFSC spectral centroid classifier and inverse decoder

Project description

ASGT Engine

ASGT Engine is a CPU-native, zero-float research engine for integer-only text retrieval and multimodal medical-style retrieval.

Version 1.1.0 combines:

  • ASGT text RAG over elliptic-curve semantic lattices on GF(65537)
  • FFSC vision encoding over GF(786433) using 2D NTT, Kloosterman coefficients, and algebraic Zernike coefficients over GF(p^2)
  • Hecke-style fusion of text and image fingerprints
  • Binary save/load for trained symbolic knowledge entries
  • A native pybind11 Python extension named asgt_engine

All core similarity and encoding operations use integer arithmetic. No neural network, floating-point vector embedding, or GPU dependency is required by the engine.

Install

pip install asgt-engine

For local development:

python -m pip install build twine pybind11
python -m build

Quick Start

import numpy as np
import asgt_engine

engine = asgt_engine.ASGTEngine()

engine.train_text_batch([
    "The heart pumps blood through the circulatory system",
    "DNA carries genetic instructions for life",
    "Pneumonia may appear as opacity on chest xray",
])

print(engine.retrieve("What pumps blood?", top_k=1)[0].text)

image = np.zeros((256, 256), dtype=np.uint8)
image[96:160, 96:160] = 240

engine.train_vision_batch(
    [image],
    ["Chest xray pattern with focal bright opacity"],
)

matches = engine.retrieve_multimodal(image, top_k=1)
print(matches[0].text)

engine.save_model("medical_symbolic.asgt")

API

engine = asgt_engine.ASGTEngine(a=7, b=13, p=65537)

Text methods:

  • train_text_batch(texts)
  • train_batch(texts)
  • train_step(text)
  • retrieve(query, top_k=3)
  • generate(prompt, max_tokens=1)

Vision and multimodal methods:

  • train_vision_batch(images, texts)
  • retrieve_multimodal(image_pixels, top_k=3)

Persistence:

  • save_model(path)
  • load_model(path)

Stats:

  • vocab_size
  • num_facts
  • num_entries
  • train_steps

Image Input

train_vision_batch and retrieve_multimodal accept each image as either:

  • a flat list of 65536 integer pixels
  • a nested 256 x 256 list
  • a NumPy uint8 array with shape (256, 256)
  • a NumPy uint8 array with shape (65536,)

Image loading and resizing stay in Python. The C++ engine receives only raw grayscale pixels.

Medical Safety

ASGT Engine is a research and retrieval engine. It is not a medical device and does not provide diagnosis. Production medical SaaS deployments must add clinical validation, data governance, access control, audit logging, PHI protections, and clinician-facing safety review.

License

MIT

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

asgt_engine-3.0.0.dev1.tar.gz (111.1 kB view details)

Uploaded Source

File details

Details for the file asgt_engine-3.0.0.dev1.tar.gz.

File metadata

  • Download URL: asgt_engine-3.0.0.dev1.tar.gz
  • Upload date:
  • Size: 111.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for asgt_engine-3.0.0.dev1.tar.gz
Algorithm Hash digest
SHA256 e3ec0fcd000c74870a2216641fa596a7da467e95e4259e1ba2f3d8774c7e80c4
MD5 558549c65fc04cf7fd715bcfae0b33f9
BLAKE2b-256 d80101c8fcc3f40dad90a9c5816e4a803bf08fda6a127c8e51ec9b4433545c49

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