AIGN7 is a modular, Python-based system for running large language models (LLMs) locally using llama.cpp as the backend. It supports .gguf models, such as OpenHermes-2.5-Mistral-7B.Q8_0, and provides a FastAPI-powered REST API for seamless interaction.
Explore compatible .gguf models: Hugging Face llama.cpp Models
- Fully Offline: Run LLMs locally without internet dependency.
- Efficient Inference: Uses
llama.cppfor optimized CPU/GPU performance. - REST API: FastAPI-based interface for programmatic interaction.
- Modular Design: Extensible structure for adding new features or models.
- Cross-Platform: Supports Linux, macOS, Windows, and WSL with proper backend configuration.
AIGN7 is designed to leverage GPU acceleration (Vulkan, CUDA, or Metal) for optimal performance, but it automatically falls back to CPU if GPU support or a backend is unavailable, depending on your llama.cpp configuration.
- Python: 3.8 or higher
- Git: Required for cloning the repository
- llama.cpp Backend: Any version compatible with your CPU/GPU and Operating system
- Model: Any
.ggufmodel compatible withllama.cpp(e.g.,openhermes-2.5-mistral-7b.Q8_0.gguf)
⚠️ Note:Precompiled
llama.cppbinaries are optimized for specific systems. For example:
llama-b6109-bin-ubuntu-vulkan-x64.zip: optimized for Ubuntu with Vulkan-compatible GPUs (AMD/Intel).- CPU-only versions are also available for maximum compatibility.
If you prefer or need to compile
llama.cppyourself (e.g., for NVIDIA CUDA, macOS Metal, or non-Ubuntu Linux distros like Arch or Fedora), refer to the officialllama.cppbuild instructions.
Follow these steps to set up AIGN7. The project is designed to leverage GPU acceleration (Vulkan, CUDA, or Metal) for optimal performance but automatically falls back to CPU if the GPU or backend is unavailable, depending on the llama.cpp configuration.
- Clone the Repository
git clone https://github.com/yourusername/AIGN7.git
cd AIGN7- Install Python Dependencies
Install dependencies from requirements.txt:
pip install -r requirements.txt- Download or Compile llama.cpp
You must move the contents of the bin/ folder—either from a precompiled binary or a manual build—into the CORE/llama.cpp/bin.
- Download a Model
- Download a
.ggufmodel (e.g.,openhermes-2.5-mistral-7b.Q8_0.gguf) from Hugging Face. - Place it in
CORE/llama.cpp/models:
- Verify Setup
- Test the
llama.cppbinary:
./CORE/llama.cpp/bin/llama-cli --version