bungpt-open / source /deploy /README.md
deepedu's picture
BunGPT-DeepEdu-Decision-4B-Open
127ebd5 verified
|
Raw History Blame Contribute Delete
2.69 kB

Self-hosting BunGPT-DeepEdu-Decision-4B-Open with Docker

One container, one GPU, serving POST /v1/systemone and GET /health (see the model card's "HTTP server" section).

Requirements

  • NVIDIA GPU with >= 16 GB memory (tested: RTX 3090; Ampere, Ada, Hopper and Blackwell are supported).
  • NVIDIA driver >= 570 and the NVIDIA Container Toolkit.
  • Docker with Compose v2. About 8 GB of disk for the image and 10 GB for the model.

CUDA, PyTorch and all kernels are inside the image: nothing else to install on the host, and FlashAttention is not needed.

Run

hf download DeepEduVN/bungpt-open --local-dir bungpt-open      # needs read access to the repo (hf auth login, or HF_TOKEN)
cd bungpt-open/source/deploy
docker compose up -d                                  # first run builds the image (~3 min)
curl localhost:9100/health

Test request:

curl localhost:9100/v1/systemone -H 'Content-Type: application/json' -d '{
  "state": "Customer: I was charged twice for March.",
  "questions": {"team": {"type": "choice", "instructions": "Which team?",
                         "criteria": {"billing": null, "technical": null, "sales": null}}}}'

The server is ready about 20 s after start. The first request after a fresh install takes up to a minute (GPU kernels are compiled once and kept in the decision-cache volume); later requests take well under a second, also after restarts.

Settings

Optional: copy .env.example to .env next to docker-compose.yml.

Variable Default Meaning
PORT 9100 Host port
GPU 0 Host GPU index (as in nvidia-smi)
MODEL_DIR ../.. Model folder; the default is the downloaded repo itself
SERVE_ARGS empty Extra server flags, e.g. --max_pending 64 --cache_mb 4096

Server flags: --token_budget, --max_length, --max_questions, --max_pending, --cache_mb (keep prefix states between requests for multi-turn traffic), and more: docker compose run --rm decision --help.

One server uses one GPU. For more throughput, run one copy per GPU (different GPU and PORT, e.g. with docker compose -p decision-gpu1 up -d) behind a load balancer.

Operations

  • Logs: docker compose logs -f (one JSON line per request; rotated at 5 x 50 MB).
  • The container restarts on failure and on reboot (restart: unless-stopped) and has a health check on /health.
  • Update: hf download DeepEduVN/bungpt-open --local-dir bungpt-open again, then docker compose up -d --build.
  • The model is mounted read-only and no token is needed inside the container.