Skip to main content

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, and wandb combined โ€” 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-...

โ— .env is ignored in .gitignore to 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rayforge_ai-0.1.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rayforge_ai-0.1.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

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

Hashes for rayforge_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 739259f5629256858c873d5f866192865503071a4960c18247316972f26dec0f
MD5 4c432a6d781e65dcd00983d46a642d97
BLAKE2b-256 98b7029005de16f9cf4b4268fd7105af4dec5faf84438c42f8825a858aedf1f7

See more details on using hashes here.

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

Hashes for rayforge_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c050dcbd7d4e56860a9ae120f010e5c26d688d262ccb3f66dcb9164f0f76bc6
MD5 3eab28689abc03043bfc04b6192f9595
BLAKE2b-256 1496b44a1bb0f03b5f4187cecc41c0665d5a4a7a597c2e5f93c76fbbf21a0666

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page