snapkitty
machine-learning
python
sovlm / README.md
SNAPKITTYWEST's picture
Metadata: discovery tags (collection, languages)
162bb78 verified
|
Raw History Blame Contribute Delete
2.99 kB
---
license: other
license_name: snapkitty-tri-license
license_link: https://huggingface.co/Snapkitty/sovlm/blob/main/LICENSE.tri
tags:
- snapkitty
- machine-learning
- python
---
> Source: [github.com/SNAPKITTYWEST/sovlm](https://github.com/SNAPKITTYWEST/sovlm)
# sovlm
![Python](https://img.shields.io/badge/python-3.11+-blue?style=flat-square)
![Zero GPU](https://img.shields.io/badge/GPU-zero-black?style=flat-square)
![Zero Training](https://img.shields.io/badge/training-zero-black?style=flat-square)
![License](https://img.shields.io/badge/license-SOVEREIGN-gold?style=flat-square)
![Author](https://img.shields.io/badge/author-Ahmad_Ali_Parr-red?style=flat-square)
**Sovereign Statistical Language Model.**
N-grams + Kneser-Ney + BM25 Retrieval + QRNG sampling.
No training. No backprop. No GPU. Pure governance.
Part of the SnapKitty Collective sovereign AI stack.
---
## Install
```bash
pip install -e ".[dev]"
# or
uv pip install -e ".[dev]"
```
## Usage
```bash
# Build from your corpus (Lean proofs, Prolog, docs, anything)
sovlm build data/*.lean data/*.pl data/*.md --order 4
# Generate
sovlm generate -p "theorem main : " -m 200
# Stream
sovlm generate -p "The 49th Call is" --stream
# Quantum RNG sampling
sovlm generate -p "lemma " --qrng
# Serve HTTP API
sovlm serve --port 8080
```
## Python API
```python
from sovlm import Generator, build_from_paths
from pathlib import Path
# Build
d, ng, sg, inv, fz = build_from_paths([Path("corpus.md")], ...)
# Generate
gen = Generator(d, kn, sg, fz, inv, blender, sampler)
result = gen.generate("theorem xor_assoc : ", max_tokens=100)
```
## Architecture
| Component | Role |
|---|---|
| `Dictionary` | Vocabulary sovereignty β€” you own the tokens |
| `NGramIndex` | Local coherence β€” what follows what |
| `KneserNey` | Smoothing β€” handle unseen contexts |
| `SkipGramIndex` | Structural patterns at distance |
| `FuzzyPrefixIndex` | LSH near-miss β€” graceful degradation |
| `InvertedIndex + BM25` | Retrieval β€” what's relevant in corpus |
| `Blender` | Arbitration β€” Markov vs retrieval |
| `Sampler + QRNG` | Entropy β€” unbiased, quantum-seeded choice |
## SnapKitty Stack Integration
```
sovlm ──► abjad-machine (SUBLEQ address space)
──► sovereign-transformer (plasma gate)
──► the-49th-call (Lean 4 verified)
──► bob-orchestrator (Byzantine council)
```
---
*Ahmad Ali Parr Β· SnapKitty Collective Β· 2026*
---
## License
Licensed under **SnapKitty Tri-License**. Full text: [LICENSE.tri](LICENSE.tri).
### πŸ’Ό Commercial License
Snapkitty code is free and open under **AGPL-3.0** for open-source use. Building a commercial product or service? A **proprietary commercial license** from Snapkitty Collective LLC lets you ship this code without the AGPL's source-sharing and network-use obligations.
**[β†’ Get a commercial license](mailto:A.parr@belespritdaccord.uk?subject=Commercial%20license:%20sovlm)** Β· A.parr@belespritdaccord.uk