Skip to main content

alt text

💎 ONYX AI Gemma 4 Engine (E2B Edition)

A high-performance, professional FastAPI wrapper for Gemma Multimodal models with built-in 4-bit quantization and streaming support. Developed by ONYX (RUI Company).

🚀 Features

  • Zero Config Integration: Deploy a multimodal AI server in seconds.

  • Optimized Performance: Native 4-bit quantization using bitsandbytes for low VRAM/RAM usage.

  • Real-time Streaming: Built-in SSE (Server-Sent Events) for smooth, token-by-token generation.

  • Hardware Friendly: Optimized for both GPU and high-performance CPU inference.

  • 🌊 Streaming Support (Text-Only) The engine supports real-time streaming for text-based conversations only. This allows the model to respond token-by-token using Server-Sent Events (SSE).

  • Note: Streaming is currently limited to text inputs and outputs. Multimodal inputs (images/video) are processed using the standard predict endpoint.

📦 Installation

Option 1: Via pip

You can install the engine directly from PyPI: 📦 Installation Option 1: Install via pip

pip install onyx-AI-Gemma4

Option 2: requirements.txt

fastapi
uvicorn
transformers>=4.48.0
torch
accelerate
bitsandbytes
Pillow
torchvision
onyx-AI-Gemma4

💻 Usage ▶ Standard Script

from ONYXAI_Gemma4E2B import OnyxEngine

# Initialize the engine
engine = OnyxEngine(model_id="google/gemma-4-E2B-it")

# Run the server
if __name__ == "__main__":
    engine.run(host="0.0.0.0", port=7860)

🌐 Production

from ONYXAI_Gemma4E2B import OnyxEngine
import uvicorn
import os

engine = OnyxEngine(model_id="google/gemma-4-E2B-it")
app = engine.app

@app.get("/")
def home():
    return {"message": "ONYX Engine is running!"}

if __name__ == "__main__":
    port = int(os.environ.get("PORT", 7860))
    uvicorn.run(app, host="0.0.0.0", port=port)

🛠 API Usage Endpoint

POST /predict

Example Request

{
  "messages": [
    {
      "role": "user",
      "content": "Write a long story about space exploration."
    }
  ],
  "stream": true,
  "temperature": 0.7,
  "max_tokens": 1024
}

© 2026 ONYX. All rights reserved.

Metadata

Release files for onyx-AI-Gemma4 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onyx-AI-Gemma4 0.1.11
File Size Uploaded Provenance Actions
onyx_ai_gemma4-0.1.11.tar.gz 4.0 kB Without provenance Details for onyx_ai_gemma4-0.1.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for onyx-AI-Gemma4 0.1.11
File Interpreter ABI Platform Actions
onyx_ai_gemma4-0.1.11-py3-none-any.whl Python 3 none any Details for onyx_ai_gemma4-0.1.11-py3-none-any.whl

Total release size: 8.4 kB

Release files / onyx_ai_gemma4-0.1.11.tar.gz

Download URL onyx_ai_gemma4-0.1.11.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cecb8463a7aede70fddfa772569c956f636d46c2f8f4d9965e0a41d3fe3a293a
BLAKE2b-256 checksum
How to use checksums
72e2dfef8badb83bd1b9c59dc84cf451208a8db75d6666e9dc87eb1d5f5e332d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / onyx_ai_gemma4-0.1.11-py3-none-any.whl

Download URL onyx_ai_gemma4-0.1.11-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44ff843bfe1552f5bcf17ea25f17b1d434e5c5d0743ab509685844e8f97eca2c
BLAKE2b-256 checksum
How to use checksums
0e38073405ba54945afed438632786c934c53e582cd444440bfae00588874659
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Security for onyx-AI-Gemma4 0.1.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page