AI / LLMOps2026

PHProf

Local AI assistant to master PHP 8.x and Symfony in French, 100% offline with RAG over the official documentation.

LLMLoRARAGllama.cppQwenPythonPHPSymfonyFine-tuningFAISS

Concept & Approach

PHProf is a teaching-oriented AI assistant designed to help French-speaking developers learn modern PHP (8.x) and the Symfony framework. Why this project: • PHP remains the most widely used server-side language (77% of the web) • The move to PHP 8.x introduces advanced concepts (attributes, named arguments, match, enums) • Symfony is the reference PHP framework in companies • Few interactive learning resources in French Local-First philosophy: • No data sent to external servers • Works 100% offline after installation • Full confidentiality of the analyzed source code • No recurring API costs Target audience: • PHP developers who want to modernize their practices • Learners discovering Symfony • Teams migrating from PHP 7.x to 8.x
100% Local
Mode
French
Language
PHP 8.x
Target
Symfony
Framework
Basic PHP question
Example: explanation of PHP 8 types with a structured answer

Technical Architecture

Stack optimized for fast local inference with RAG enrichment over the official documentation. Base model: • Qwen2.5-Coder-1.5B-Instruct in GGUF format (Q4_K_M) • Compact model optimized for code • Metal (macOS), CUDA (Linux/Windows) and CPU support Inference: • llama-cpp-python for optimized execution • Native GPU acceleration depending on the platform • Lower latency thanks to Q4_K_M quantization RAG pipeline: • Embeddings: sentence-transformers (all-MiniLM-L6-v2) • Vector index: FAISS for fast search • Sources: official PHP 8.x and Symfony documentation • Contextual enrichment of answers with citations LoRA fine-tuning (optional, macOS only): • Framework: mlx-lm for Apple Silicon • Lightweight adapter for customization • Dataset extensible as needed
Qwen2.5-1.5B
Model
Q4_K_M
Quantization
MiniLM
Embeddings
FAISS
Index
RAG indexing pipeline
1 / 2
Index building: PHP/Symfony documentation → chunks → embeddings → FAISS

Features

Rich CLI interface built with Typer and Rich for a modern terminal experience. Use cases covered: • Code correction — Analysis and improvement suggestions • Code explanation — Line-by-line breakdown • Code generation — Creation of classes, methods, tests • Debugging — Help diagnosing errors • Best practices — PSR-12, SOLID, Symfony patterns Structured answer format: • TL;DR — One-sentence summary • Problem — Context and identified issue • Solution — Corrected or generated code • Explanation — Teaching-oriented detail • Key takeaways — Easy-to-remember key points CLI interface: • Command autocompletion • Syntax highlighting of code blocks • Conversation history • Interactive or one-shot mode
Typer + Rich
CLI
5+
Use cases
Structured
Format
PSR/SOLID
Standards
Symfony Controllers question
1 / 7
Example: explanation of Symfony controllers with code and best practices

Installation & Usage

Simplified installation with uv (a modern Python package manager). Prerequisites: • Python 3.11+ • uv (package manager) • PHP 8.x (to test the generated code) • ~5 GB of disk space (model + index) Supported platforms: • macOS (Apple Silicon recommended, Metal acceleration) • Linux (CUDA support for NVIDIA GPUs) • Windows (CPU or CUDA) Main commands: • phpprof chat — Interactive conversation mode • phpprof ask "question" — One-shot question • phpprof index — Rebuild the RAG index • phpprof config — Model configuration Performance: • First answer: ~3-5s (model loading) • Following answers: ~1-2s • Memory footprint: ~2-3 GB RAM
uv
Package
~5 GB
Disk space
~2s
Latency
~3 GB
RAM
  _____  _____ _____
 |  __ \|  __ \_   _|
 | |__) | |__) || |
 |  _  /|  ___/ | |
 | | \ \| |    _| |_
 |_|  \_\_|   |_____|

Self-hosted on Raspberry Pi 5

~/links

$ echo "Made with passion"

© 2026 Abdel Touati