Library for Nearest Shrunken Centroids
Forked from Libsplinter, LibNSC is a mathematical framework for creating advanced, LLM-free, and highly-accurate classification models based on natural language. It fuses Snell's Prototypical Networks with Mahalanobis distance, built on a Linux-native semantic substrate specifically written for high-signal Physics and ML vector-based data ingestion and geometric research.
LibNSC is useful to everyone from psychologists to biblical scholars to physicists, as well as trust & safety professionals and quality assurance engineers.
Core functionality works, but needs a fully-implemented API for crypto and graphing before v1 (as well as finish forking off from Splinter).
- LLM-free, highly-accurate natural-language classification
- Fusion of Snell's Prototypical Networks with Mahalanobis distance
- Linux-native semantic substrate
- High-signal ingestion for Physics and ML vector data
- Geometric research oriented
A convenience Makefile wraps the CMake build. From the repo root:
make # configure + build (Release) into ./build
make test # build, then run the ctest suite (unit, stress, valgrind)
make install # build, then install (PREFIX=/usr/local by default)
make clean # remove compiled objects/binaries, keep the build dir
make distclean # remove the build directory and all build artifacts
Useful variables:
make BUILD_DIR=out build # build in a custom directory
make CMAKE_FLAGS="-DWITH_LUA=ON" build # enable optional features
make PREFIX=/opt/libnsc install # install elsewhere
Optional features (off by default): -DWITH_EMBEDDINGS, -DWITH_NUMA,
-DWITH_LUA, -DWITH_LLAMA, -DWITH_RUST, -DWITH_WASM.
The CLI tools build into build/client/ as nsc_cli and nscp_cli, with
nscctl/nscpctl convenience symlinks.
LibNSC is released under a mix of the Apache 2.0 and MIT software licenses, with clear delineation in file headers. See the LICENSE-APACHE and LICENSE-MIT files for full terms.
Please see CONTRIBUTING.md.
Please see SECURITY.md.
Please see CODE_OF_CONDUCT.md.