version-llm is a modular and extensible hybrid LLM application that combines optional local model inference with a Gemini Mode cloud-based inference using Google Gemini. Originally designed to support symbolic reasoning, mathematical prompts, code generation, and creative writing, the framework enables clean switching between local and remote backends with a single toggle.
Although initially intended to support multiple LLM backbones, a stub for GPT-2 was set in place and Gemini was implemented as version's backbone model by the project's submission deadline. Nonetheless, the codebase is highly modular and capable of rapid extension to additional models. Version-llm is a research-driven project built from 2 separate projects with this model as the final build version: version-tab and version-cv. Its final build was not fully realized due to time constrants. See links provided for a deep dive to Version's original core blueprint.
- Built with Local Model Inference Plug-in: Local offline model generation (no API keys required)
- Gemini Plugin (Optional): Google Generative AI fallback via SDK and CLI (is not fully robust due to time constraints)
- Toggleable Backend: Select local or Gemini model via checkbox
- Web Frontend: Minimal UI using HTML + JS
- Notebook Support: Includes exploratory notebooks under
/notebooks - Flexible Runtime: Run with
uvicornfor local development orgunicornfor production
Clone the repository. You will also need an API key from Google. More information here: Gemini docs
git clone https://github.com/rcghpge/version-llm.git
cd version-llmPython version: 3.12.11
Use pixi, venv, or your preferred environment manager
Version-llm is built with Pixi - a modern, high-performance package manager
# Initialize Pixi virutal environment
pixi shell
# Pixi environment info
pixi info
# Pixi commands and help
pixi --help
cd backend
pip install -r requirements.txtOptional: Run
install_gemini.shto set up Gemini CLI.
Development (hot reload):
uvicorn main:app --reloadProduction (with Gunicorn):
gunicorn main:app -k uvicorn.workers.UvicornWorkerVisit http://localhost:8000 or http://127.0.0.1:8000 in your browser. Input your prompt, toggle Gemini if desired, and receive a response.
🐳 5. Run on Docker
Make sure your API keys are set in backend/.env, for example:
GEMINI_API_KEY=your-secret-key
GEMINI_MODEL=models/gemini-2.5-pro🔧 Build the Docker Image
sudo docker build -t version-llm .🚀 Run the Docker Container
sudo docker run --env-file backend/.env -p 8000:8000 version-llmVisit http://localhost:8000 or http://127.0.0.1:8000 to start prompting.
ℹ️ The container includes Python 3.12, Node.js 20, and Gemini CLI. It runs as a secure non-root
appuser.
📁 Project Structure
version-llm/
├── CITATION.cff
├── Dockerfile
├── LICENSE
├── README.md
├── __init__.py
├── assets
├── backend
├── docs
├── frontend
├── install_gemini.sh
├── install_pixi.sh
├── main.py
├── notebooks
├── pixi.lock
├── pixi.toml
├── sandbox
└── tests📦 Dependencies Core libraries:
- fastapi
- uvicorn
- gunicorn
- transformers
- python-dotenv
- google.generativeai
- jinja2
📓 Notebooks
Jupyter notebooks are set at /notebooks of Version's design process and framework:
- model development in the cloud
- model testing and server integration
- API integration and model inference
🧠 Design Philosophy
The original design philosophy is research-driven for highly advanced model inference in the field of mathematics. See foundational research and builds from version-tab and version-cv. Due to time constraints, this is the final version as a baseline build model.
version-llm's current build is built with scalability, modularity, and clarity in mind:
- Clean separation of frontend/backend
- Environment-agnostic: local or hosted in the cloud
- Designed to support additional backbones (e.g., T5, LLaMA, FLAN) in future iterations
- Research-driven iterative build process from tabular data, NLP, and computer vision modalities from the
version-tabandversion-cvprojects.
|
|
This project was undertaken as part of the DATA-4380: Data Problems course under the Division of Data Science at the University of Texas at Arlington. It was developed under the instruction and mentorship of Dr. Amir Farbin, whose guidance was instrumental in shaping both the technical and analytical direction of the work.
📜 License MIT License © 2025 rcghpge


