Alok v1.0
neuro-symbolic reasoning engine
2 min readupdated
Alok v1.0 is an open-source experimental prototype of a Neuro-Symbolic Latent Reasoning Engine (NS-LRE) that ditches standard autoregressive LLMs (large language models) altogether. Instead of generating text token by token, the model separates syntactic parsing, latent space simulation (world simulator), and deterministic verification. At just 542 million parameters, it avoids memorizing internet trivia and dynamically binds scientific entities to temporary RAM slots at runtime. The project is built for exact logical, mathematical, and physics calculations with zero hallucinations.
Key features
- Four-layer architecture: combines a linguistic cortex, a latent world simulator, a recursive reasoning core, and a symbolic core.
- Dynamic memory: stores zero static entities in its weights, binding terms to active runtime slots instead.
- Deterministic verification: the symbolic core strictly enforces physical unit dimensions and interval bounds.
- Lightweight footprint: weighs in at around 1 GB in bfloat16 and runs on a single consumer GPU.
What you can do
- Solve equations: find limits, compute symbolic derivatives, and analyze dynamical recurrences.
- Verify physics problems: check calculations for dimensional consistency across physical units (kg, m, s, etc.).
- Integrate into pipelines: plug it in as a strict math solver for scientific and educational tools.
Example
import os, sys, torch
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
repo_dir = snapshot_download(repo_id="shivrajgurjar/Alok-v1-542M-NSLRE")
sys.path.insert(0, repo_dir)
from alok_src.alok_engine import AlokSystem
from alok_src.inference import AlokInferenceEngine
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = AlokSystem().to(device)
weights = load_file(os.path.join(repo_dir, "model.safetensors"), device=str(device))
model.load_state_dict(weights, strict=True)
engine = AlokInferenceEngine(model, device=device)
result = engine.solve_prompt("At every step PlasmaInjector retains 3 divided by 4 of state plus 9 . Find the limit as time goes to infinity .", loops=8)
print("Answer:", result["answer"])
Read more
DetailsBenchmarks: 100% ULG graph compilation accuracy and 100/100 trap rejections.
Hardware requirements: roughly 1.009 GB VRAM (bfloat16 format).
Limitations: trained on structured formal templates; noisy free-form language support is planned for v2.0.
Notes: trained on 100% synthetic data with no web scraping under the Apache 2.0 license.










Comments