tinybiggames/gemma4.pas — explained in plain English
Analysis updated 2026-05-18
Add local, offline AI text generation to a Delphi or Pascal application.
Build an assistant that can understand images, audio, and video without cloud APIs.
Set up semantic search or retrieval over documents using the bundled embedding model.
Create a tool-using agent that can check weather, search the web, or read files.
| tinybiggames/gemma4.pas | avbiswas/sam2-mlx | chanthruu/wind_energy_monitor | |
|---|---|---|---|
| Stars | 27 | 27 | 27 |
| Language | Python | Python | Python |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 3/5 | 4/5 | 3/5 |
| Audience | developer | researcher | data |
Figures from each repo's GitHub metadata at analysis time.
Requires downloading a large packaged model file from HuggingFace and Delphi 12 Athens or later to build.
Gemma4.pas is a complete AI inference engine for Google's Gemma 4 E4B model, written entirely in Delphi and Pascal. It has no dependency on Python, C, or C++ under the hood, and no third-party libraries at all. You load a single packaged model file, called a VPK archive, and call one function to start generating streamed responses from your GPU. The engine covers the full range of what Gemma 4 E4B can do: generating text with an optional private reasoning step before answering, understanding images at different levels of detail, understanding audio from WAV files, and sampling frames from video clips to describe what is happening in them. All of the heavy math, like matrix operations and attention calculations, runs on the GPU through Vulkan compute shaders rather than the CPU. The project also bundles a smaller model called EmbeddingGemma300m for turning text into embeddings, which is useful for semantic search and retrieval tasks, often called RAG. On top of the core engine sits an optional application layer with higher level building blocks: a tool calling system so the model can trigger functions like checking the weather or searching the web, a persistent memory system backed by SQLite that supports both keyword and vector based recall, and a ready made interactive chat interface with slash commands for saving state, adding facts, and restoring past conversations. This project is aimed at Delphi and Pascal developers who want local AI without leaving their existing toolchain, at application developers who want a single file engine with full multimodal support on consumer hardware, and at privacy conscious users who want an assistant that never sends data over the network. To get started, you download the packaged model from HuggingFace, open the included testbed project in Delphi 12 Athens or later, and build it for Win64.
A self-contained AI engine, written in Delphi, that runs Google's Gemma 4 model locally on Windows using your GPU.
Mainly Python. The stack also includes Delphi, Pascal, Vulkan.
License terms are not stated in the explanation.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.