Metadata-Version: 2.4
Name: onyx_AI_Gemma4
Version: 0.1.8
Summary: Professional Multimodal AI Engine for Onyx platform
Author-email: Rawan Jassim <eng.rawan.abd.alrazak@gmail.com>
Project-URL: Homepage, https://github.com/RUI-com/
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi
Requires-Dist: uvicorn
Requires-Dist: torch
Requires-Dist: transformers
Requires-Dist: bitsandbytes
Requires-Dist: accelerate
Requires-Dist: Pillow
Requires-Dist: torchvision
Dynamic: license-file

<p align="center">
  <img src="https://onyxchat-ai.vercel.app/logo/Group%2071.png" alt="ONYX AI Logo" width="200">
</p>

# 💎 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.

## 📦 Installation

### Option 1: Via pip
You can install the engine directly from PyPI:
📦 Installation
Option 1: Install via pip
```bash
pip install onyx-AI-Gemma4
```
Option 2: requirements.txt
```txt
fastapi
uvicorn
transformers>=4.48.0
torch
accelerate
bitsandbytes
Pillow
torchvision
onyx-AI-Gemma4
```
---
💻 Usage
▶ Standard Script
```python
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 / Hugging Face Spaces
```python
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
```json
{
  "messages": [
    {
      "role": "user",
      "content": "Explain the importance of AI in modern software engineering."
    }
  ],
  "temperature": 0.7,
  "max_tokens": 1024
}
```
---
🔗 Links
Organization: [ONYX / RUI Company](https://github.com/RUI-com/)
Author: [Eng. Rawan Jassim](https://eng-rawan-abd-alrazak-next-js-website-main.vercel.app/)
---
© 2026 ONYX. All rights reserved.
