Universal Python framework to download, run, and metricize AI models
Project description
โก RayForge
RayForge is a universal AI model launcher: download, run, and evaluate models from Hugging Face, OpenAI, Replicate, or your own local code โ all from one Python library, CLI, GUI, or API.
Think of it as
transformers,openai,replicate, andwandbcombined โ but fully pluggable and open.
๐ Features
- ๐ Multi-provider support: Hugging Face, OpenAI, Replicate, local models
- ๐ Auto-wrapper: Standard interface for any model type
- ๐ Metric logging: Accuracy, BLEU, custom metrics, and visualizations
- ๐งช Streamlit GUI, ๐ง FastAPI backend, ๐ป Typer CLI
- ๐ฆ Ready for packaging, serving, and research
๐ฆ Installation
pip install rayforge
Or from source:
git clone https://github.com/RaykenAI/rayforge.git
cd rayforge
pip install -e .
๐ง Usage
CLI
rayforge pull --model-id gpt2 --source huggingface
rayforge run --model-id gpt2 --input-text "The future of AI is"
Python
from rayforge.core.forge_engine import Forge
forge = Forge()
model = forge.pull("gpt2", source="huggingface")
output = forge.run(model, "The future of AI is")
print(output)
GUI
python main.py # or set RAYFORGE_MODE=gui
FastAPI
RAYFORGE_MODE=serve RAYFORGE_MODEL_ID=gpt2 RAYFORGE_MODEL_SOURCE=huggingface python main.py
โ๏ธ .env Configuration
Create a .env file at your project root:
# Launch mode: cli, gui, serve
RAYFORGE_MODE=gui
# Default model to serve (for FastAPI mode)
RAYFORGE_MODEL_ID=gpt-4
RAYFORGE_MODEL_SOURCE=openai
RAYFORGE_PORT=7860
# ๐ Required for OpenAI
OPENAI_API_KEY=sk-...
โ
.envis ignored in.gitignoreto protect secrets. You must create your own locally.
๐ Development Guide
Run tests
pytest tests/
Lint
ruff rayforge
Build package
python -m build
๐ Release via GitHub Actions
Push a tag like:
git tag v0.1.0
git push origin v0.1.0
Automatically builds and uploads to PyPI.
๐ Folder Structure
rayforge/
โโโ core/ โ Forge engine and runners
โโโ models/ โ Wrappers, loaders
โโโ providers/ โ OpenAI, HF, Replicate APIs
โโโ utils/ โ Logging, IO, constants
โโโ dashboard/ โ Matplotlib/Seaborn plotting
โโโ deployment/ โ GUI + FastAPI servers
โโโ cli/ โ Typer CLI
โโโ tests/ โ Pytest modules
๐ License
MIT License ยฉ Rayken AI
๐ Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rayforge_ai-0.1.0.tar.gz.
File metadata
- Download URL: rayforge_ai-0.1.0.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
739259f5629256858c873d5f866192865503071a4960c18247316972f26dec0f
|
|
| MD5 |
4c432a6d781e65dcd00983d46a642d97
|
|
| BLAKE2b-256 |
98b7029005de16f9cf4b4268fd7105af4dec5faf84438c42f8825a858aedf1f7
|
File details
Details for the file rayforge_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rayforge_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c050dcbd7d4e56860a9ae120f010e5c26d688d262ccb3f66dcb9164f0f76bc6
|
|
| MD5 |
3eab28689abc03043bfc04b6192f9595
|
|
| BLAKE2b-256 |
1496b44a1bb0f03b5f4187cecc41c0665d5a4a7a597c2e5f93c76fbbf21a0666
|