Johnny5b/portable-ai-runner
CORTEX Portable AI Drive - the complete map This repo IS the drive. Download the whole tree (or let your agents walk it) and it runs offline on any machine with Python 3 - no setup step, no internet, weights included. Total: %s across %d top-level entries. Generated %s from the live repo. THE MAP - what lives where (measured, not estimated) Path Size What it is index.html browser app: chat, model loader, mesh roles, symbol retrieval, trace meter… See the full description on the dataset page: https://huggingface.co/datasets/Johnny5b/portable-ai-runner.
CORTEX Portable AI Drive - the complete map
This repo IS the drive. Download the whole tree (or let your agents walk it) and it runs offline on any machine with Python 3 - no setup step, no internet, weights included.
Total: %s across %d top-level entries. Generated %s from the live repo.
THE MAP - what lives where (measured, not estimated)
HOW IT EXECUTES - the actual flow, file by file
python serve.py- starts ThreadingHTTPServer on :8080 (app + weights + POST /api/ledger); LAN mesh on :8081 only if the optional websockets package is installed.- Chrome opens
http://localhost:8080->index.htmlimportsvendor/wllama/esm/index.js(drive, offline; CDN only a fallback), engine pill reads drive (offline). - Models tab -> Scan -> reads
models/models.json-> Load -> wllama streamsmodels/gguf/Ornith-1.5-9B-Q4_K_M.ggufFROM THE FOLDER (allowOffline, parallelDownloads 3). - Every message you send:
awakeRetrieve()readssymbols/symbol_index.json, matches your text against intents, READS the mapped vault/schema files, injects them as system context (per request, never per token) ->[TRACE:AWAKE] symbols=... files_read=... lookup_ms=... - Generation streams through llama.cpp WASM; tokens, first-token latency and tok/s are counted ->
[TRACE:GEN] tok=... tok_s=...-> POST /api/ledger -> appended tomemories/audit_ledger.jsonl. - Optional LAN mesh: other devices pick Wi-Fi Client, the host runs the model, tokens relay over ws :8081 (Bluetooth LE via Nordic UART also supported).
stack/docker-compose is the workshop variant: code-server :8443 + runner + ollama.
WHAT IT WORKS BEST IN - measured, not vibes
RAM honesty: Ornith-9B in the browser wants ~16 GB RAM; 8 GB machines use Qwen3-0.6B in-browser, or run Ornith on the host with any of the runners above.
TRACES - how you know it is working
Every reply shows its own measurement line in the chat and writes it to the ledger:
[TRACE:AWAKE] symbols=%%EVOOPT:DEAP filesread=2 lookupms=3 | [TRACE:GEN] tok=214 firsttokms=890 toks=11.4
Read the raw ledger: memories/audit_ledger.jsonl.
HONEST LIMITS
- Browser-tier tok/s: unmeasured until tonight's first run - never quote GPU numbers for it.
- The fine-tuned CORTEX model (trace-protocol-native patches) is designed but untrained: docs/CUSTOM-MODEL-BUILD-PLAN.md.
- Two historical measurement scripts still import the banned library - owner decision pending (port or documented exemption).
