New in 3.10This page relates to the fine-tuning recipe, which is a beta feature available starting with version
3.10.0After deploying your model, you will have to update your assistant’s config for it to use the model for command generation.
Hardware Requirements
Hosting large language models requires a GPU to achieve fast inference latency. If you are using a language model with billions of parameters, such as Llama 3.1, it is highly recommended that you use a GPU with a relatively large amount of memory. For example, an 8 Billion parameter model needs at least 16GB of GPU memory to fit the weights when using 16-bit precision. On top of that, some memory is required for processing one or multiple queries at once, and for caching activations from prior queries (prefix caching) to speed up processing of similar queries. In our experience, a GPU with 40GB of memory provides enough memory to operate a 8B parameter model at scale. Suitable GPUs for low-latency inference:- A100 (40GB/80GB)
- L40S (48GB)
- H100 (80GB)
Expected Throughput and Latency
With one of the recommended GPUs you can process around 5 requests per second for command generation at a median response time below 500ms. Note that requests per second is not equal to the number of users. For example, in a voice bot, a user might only interact with the system every 10 seconds because the interaction loop involves user speaking, processing, system responding, user listening, deciding and speaking again. Thus, 5 requests per second would equate to around 50 concurrent users.The exact latency and throughput numbers will depend on the size of your prompt, which in turn is influenced
by things such as the number of flows, their description length, whether you are using flow retrieval, etc.
Options for deploying the fine-tuned model
The following options show different scenarios for using the vLLM model serving library with your fine-tuned model.- If you like to serve the model for testing purposes right on the machine where you trained it, you can use vLLM directly
- You can also use docker to start vLLM on a VM.
- For production use you can deploy the LLM to a kubernetes cluster
- If you are on AWS, Sagemaker Inference Endpoints are another option for production use. Try them out with our guide in the reference section.