Giter Club home page Giter Club logo

logo_with_text

AI Ecosystem

About

Geniusrise is a modular, loosely-coupled MLOps framework designed for the era of Large Language Models, offering flexibility and standardization in designing networks of AI agents.

It defines components and orchestrates them providing observability, state management and data handling, all while supporting diverse infrastructures. With its modular and unopinonated architecture, Geniusrise empowers teams to build, share, and deploy AI across various platforms.

Geniusrise is powered by its components:

Usage

The easiest way to use geniusrise is to host an API over a desired model. Use one of the examples from text, vision or audio.

Run on Local

Say, we are interested in running an API over a vision / multi-modal model such as bakLlava:

1. Install geniusrise and vision

pip install torch
pip install geniusrise
pip install geniusrise-vision # vision multi-modal models
# pip install geniusrise-text # text models, LLMs
# pip install geniusrise-audio # audio models

2. Use the genius cli to run bakLlava

Create a YAML file named genius.yml:

version: '1'

bolts:
    my_bolt:
        name: VisualQAAPI
        state:
            type: none
        input:
            type: batch
            args:
                input_folder: ./input
        output:
            type: batch
            args:
                output_folder: ./output
        method: listen
        args:
            model_name: 'llava-hf/bakLlava-v1-hf'
            model_class: 'LlavaForConditionalGeneration'
            processor_class: 'AutoProcessor'
            device_map: 'cuda:0'
            use_cuda: True
            precision: 'bfloat16'
            quantization: 0
            max_memory: None
            torchscript: False
            compile: False
            flash_attention: False
            better_transformers: False
            endpoint: '*'
            port: 3000
            cors_domain: 'http://localhost:3000'
            username: 'user'
            password: 'password'

Navigate to the directory and do:

genius rise

3. Test the API

MY_IMAGE=/path/to/test/image

(base64 -w 0 $MY_IMAGE | awk '{print "{\"image_base64\": \""$0"\", \"question\": \"<image>\nUSER: Whats the content of the image?\nASSISTANT:\", \"do_sample\": false, \"max_new_tokens\": 128}"}' > /tmp/image_payload.json)
curl -X POST http://localhost:3000/api/v1/answer_question \
    -H "Content-Type: application/json" \
    -u user:password \
    -d @/tmp/image_payload.json | jq

Explore

See usage for more advanced examples. There are over 150 examples for text, vision and audio.

Links

Framework

This is the base geniusrise framework, also the genius CLI. It provides the base structure and orchestration primitives for Spouts and Bolts, and also covers operations.

geniusrise's Projects

diffusion-pullback icon diffusion-pullback

Official Implementation of understanding the latent space of diffusion models through the lens of riemannian geometry (NeurIPS 2023)

geniusrise-healthcare icon geniusrise-healthcare

A collection of Bolts and Spouts for healthcare, including knowledge graphs - SNOMED-CT, NER, clinical notes bot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.