LC-0 VIC: Logical Controller Zero / Virtual Intelligent Controller — tiered storage-local retrieval (L0/L1/L2) with bridge-ready APIs.
Project description
LC-0 VIC
LC-0 VIC — Tiered filesystem retrieval: ask natural-language questions about your local files, get ranked results with snippets. A reference implementation for intelligent, queryable storage.
Why this exists • Mission • Architecture • Quick Start • Documentation • Contributing • References • Security • Contact
Why this exists
Kioxia Corporation research line: AiSAQ (All-in-Storage ANNS with Product Quantization for DRAM-free Information Retrieval, arXiv:2404.06004) describes product-quantized, all-in-storage approximate nearest-neighbor search suited to DRAM-constrained and flash-resident indices. Open-source reference implementation: kioxia-jp/aisaq-diskann. Context and deployment notes: docs/KIOXIA_ECOSYSTEM.md.
LC-0 VIC (Logical Controller Zero / Virtual Intelligent Controller) is an open-source reference implementation with a real CLI and tests: pip install, then vic index, vic ask, vic demo, and optionally vic bridge. Architecturally it is tiered retrieval—L0 metadata, L1 vectors, L2 optional deep parsing (skillware)—orchestrated by a controller from a Librarian QueryPlan (offline stub or Ollama). Vectors default to LanceDB; Milvus Lite is optional. Code layout: controller/, librarian/, warehouse/, index/, skillware/, bridge/. It runs fully local-first: you control the model endpoint (Ollama local or remote), data boundary, TLS/exposure, quotas, and governance—while still being more than a paper design (CI-backed, integration-tested).
Landscape — why this repo exists alongside “computational storage landscape”: Retrieval over drives and tiers does not land in isolation. Computational storage landscape maps the broader space; LC-0 VIC is a small, runnable, contract-heavy slice: filesystem-first L0 → L1 → L2, optional Ollama planning, and a JSON HTTP bridge for tools and automation.
This codebase runs on the host today—it does not claim to ship inside any vendor’s SSD firmware binary. The research goal is to explore whether tiered retrieval and these API contracts could map to firmware- or device-adjacent runtimes (e.g. Samsung Magician–class host/device stacks), while this repository stays a portable reference for host tooling, bridges, and tests.
Mission
Unstructured data on disk is usually searched by paths and keywords. LC-0 VIC explores intent-aware retrieval: narrow candidates cheaply (L0/L1), then load to DRAM for evidence only when needed (L2). The design fits research and product narratives around queryable storage, local-first AI, and bridge-ready HTTP surfaces for management UIs.
Architecture
lc0_vic/
├── README.md
├── LICENSE
├── AUTHORS.md
├── pyproject.toml
├── requirements.txt
├── docs/
├── src/lc0_vic/
│ ├── controller/ # L0 → L1 → L2 orchestration
│ ├── librarian/ # Natural language → QueryPlan (stub / Ollama)
│ ├── warehouse/ # Filesystem abstraction
│ ├── index/ # LanceDB or Milvus Lite + manifest + jobs
│ ├── skillware/ # L2 modular parsers
│ ├── bridge/ # HTTP JSON service
│ ├── integrations/ # Ollama HTTP client helpers
│ ├── training/ # Synthetic plans helper (`vic-synthetic-plans`)
│ └── hardware_sim/ # Demo timing hooks only
├── training/
├── scripts/
├── tests/
├── data/mock_storage/
├── data/vector_db/
├── .controller/
└── .firmware/
Tiered retrieval
- L0 — Path, size, mtime, type hints, tags.
- L1 — Chunk embeddings after
vic index --full: default LanceDB (vic_chunks); optional Milvus Lite withVIC_VECTOR_BACKEND=milvusandpip install -e ".[milvus]". Embed model defaultembeddinggemmavia Ollama; overrideVIC_OLLAMA_EMBED_MODEL. - L2 — Skillware modules (PDF layout, OCR, logs) when the plan requests them.
Librarian (Ollama)
stub: default offline planner for CI and quick runs.ollama:POST /api/chattoVIC_OLLAMA_BASE_URLfor both local and remote Ollama-compatible endpoints. SetVIC_OLLAMA_MODELto a tag fromollama liston that server.
Example families (verify tags locally): Qwen (e.g. qwen2.5:4b), Gemma (e.g. gemma2:2b or your pulled images). For remote inference, set privacy_mode=cloud_reasoning_ok when not using loopback; optional VIC_OLLAMA_API_KEY for Bearer auth on gated gateways. Never commit secrets; use .env (gitignored).
Quick start
Install (pip, all optional stacks used in CI and demos):
pip install -e ".[dev,index,bridge]"
Windows (PowerShell): same pip line; use $env:VAR = "value" instead of export, or set VAR=value in cmd.exe. Prefer copying .env.example to .env so you do not rely on shell-specific syntax.
vic --help
vic index --root ./data/mock_storage --db ./data/vector_db
vic ask --format human "Find PDFs related to contracts"
# One-shot demo (seed + index + sample asks; needs Ollama + `.[index]`)
vic demo
Ollama Librarian (Windows example):
set VIC_LIBRARIAN_BACKEND=ollama
set VIC_OLLAMA_MODEL=qwen2.5:4b
set VIC_OLLAMA_BASE_URL=http://127.0.0.1:11434
vic ask "Who signed the contract?"
On Unix: export VAR=value. Copy .env.example to .env for persistent configuration.
HTTP bridge (after pip install -e ".[bridge]"): vic bridge — GET /health, POST /v1/ask, POST /v1/index/start (202 + job_id), GET /v1/index/status. Optional VIC_BRIDGE_API_KEY (Bearer on /v1/*), VIC_BRIDGE_RATE_LIMIT_PER_MIN, VIC_JOB_DB_PATH for SQLite job persistence. See docs/API.md.
Documentation
Start here: Documentation index — links every Markdown file in the repo (root, docs/, training/, scripts/, assets/, data/, .controller/, .firmware/) so nothing is orphaned.
Highlights:
- Architecture — component boundaries and data flow.
- API / contracts —
QueryPlan, bridge routes, environment variables. - Threat model — privacy modes and Ollama URL policy.
- Roadmap & production deep dive — demo path (
scripts/demo.sh/demo.ps1) and phased production work. - Terminal demo —
vic demo,vic ask --format human, warehouse defaults. - Milvus & scale — Milvus Lite (
VIC_VECTOR_BACKEND=milvus, optional[milvus]) plus AiSAQ / scale notes. - Testing — pyfakefs vs real
tmp_pathfor Lance/native I/O. - Security policy — vulnerability reporting and bridge hardening reminders.
- Changelog — release notes (PyPI/GitHub release steps are manual until you configure publishing).
Notebook: notebooks/lc0_vic_live_demo.ipynb — mirrors CLI demo steps (also listed from docs/README.md).
Contributing: CONTRIBUTING.md (links the doc index). Authors: AUTHORS.md.
Contributing
See CONTRIBUTING.md for scope, tests, and pull request expectations.
References
Full bibliography and implementation stance (JAX, TurboQuant, papers):
docs/REFERENCES_AND_RELATED_WORK.md
Algorithms & cited methodology (per-component): docs/METHODOLOGY_AND_ALGORITHMS.md — KIOXIA AiSAQ (L1/ANN scale), BitNet report (Librarian SFT/DPO), ExPAND (I/O topology), SolidAttention (KV/SSD inference lessons).
Local PDF copies (with open-access pointers): docs/papers/README.md — AiSAQ (arXiv:2404.06004), BitNet b1.58 2B4T (arXiv:2504.12285), ExPAND (arXiv:2505.18577), SolidAttention (USENIX FAST ’26).
Selected entry points
- Computational storage landscape — strategic analysis (TinyLM, SSD-tier retrieval, industry context).
- Milvus — AiSAQ — flash-friendly / all-in-storage ANN integration; code lineage: kioxia-jp/aisaq-diskann.
- Software-Enabled Flash (Linux Foundation) — host-visible flash control; softwareenabledflash.org.
- Google TurboQuant — KV / attention-side compression (inference memory); not a substitute for filesystem indexing in LC-0; see reference doc.
- Patent US8780634B2 (CAM NAND) — landscape only.
License
Distributed under the MIT License. See LICENSE.
Security
See SECURITY.md for how to report vulnerabilities and what is in scope. Product-facing privacy and Ollama URL rules: docs/THREAT_MODEL.md.
Contact
Issues: github.com/arpahls/lc0_vic/issues
Organization: ARPA Hellenic Logical Systems
Built & Maintained by ARPA Hellenic Logical Systems & the Community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lc0_vic-0.1.1.tar.gz.
File metadata
- Download URL: lc0_vic-0.1.1.tar.gz
- Upload date:
- Size: 43.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95619f35d5af469aa2e434412fc6da31738e1b249871288ee9cc0bb3ca21b007
|
|
| MD5 |
644f62983d665445bf6c9c1d747027e3
|
|
| BLAKE2b-256 |
c732ab77350b40f039b890fe0cf91a1413c29d3a21840250b73a87c7512de9f9
|
Provenance
The following attestation bundles were made for lc0_vic-0.1.1.tar.gz:
Publisher:
publish.yml on ARPAHLS/lc0_vic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lc0_vic-0.1.1.tar.gz -
Subject digest:
95619f35d5af469aa2e434412fc6da31738e1b249871288ee9cc0bb3ca21b007 - Sigstore transparency entry: 1440225365
- Sigstore integration time:
-
Permalink:
ARPAHLS/lc0_vic@70688426894cb57ac512d7a5d1603a7f64581a28 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ARPAHLS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@70688426894cb57ac512d7a5d1603a7f64581a28 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lc0_vic-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lc0_vic-0.1.1-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96d5dfe2fd297047b12a699a8cdb7a1e4cda23cb0e1ee95e58466c93f66c7ee9
|
|
| MD5 |
9e1b7484100b96e34ab3207e0df4c87f
|
|
| BLAKE2b-256 |
ad95ec6ec3f6e3f021fe016018c06a4a5c54468c059c42f5a38f51ceab47ed33
|
Provenance
The following attestation bundles were made for lc0_vic-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on ARPAHLS/lc0_vic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lc0_vic-0.1.1-py3-none-any.whl -
Subject digest:
96d5dfe2fd297047b12a699a8cdb7a1e4cda23cb0e1ee95e58466c93f66c7ee9 - Sigstore transparency entry: 1440225371
- Sigstore integration time:
-
Permalink:
ARPAHLS/lc0_vic@70688426894cb57ac512d7a5d1603a7f64581a28 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/ARPAHLS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@70688426894cb57ac512d7a5d1603a7f64581a28 -
Trigger Event:
push
-
Statement type: