How poisonxa16/pxa works
PXA is a local language-model server and control suite optimized for older NVIDIA GPUs. The main workflow is choosing a model and cards in PXA Control or the launcher, loading and executing the model through llama.cpp/ggml, then serving generated responses through an OpenAI-style API. The repository also includes quant encoding/conversion, GPU profile management, and an assistant UI. Connections for unsampled subsystems are included only where the README documents their role; source-index references support the sampled internal links.
Main entry points: routes.py Assistant routes · llama.cpp Local model server · llama-model.cpp Model loading · pxa_control.py PXA Control
Components 22
Launch and Control
- PXA Control
tools/pxa_control.py - Launch planner
tools/pxa-launch.py - GPU profiles
tools/pxa_ctl/service.py - Transactional apply
tools/pxa_ctl/engine.py
Model Runtime
- Local model server
src/llama.cpp - Public llama API
include/llama.h - Model loading
src/llama-model.cpp - Graph execution
src/llama-build-context.cpp - Architecture graphs
src/graphs - Inference context
src/llama-context.h - Tensor backends
ggml/src/ggml-backend.cpp - Chat templates
common/jinja/parser.cpp - Grammar parsing
common/peg-parser.cpp
Quant Formats
- PXA encoders
tools/pxa_encode.py - GGUF conversion
convert_hf_to_gguf.py - GGUF model files
gguf-py/gguf/gguf_writer.py
Chat Assistant
- Assistant routes
tools/pxa_chat/routes.py - Agent loop
tools/pxa_chat/loop.py - Conversation memory
tools/pxa_chat/memory.py - Search and tools
tools/pxa_chat/tools.py
Other components
- Local operator
- OpenAI-style client
Connections 23
- Local operator → PXA Control: configures
- PXA Control → Launch planner: builds launch request
tools/pxa_control.py - Launch planner → Local model server: starts server
- Local operator → GPU profiles: manages cards
- GPU profiles → Transactional apply: applies profile
tools/pxa_ctl/service.py - Local model server → Model loading: loads model
- Local model server → Public llama API: exposes API
- Model loading → Inference context: initializes
- Model loading → Graph execution: builds execution
- Graph execution → Architecture graphs: dispatches graph
- Graph execution → Tensor backends: executes tensors
- Public llama API → Chat templates: formats prompts
- Public llama API → Grammar parsing: constrains output
- Local operator → PXA encoders: encodes model
- PXA encoders → GGUF model files: writes quant
- GGUF conversion → GGUF model files: writes GGUF
- GGUF model files → Model loading: loads model file
- PXA Control → Assistant routes: hosts assistant
tools/pxa_control.py - Assistant routes → Agent loop: routes messages
tools/pxa_chat/routes.py - Assistant routes → Conversation memory: uses memory
tools/pxa_chat/routes.py - Assistant routes → Search and tools: offers tools
tools/pxa_chat/routes.py - Agent loop → OpenAI-style client: requests completions
- OpenAI-style client → Local model server: sends API requests