Prerequisites
- A Friendli Suite account with access to Friendli Suite > Dedicated Endpoints
- A Hugging Face account with access to the meta-llama-3-8b-instruct model
Step 1: Create a New Endpoint
- Sign in to your Friendli Suite account and navigate to the Dedicated Endpoints.
- If your team doesn’t have any credits, purchase some before deploying.
- Create a new project, then click the New Endpoint button.
- Fill in the basic information:
- Endpoint name: Enter a unique name for your endpoint (e.g., “My New Endpoint”).
- Select the model:
- Model Repository: Select Hugging Face as the model provider.
- Model ID: Enter
meta-llama/Meta-Llama-3-8B-Instructas the model id. As the search bar loads the list, click the top result that exactly matches the repository id.
By default, the model pulls the latest commit on the default branch of the model. You can manually select a specific branch, tag, or commit instead.If you’re using your own model, check Format Requirements for requirements.
- Select the instance:
- Instance configuration: Select a suitable instance type based on your performance requirements. FriendliAI suggests 1x A100 80G for most models.
For large models, Friendli Suite may restrict some instance options because they lack enough VRAM to run the model.
- Edit the configurations:
- Autoscaling: By default, the autoscaling ranges from 0 to 2 replicas. This means that the deployment will sleep when it’s not being used, which reduces cost.
- Advanced configuration: Some LLM options including the batch size and token configurations are mutable. For this tutorial, leave them as-is.
- Click Deploy to create a new endpoint.
Step 2: Test the Endpoint
- Wait for Friendli Suite to create and initialize the deployment. This may take a few minutes.
You can check the status with the indicator under the endpoint’s name.
- In the Playground section, you can enter a sample input prompt (e.g., “What is the capital of France?”).
- Click the right arrow button to send the inference request.
- Use the Metrics and Logs sections to monitor the endpoint.
Step 3: Send Requests by Using cURL or Python
- As described in the API docs, you can send instructions with the following code:
- You can update the model and change almost everything by clicking the update button.