How mayank3613/ramllm works
RAMLLM profiles a machine, analyzes GGUF models, plans a feasible memory-tier placement and speed estimate, then launches inference through a backend while monitoring memory budgets. The README documents CLI workflows for profiling, planning, running, and inspecting dependencies; the API exposes OpenAI-compatible inference and RAMLLM plan/metrics endpoints. Source evidence is partial: unsampled major capabilities are represented where documented, but uncertain implementation links are omitted.
Main entry points: main.py CLI commands · server.py HTTP API · candidates.py Placement candidates · planner.py Plan coordinator
Components 23
User interfaces
- CLI commands
src/ramllm/cli/main.py - HTTP API
src/ramllm/api/server.py
Hardware profiling
- Hardware profiler
src/ramllm/core/profiler/prober.py - GPU probes
src/ramllm/core/profiler/gpu_nvidia.py
Model analysis and planning
- Domain schemas
src/ramllm/core/schemas.py - GGUF analyzer
src/ramllm/core/analyzer/gguf.py - MoE analysis
src/ramllm/core/analyzer/moe.py - KV sizing
src/ramllm/core/analyzer/kv.py - Plan coordinator
src/ramllm/core/planner/planner.py - Placement candidates
src/ramllm/core/planner/candidates.py - Speed model
src/ramllm/core/planner/cost_model.py - Feasibility verdict
src/ramllm/core/planner/feasibility.py - Model recommender
src/ramllm/core/planner/recommend.py - Speed calibration
src/ramllm/telemetry/calibration.py
Inference runtime
- Backend interface
src/ramllm/backends/base.py - llama.cpp adapter
src/ramllm/backends/llamacpp/adapter.py - Memory governor
src/ramllm/core/governor/monitor.py - OS enforcement
src/ramllm/core/governor/enforcement/base.py
Model catalog
- Local catalog
src/ramllm/registry/catalog.py - Model downloads
src/ramllm/registry/download.py
Other components
- Operator
- Backend engine
- API client
Connections 30
- Operator → CLI commands: runs commands
README.md - Operator → HTTP API: starts server
README.md - CLI commands → Hardware profiler: profiles hardware
src/ramllm/cli/main.py - Hardware profiler → GPU probes: probes GPUs
src/ramllm/core/profiler/prober.py - CLI commands → GGUF analyzer: analyzes model
src/ramllm/cli/main.py - GGUF analyzer → MoE analysis: uses MoE analysis
src/ramllm/core/analyzer/gguf.py - CLI commands → Plan coordinator: requests plans
src/ramllm/cli/main.py - Plan coordinator → Placement candidates: generates candidates
src/ramllm/core/planner/planner.py - Plan coordinator → Feasibility verdict: checks feasibility
src/ramllm/core/planner/planner.py - Placement candidates → KV sizing: sizes KV cache
src/ramllm/core/planner/candidates.py - Placement candidates → MoE analysis: sizes expert sets
src/ramllm/core/planner/candidates.py - Placement candidates → Speed model: estimates speed
src/ramllm/core/planner/candidates.py - Placement candidates → Speed calibration: reads calibration
src/ramllm/core/planner/candidates.py - CLI commands → Model recommender: requests recommendations
src/ramllm/cli/main.py - Model recommender → GGUF analyzer: analyzes catalog models
src/ramllm/core/planner/recommend.py - Model recommender → Plan coordinator: plans candidates
src/ramllm/core/planner/recommend.py - Model recommender → Local catalog: lists models
src/ramllm/core/planner/recommend.py - Local catalog → GGUF analyzer: analyzes added model
src/ramllm/registry/catalog.py - CLI commands → Local catalog: manages catalog
src/ramllm/cli/main.py - CLI commands → Model downloads: downloads models
src/ramllm/cli/main.py - HTTP API → GGUF analyzer: analyzes model
src/ramllm/api/server.py - HTTP API → Plan coordinator: creates execution plan
src/ramllm/api/server.py - HTTP API → Hardware profiler: probes hardware
src/ramllm/api/server.py - HTTP API → Backend interface: launches through
src/ramllm/api/server.py - HTTP API → Memory governor: starts monitoring
src/ramllm/api/server.py - Memory governor → Backend interface: samples process
src/ramllm/core/governor/monitor.py - Memory governor → OS enforcement: applies limits
src/ramllm/core/governor/monitor.py - llama.cpp adapter → Backend interface: implements interface
- Backend interface → Backend engine: launches engine
- API client → HTTP API: requests completions
src/ramllm/api/server.py