页面简介
Guide on saving and deploying LLMs to vLLM for serving LLMs in production
正文摘录
💻Installing vLLMFor NVIDIA GPUs, use uv and run:AskCopypip install --upgrade pip pip install uv uv pip install -U vllm --torch-backend=autoFor AMD GPUs, please use the nightly Docker image: rocm/vllm-dev:nightlyFor the nightly branch for NVIDIA GPUs, run:AskCopypip install --upgrade pip pip install uv uv pip install -U vllm --torch-backend=auto --extra-index-url https://wheels.vllm.ai/nightlySee vLLM docs for more details🚚Deploying vLLM modelsAfter saving your fine-tune, you can simply do:AskCopyvllm serve unsloth/gpt-oss-120b🚒vLLM Deployment Server Flags, Engine Arguments & OptionsSome important server flags to use are at vLLM Deployment Server Flags, Engine Arguments & Options🦥Deploying Unsloth finetunes in vLLMAfter fine-tuning Fine-tuning Guide or using our notebooks at Unsloth Notebooks, you can save or deploy your models directly through vLLM within a single workflow. An example Unsloth finetuning script for eg:To save to 16-bit for vLLM, use:To save just the LoRA adapters, either use:Or just use our builtin function to do that:To merge to 4bit to load on HuggingFace, first call merged_4bit. Then use merged_4bit_forced if you are certain you want to merge to 4bit. I highly discourage you, unless you know what you are going to do with the 4bit model (ie for DPO training for eg or for HuggingFace's online inference engine)Then to load the finetuned model in vLLM in another terminal:You might have to provide the full path if the above doesn't work ie:See other content:vLLM Engine ArgumentsLoRA Hot Swapping GuidePreviousSpeculative DecodingNextvLLM Engine ArgumentsLast updated 11 months agoWas this helpful?