Code Monkey home page Code Monkey logo

wangchanglm-api's Introduction

WangChanGLM API

API Service for the WangChanGLM model. More information about the model can be found here.

Pairs nicely with the WangChanGLM App.

Try out the public demo at https://wangchanglm.in.th

Build docker

docker build -t scb10x/thaillm .

Run docker

mkdir .cache #optional
chmod 777 .cache #optional

# on cpu
docker run --restart unless-stopped -p 80:7860 -v `pwd`/.cache:/home/user/.cache -dt scb10x/thaillm

# on gpu
docker run --gpus all --restart unless-stopped -p 80:7860 -v `pwd`/.cache:/home/user/.cache -dt scb10x/thaillm

Request with cURL

curl --request POST \
  --url http://localhost:80/generate \
  --header 'Content-Type: application/json' \
  --data '{"instruction": "เขียนบทความเกี่ยวกับ ประโยชน์ของการออกกำลังกาย"}'

Deploy on GCP

Create a VM

  1. Compute Engine > Create an instance
  2. GPUs > NVIDIA T4
  3. Machine Type > n1-standard-8
  4. Boot disk > Switch Image > Debian 10 based Deep Learning VM with M108 > 250GB
  5. Firewall > Allow HTTP traffic > Allow HTTPS traffic
  6. Create

Install git-lfs on the VM

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs

SSH into the VM and build

  1. clone this repo
  2. build docker: ./scripts/build.sh
  3. run docker: ./scripts/start.sh

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.