# thinkingmachines/Inkling-2-Mini
# docker compose up -d   (the first start downloads the weights)
name: bench_model
services:
  engine:
    image: lmsysorg/sglang:inkling-2-mini
    container_name: bench-model
    gpus: all
    ipc: host
    shm_size: 32gb
    mem_limit: 86g
    memswap_limit: 86g
    ports:
    - 127.0.0.1:8000:8000
    environment:
      HF_HOME: /hf
      HF_TOKEN: ${HF_TOKEN:-}
      SGLANG_OPT_INKLING2_VERIFY_REL_BIAS_KERNEL: '1'
      SGLANG_OPT_DSV41_DSPARK_MID_FOLD: '1'
      SGLANG_OPT_DSV41_DSPARK_PREPARE_INPUTS_ONCE: '1'
      SGLANG_OPT_DSV41_DSPARK_SKIP_PREFILLED_INPUTS: '1'
    volumes:
    - type: bind
      source: ${HF_HOME:-${HOME}/.cache/huggingface}
      target: /hf
      read_only: false
      bind:
        create_host_path: true
    command:
    - python3
    - -m
    - sglang.launch_server
    - --model-path
    - thinkingmachines/Inkling-2-Mini
    - --revision
    - b85c3cfa615fc413cc9af3379f491b963f3b586a
    - --served-model-name
    - Inkling-2-Mini
    - --tp
    - '1'
    - --ep
    - '1'
    - --attention-backend
    - fa4
    - --dtype
    - bfloat16
    - --page-size
    - '128'
    - --speculative-algorithm
    - DSPARK
    - --speculative-num-draft-tokens
    - '8'
    - --max-running-requests
    - '4'
    - --grammar-backend
    - xgrammar
    - --enable-multimodal
    - --host
    - 0.0.0.0
    - --port
    - '8000'
    - --context-length
    - '262144'
    - --reasoning-parser
    - inkling
    - --tool-call-parser
    - inkling2
    - --enable-metrics
    restart: 'no'
