How mw00/project-maya works
Project Maya is a local, model-specific inference product: users chat in a browser or connect through compatible APIs, and the resident Strata engine generates responses using a large model distributed across GPU, RAM, and NVMe. The graph preserves the documented serving, multimodal, monitoring, and concurrent-request capabilities alongside the sampled generation, prefill, session, and expert-kernel layers. Source excerpts are partial; uncertain implementation links are omitted rather than inferred.
Main entry points: generate.cpp Generation driver · server.py OpenAI / Anthropic API · session.cpp Token session · prefill.cpp Prompt prefill
Components 23
User access
- Browser chat and monitor
serve/web/app.js
Serving
- OpenAI / Anthropic API
serve/server.py - MCP tool integration
serve/mcp.py - Frontend endpoints
serve/frontend.py - Runtime telemetry
serve/telemetry.py
Inference engine
- Generation driver
src/program/generate.cpp - Prompt prefill
src/prefill/prefill.cpp - Token session
src/core/session.cpp - Layer execution
src/core/layer.cpp
Model runtime
- Weights and layout
include/strata/core/weights.hpp - GGUF model reader
src/artifact/gguf_reader.cpp - Expert tier cache
src/core/expert_cache.cpp - Expert sources
src/core/expert_source.cpp - CPU expert pool
include/strata/kernels/cpu/pool.hpp - CPU expert kernel
include/strata/kernels/cpu/expert.hpp - QSA attention and cache
include/strata/kernels/qsa.hpp - PLE n-gram lookup
include/strata/kernels/ngram.hpp - MTP drafting
include/strata/core/mtp.hpp - Speculative controller
src/spec/controller.cpp - Image input support
tools/vision/strata_vision.cpp
Hardware and storage
- GPU, RAM, NVMe
- Local model files
Other components
- User or client
Connections 30
- User or client → Browser chat and monitor: chats through
- User or client → OpenAI / Anthropic API: sends requests
- Browser chat and monitor → OpenAI / Anthropic API: submits chat
- OpenAI / Anthropic API → Generation driver: dispatches requests
serve/server.py - OpenAI / Anthropic API → MCP tool integration: offers tools
serve/server.py - OpenAI / Anthropic API → Frontend endpoints: serves endpoints
serve/server.py - OpenAI / Anthropic API → Runtime telemetry: uses telemetry
serve/server.py - Generation driver → Token session: runs token path
src/program/generate.cpp - Generation driver → Expert tier cache: uses cache
src/program/generate.cpp - Generation driver → Expert sources: uses sources
src/program/generate.cpp - Generation driver → Weights and layout: uses weights
src/program/generate.cpp - Generation driver → CPU expert pool: uses expert pool
src/program/generate.cpp - Generation driver → MTP drafting: uses drafting
src/program/generate.cpp - Generation driver → Speculative controller: selects draft strategy
- Prompt prefill → Weights and layout: reads weights
src/prefill/prefill.cpp - Prompt prefill → MTP drafting: uses MTP
src/prefill/prefill.cpp - Prompt prefill → PLE n-gram lookup: uses n-gram kernels
src/prefill/prefill.cpp - Prompt prefill → QSA attention and cache: uses QSA kernels
src/prefill/prefill.cpp - Token session → Layer execution: replays layers
src/core/session.cpp - Token session → QSA attention and cache: uses attention kernels
src/core/session.cpp - Token session → CPU expert pool: uses expert pool
src/core/session.cpp - CPU expert pool → CPU expert kernel: uses expert kernel
include/strata/kernels/cpu/pool.hpp - GGUF model reader → Local model files: reads GGUF
- Expert tier cache → GPU, RAM, NVMe: tiers experts
- Expert sources → GPU, RAM, NVMe: sources expert data
- Weights and layout → GGUF model reader: loads model tensors
- User or client → Image input support: attaches pictures
- Image input support → OpenAI / Anthropic API: image API support
- Generation driver → GPU, RAM, NVMe: executes on devices
- Token session → Prompt prefill: processes prompt