vllm_utils_mem_constants.py

vllm-decode-memory/vllm_utils_mem_constants.py 526 chars
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
KB_bytes = 1_000
"""The number of bytes in one kilobyte (KB)."""

KiB_bytes = 1 << 10
"""The number of bytes in one kibibyte (KiB)."""

MB_bytes = 1_000_000
"""The number of bytes in one megabyte (MB)."""

MiB_bytes = 1 << 20
"""The number of bytes in one mebibyte (MiB)."""

GB_bytes = 1_000_000_000
"""The number of bytes in one gigabyte (GB)."""

GiB_bytes = 1 << 30
"""The number of bytes in one gibibyte (GiB)."""