Sign inSign up

zen3515/functionary-vllm

By zen3515

Updated over 2 years ago

Slim vllm/vllm-openai with functionary on top Zero COPY commands! You can check in view layer detail

Image
Machine learning & AI
0

225

zen3515/functionary-vllm repository overview

Functionary vLLM (unofficial)

This repo adds functionary on top of vllm/vllm-openai

Highlight

  • Slim (8GB, while other is 22GB)
  • Clone from official functionary
  • There is no layer with COPY command (so no need to host a git for 1 dockerfile repo)
    And you could verify the layer details yourself!

Docker Run

$ docker run --gpus all -it --ipc=host --name functionary-vllm \
  --workdir /workspace \
  -v ~/.cache/huggingface:/root/.cache/huggingface \
  -p 8000:8000 \
  zen3515/functionary-vllm:v2.5 --model "meetkai/functionary-small-v2.5" --host "0.0.0.0" --max-model-len "8192"

Docker Compose

services:
  functionary_vllm:
    image: zen3515/functionary-vllm:v2.5
    container_name: functionary-vllm
    restart: unless-stopped
    shm_size: "8g"
    volumes:
      - ~/.cache/huggingface:/root/.cache/huggingface
    command:
      - --model 
      - meetkai/functionary-small-v2.5
      - --host
      - "0.0.0.0"
      - --max-model-len
      - "8192"
    ports:
      - "8000:8000"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    environment:
      HUGGING_FACE_HUB_TOKEN: "${HUGGING_FACE_HUB_TOKEN}"
You know what, here is the current Dockerfile
# This is specifically for functionary 2.5
FROM vllm/vllm-openai:v0.4.1
ARG COMMIT=858e341bd5bf82a1a49a8270be07160b2c200a5b

RUN /bin/sh -c "pip install --no-cache-dir jsonref"

WORKDIR /functionary

# https://github.com/MeetKai/functionary/commit/858e341bd5bf82a1a49a8270be07160b2c200a5b
RUN /bin/sh -c "git init \
   && git remote add origin https://github.com/MeetKai/functionary.git \
   && git fetch origin $COMMIT \
   && git reset --hard FETCH_HEAD"

ENTRYPOINT ["python3", "server_vllm.py"]

CMD ["--model", "meetkai/functionary-small-v2.5"]

Tag summary

Content type

Image

Digest

sha256:7caf1a5d7

Size

3.8 GB

Last updated

over 2 years ago

docker pull zen3515/functionary-vllm:v2.5