Giter VIP home page Giter VIP logo

runbooks's Introduction

Runbooks - Finetune LLMs on K8s with notebooks

discord-invite

NOTICE: Changes coming! runbooks.git (previously substratus.git) will be refactored to focus on Notebooks on K8s.

๐ŸŽต Fine-tune LLM models with no/low code
๐Ÿ“” Provide a Colab style seamless Notebook experience
โ˜๏ธ Provide a unified ML platform across clouds
โฌ†๏ธ Easy to install with minimal dependencies

Looking for serving?
๐Ÿš€ substratusai/lingo: Serve popular OSS LLM models in minutes on CPUs or GPUs

Support the project by adding a star on GitHub! โค๏ธ

Quickstart

Create a local Kubernetes cluster using Kind.

kind create cluster --name substratus --config - <<EOF
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
  extraPortMappings:
  - containerPort: 30080
    hostPort: 30080
EOF

Install Substratus.

kubectl apply -f https://raw.githubusercontent.com/substratusai/substratus/main/install/kind/manifests.yaml

Import a small Open Source LLM.

kubectl apply -f https://raw.githubusercontent.com/substratusai/substratus/main/examples/facebook-opt-125m/base-model.yaml
apiVersion: substratus.ai/v1
kind: Model
metadata:
  namespace: default
  name: facebook-opt-125m
spec:
  image: substratusai/model-loader-huggingface
  params:
    name: facebook/opt-125m

Serve the LLM.

kubectl apply -f https://raw.githubusercontent.com/substratusai/substratus/main/examples/facebook-opt-125m/base-server.yaml
apiVersion: substratus.ai/v1
kind: Server
metadata:
  name: facebook-opt-125m
spec:
  image: substratusai/model-server-basaran
  model:
    name: facebook-opt-125m

Checkout the progress of the Model and the Server.

kubectl get ai

When they report a Ready status, start a port-forward.

kubectl port-forward service/facebook-opt-125m-server 8080:8080

Open your browser to http://localhost:8080/ or curl the LLM's API.

PS: Because of the small size of this particular LLM, expect comically bad answers to your prompts.

curl http://localhost:8080/v1/completions \
  -H "Content-Type: application/json" \
  -d '{ \
    "model": "facebook-opt-125m", \
    "prompt": "Who was the first president of the United States? ", \
    "max_tokens": 10\
  }'

Delete the local cluster.

kind delete cluster --name substratus

If you want to try out a more capable LLM, running on substantial hardware, try Kind with GPU support, or try deploying Substratus in GKE.

Docs

Creators

Feel free to contact any of us:

runbooks's People

Contributors

samos123 avatar nstogner avatar brandonjbjelland avatar dependabot[bot] 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.