Skip to main content
The CSM (Conversational Speech Model) by Sesame is a speech generation model designed to generate RVQ audio codes using text and audio inputs. It utilizes a Llama backbone for its architecture, along with a compact audio decoder that outputs Mimi audio codes. Follow this guide to deploy the Sesame-CSM-1B model on your cloud account using Tensorfuse. We will be using 1 A10G GPU for this model. We will use nvidia triton server to serve the model.

Prerequisites

Before you begin, ensure you have configured Tensorfuse on your AWS account. If you haven’t done that yet, follow the Getting Started guide. You will also need access to the Sesame CSM 1B and the Llama-3.2-1B gated models on huggingface.

Deploying Sesame CSM 1B with Tensorfuse

Each Tensorkube deployment requires:
  1. Your environment (as a Dockerfile).
  2. Your code (in this example, the models directory).
  3. A deployment configuration (deployment.yaml).

Step 1: Prepare the Dockerfile

We will use the official nvidia triton server image as our base image. This image comes with all the necessary dependencies to run the model. The image tag can be found in nvidia container catalog We clone the CSM github repository to make deploying the model easier. We will also need the hf-transfer and numpy python packages.
Dockerfile
We’ve configured the triton server with couple of CLI flags tailored to our specific use case. We have disabled metrics for inference requets. For more details on authentication, refer to triton docs .If you have questions about selecting flags for production, reach out to the Tensorfuse Community

Step 2: Prepare the models directory

We will use a python backend for tritonserver to serve the model. We will create a model_repository directory and add the model.py and config.pbtxt file in it. For more details about triton python backend refer to triton docs
model_repository/csm_1b/1/model.py
model_repository/csm_1b/config.pbtxt

Step 3: Create Secrets

We need to create a hugging face secret to download model from huggingface hub

Step 4: Deployment config

Although you can deploy tensorfuse apps using command line, it is always recommended to have a config file so that you can follow a GitOps approach to deployment.
config.yaml
Now you can deploy your service using the following command:

Step 4: Accessing the deployed app

Voila! Your autoscaling production text to speech service using sesame-csm-1b is ready. Once the deployment is successful, you can see the status of your app by running:
And that’s it! You have successfully deployed the sesame-csm-1b model.
Remember to configure a TLS endpoint with a custom domain before going to production.

Testing the model

To test it out, we have a sample streamlit_app.py python file. Add your deployment url DEPLOYMENT_URL in the code before running the streamlit_app.py file using the command streamlit run streamlit_app.py
streamlit_app.py
Dont forget to install the required python packages before running the client.py file
Once you run the streamlit app, you will be able to use it to interface with your deployment. To get started with Tensorfuse,Click here You can also directly use the Tensorfuse GitHub repository for more details and updates on these Dockerfiles.