Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pensarai/apex/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Pensar Apex supports local vLLM models for offline penetration testing without relying on cloud API providers. This enables:- Air-gapped testing - Run pentests in isolated networks without internet access
- Cost savings - No per-token API charges
- Data privacy - All inference happens locally
- Custom models - Use fine-tuned models optimized for security testing
Anthropic models (Claude) provide the best performance for penetration testing. vLLM is recommended for specialized use cases where cloud APIs are not feasible.
What is vLLM?
vLLM is a high-throughput inference engine for large language models. It provides:- Fast inference with PagedAttention and continuous batching
- OpenAI-compatible API - drop-in replacement for OpenAI endpoints
- Quantization support - run large models on consumer GPUs
- Multi-GPU support - scale inference across multiple GPUs
Quick Start
Select Local Model in Apex
In the Apex TUI, navigate to the Models screen:
- Enter your model name in the “Custom local model (vLLM)” input
- Example:
meta-llama/Llama-3.1-70B-Instruct - The model will now appear in the model selection list
Configuration
Environment Variables
Apex detects local model configuration viaLOCAL_MODEL_URL:
| Variable | Description | Example |
|---|---|---|
LOCAL_MODEL_URL | vLLM server endpoint | http://localhost:8000/v1 |
localModelName | Model identifier | meta-llama/Llama-3.1-70B-Instruct |
Provider Configuration
Model Selection
Apex automatically adds your configured local model to the available models list:Recommended Models
For Penetration Testing
These open-source models perform well for security testing:| Model | Size | VRAM Required | Best For |
|---|---|---|---|
| Llama 3.1 70B Instruct | 70B | ~40GB (FP16) | Comprehensive pentesting |
| Llama 3.1 8B Instruct | 8B | ~8GB (FP16) | Quick scans, resource-constrained |
| DeepSeek Coder 33B | 33B | ~20GB (FP16) | Code analysis (whitebox) |
| Qwen 2.5 Coder 32B | 32B | ~20GB (FP16) | Code security reviews |
| Mistral Large 2 | 123B | ~70GB (FP16) | Enterprise pentesting |
Quantization Options
For consumer GPUs, use quantized models:| Quantization | VRAM Savings | Quality Loss |
|---|---|---|
| FP16 | Baseline | None |
| INT8 | ~50% | Minimal |
| INT4 | ~75% | Moderate |
vLLM Server Setup
Standalone Server
Docker Deployment
Docker Compose for vLLM + Apex
Multi-Node Setup
For large models across multiple machines:Verifying vLLM Setup
Test the Endpoint
Test Completion
Check Apex Detection
Performance Tuning
GPU Memory Optimization
Batch Processing
Quantization
Troubleshooting
”LOCAL_MODEL_URL not detected”
Cause: Environment variable not set. Solution:“Connection refused” to vLLM
Cause: vLLM server not running or wrong port. Solution:- Check vLLM is running:
curl http://localhost:8000/v1/models - Verify port:
netstat -tuln | grep 8000 - Check Docker networking if using containers:
“Out of memory” on vLLM
Cause: Model too large for available VRAM. Solutions:- Use a smaller model (8B instead of 70B)
- Enable quantization (INT8 or INT4)
- Reduce
--gpu-memory-utilizationto 0.8 - Reduce
--max-model-lento limit context size - Add more GPUs with
--tensor-parallel-size
”Model not found” in Apex
Cause: Model name mismatch between vLLM and Apex. Solution:- Check the exact model ID from vLLM:
- Use that exact ID in Apex:
Slow inference
Cause: Model too large, insufficient GPU compute. Solutions:- Use a smaller/faster model (8B or 13B)
- Enable quantization
- Increase
--tensor-parallel-sizeto use more GPUs - Check GPU utilization:
nvidia-smi
Comparing Cloud vs Local Models
| Feature | Anthropic (Cloud) | vLLM (Local) |
|---|---|---|
| Performance | ⭐⭐⭐⭐⭐ Best | ⭐⭐⭐ Good |
| Setup | Simple (API key) | Complex (GPU server) |
| Cost | Per-token charges | Hardware + electricity |
| Privacy | Data sent to Anthropic | 100% local |
| Availability | Requires internet | Air-gapped OK |
| Latency | ~2-5s per request | ~1-10s (varies by GPU) |
| Context Length | 200k tokens | 4k-32k (model dependent) |
Use Anthropic for production pentests. vLLM is best for:
- Air-gapped environments
- High-volume testing (cost savings)
- Custom fine-tuned models
- Data sovereignty requirements
Advanced: Fine-Tuning for Security
To create a custom security-focused model:Prepare Training Data
Collect vulnerability reports, exploit descriptions, and security documentation:
Alternative Local Inference Engines
vLLM is recommended, but Apex also supports other OpenAI-compatible servers:Ollama
LM Studio
- Download LM Studio
- Load a model
- Start the local server (port 1234 by default)
- Configure Apex:
Text Generation Inference (TGI)
Next Steps
Blackbox Testing
Run blackbox pentests with your local model
Whitebox Testing
Analyze source code using local inference
Docker Setup
Deploy vLLM + Apex in containers
Authentication
Test auth flows with local models

