Repository navigation
inferna 0.6.0
Changes since the last Release
Changed
-
EmbeddedServeruses cpp-httplib (MIT) instead of Mongoose (GPL-2.0-only or commercial). The wheel declared MIT but linked GPL code. cpp-httplib is staged from llama.cpp'svendor/tree byscripts/manage.py, so it tracks the pinned llama.cpp version; this matches cyllama. An existingthirdparty/tree needsscripts/manage.py build --llama-cpp --deps-onlyonce to stage it; otherwise CMake stops and names the missing directory. Behaviour changes:- The server accepts requests from
start(), not only duringwait_for_shutdown(). - Requests run on httplib's thread pool. Those beyond
n_parallelwait for a free slot instead of failing with 500 or 503. - SSE frames go to the socket from the generating thread. The worker-thread queue drained by the poll loop is gone.
- The listener sets
SO_REUSEADDRinstead of httplib's defaultSO_REUSEPORT, which would let another process bind the same port. - httplib is configured as llama-server configures it:
TCP_NODELAY, a listen backlog of 512, 3600 s read and write timeouts, and 32 KiB URIs. - Request bodies over
ServerConfig.max_body_bytesget 413 before they are read, in both servers. The default, 100 MB, is llama-server's. Mongoose capped them at 3 MiB;PythonServerhad no cap.
- The server accepts requests from
-
llama.cpp is built with
LLAMA_OPENSSL=OFF, andlibllama-commonandlibcpp-httplibare no longer built, copied or linked. Nothing referenced them, and they brought in OpenSSL. -
sqlite-vector 1.0.0 -> 1.1.2, which moves it from the Elastic License 2.0 to Apache-2.0. ELv2 forbade offering it as a managed service and allowed commercial use only under a paid license, which the MIT wheel did not disclose. 1.1.0 also fixes two crashes, an SQL injection through table names and several out-of-bounds reads (upstream changelog). Its AVX2 and AVX-512 kernels need per-file ISA flags, which CMake now passes as upstream's Makefile does. Without them every x86 build used the scalar fallback. An existing
build/sqlite-vectorclone is shallow at 1.0.0; delete it beforescripts/manage.py build --sqlite-vector. -
The wheel ships the licenses of the code compiled into it. It shipped only inferna's own
LICENSE, although the MIT, BSD and Apache licenses of vendored code all require their notice in binary copies. Each builder inscripts/manage.pynow declareslicense_files, staged intothirdparty/<project>/licenses/, and a missing file fails the build. The list comes from the symbols in the linked archives: llama.cpp, whisper.cpp, stable-diffusion.cpp, sqlite-vector, cpp-httplib, nlohmann/json, darts-clone, oniguruma, utf8proc, miniz, rotate-bits, xxhash and sha256. Public-domain code (stb, miniaudio, sha1, subprocess.h, kuba zip) needs none. miniz's MIT notice exists only insideminiz.hand is extracted from it.
Removed
- The server's
--log-levelflag,MongooseLogLevelandEmbeddedServer.set_mongoose_log_level(): httplib has no connection-level trace. AlsoEmbeddedServer.get_available_slot(),MongooseConnection(nowHttpResponse), and the Mongoose C examples and debug scripts undertests/.
Fixed
-
EmbeddedServerignoredtemperature,min_pandseedon non-streamed chat, and never readmin_porseedfrom the request on either path. Both paths now apply all three, asPythonServerdoes. -
Streamed chat sent the start of a stop string before matching it. Output now passes through
stop_at, which holds back text that may begin a stop string. Both servers also cut non-streamed output at the earliest match, not the first stop in list order, and treat a stringstopas one stop instead of a set of characters. A stop string completed by the last allowed token now reportsfinish_reason: "stop", not"length". -
SqliteVectorStore.quantize()lost recall with cosine and dot on non-negative embeddings. Without aqtype, sqlite-vector quantizes non-negative data asUINT8, which subtracts the dataset minimum. That shift cancels in L2 and L1 but not in cosine or dot. On vectors in[0.5, 1.5), recall@10 was 0.84 for cosine and 0.70 for dot.quantize()now requestsINT8for both, which gives 0.98 and 0.99. L2, squared L2 and L1 keep the extension's choice. Seedocs/dev/sqlite-vector-quantization.md. -
SqliteVectorStore.search()returned dot-product scores in quantized units afterquantize(). sqlite-vector's quantized scan does not convert them back, so scores were off by 10^4 or more andthresholdfiltered on them. Results keep the scan's ranking but are now scored exactly from the stored vectors and re-sorted. This costs about 0.17 ms per query at k=10 and dimension 384; the quantized scan is still about 10x faster than exact search. Cosine scores were already accurate, as cosine does not depend on the scale. Seedocs/dev/sqlite-vector-quantization.md.