Giter VIP home page Giter VIP logo

outlines's Introduction

Outlines

This repo is a fork of the Outlines repo.

It contains the following changes:

  • Deployment on SageMaker
  • OpenAI API support for guided generation

Deploy a model to SageMaker

To deploy a model to SageMaker using this image, follow the guide in DEPLOY.md.

Contributing

Pull the dependency image from ECR

The lightonai/vllm image is a dependency of the outlines image. You need it for development and production build.

This command will pull the lightonai/vllm image from ECR.

sh docker/pull-deps.sh

Build the image

To build the production image:

sh docker/build.sh

Deploy the image to ECR

sh docker/deploy.sh

Run the image locally

For Mistral:

docker run --runtime nvidia --gpus all \
    -v ~/.cache/huggingface:/root/.cache/huggingface \
    -p 8000:8000 \
    --ipc=host \
    -e SERVED_MODEL_NAME=mistral \
    -e MODEL=mistralai/Mistral-7B-Instruct-v0.2 \
    outlines \
    --host 0.0.0.0 \
    --load-format safetensors

For Mixtral:

docker run --runtime nvidia --gpus all \
    -v ~/.cache/huggingface:/root/.cache/huggingface \
    -p 8000:8000 \
    --ipc=host \
    -e SERVED_MODEL_NAME=mixtral \
    -e MODEL=mistralai/Mixtral-8x7B-Instruct-v0.1 \
    outlines \
    --tensor-parallel-size 4 \
    --host 0.0.0.0 \
    --load-format safetensors

For Alfred:

docker run --runtime nvidia --gpus all \
    -v ~/.cache/huggingface:/root/.cache/huggingface \
    -p 8000:8000 \
    --ipc=host \
    -e SERVED_MODEL_NAME=alfred \
    -e MODEL=lightonai/alfred-40b-1023 \
    outlines \
    --tensor-parallel-size 4 \
    --host 0.0.0.0 \
    --trust-remote-code

Upgrade version

You can upgrade the version of outlines by rebasing on the official repo:

git clone https://github.com/lightonai/outlines
git remote add official https://github.com/outlines-dev/outlines
git fetch official
git rebase official/main
git rebase --continue # After resolving conflicts (if any), continue the rebase
git push origin main --force

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.