Code Monkey home page Code Monkey logo

deepsparse_rhoai's Introduction

DeepSparse RHOAI

This is a quick guide for serving LLMs on a CPU using DeepSparse from Neural Magic.
Much of the content is based on this repo which also contains a training pipeline: https://github.com/luis5tb/neural-magic-poc
Note that although the performance when running on CPUs is serviceable for testing or a few users, GPU may give better performance when scaling up to production.

Guide

  1. Create a PVC in your project called kserve-aux, this will be used in the serving runtime because DeepSparse serving overwrites the existing model to create one with correct input sizes, and therefore needs write access to the PVC.
  2. Add this Custom Serving Runtime to your RHOAI cluster. It should be using REST and be a Single-Model Serving runtime. The image in the runtime is based on this Dockerfile.
  3. Create a workbench that's connected to a Data Connection which points to where you want to store your model. Then clone this repository into that workbench.
  4. Follow this notebook to download a model and save it to S3. Note that the Granite 7b model requires about 10GB of storage.
  5. Serve that model using the Serving runtime you added earlier. I was successfully serving the Grainte model with a Small server size.
  6. Send requests to it through this notebook.
  7. (Optional) Follow this guide to create a RAG application with your served model.

deepsparse_rhoai's People

Contributors

rhrolun avatar

Watchers

 avatar

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.