Number Representations & States

"how numbers are stored and used in computers"

Installing SGLang

This is a guide based on the official installation instructions. It is recommended to use uv as the Python package manager for faster installation.

code.txt
1pip install --upgrade pip 2pip install uv 3uv pip install "sglang[all]>=0.4.10.post2"

Installing with Docker

This is the recommended way to install SGLang, as it provides a consistent environment and allows you to use the latest features.

code.txt
1# Clone the SGLang repository 2git clone https://github.com/sgl-project/sglang.git 3cd sglang/docker 4 5# Build the docker image 6docker build -t sglang-cpu:main -f Dockerfile.xeon . 7 8# Initiate a docker container 9docker run \ 10 -it \ 11 --privileged \ 12 --ipc=host \ 13 --network=host \ 14 -v /dev/shm:/dev/shm \ 15 -v ~/.cache/huggingface:/root/.cache/huggingface \ 16 -p 30000:30000 \ 17 -e "HF_TOKEN=<secret>" \ 18 sglang-cpu:main /bin/bash

Installing from source

code.txt
1# Use the last release branch 2git clone -b v0.4.10.post2 https://github.com/sgl-project/sglang.git 3cd sglang 4 5pip install --upgrade pip 6pip install -e "python[all]"