Hot starts, batch inference, and what's next for Runpod Serverless. Webinar June 25.

How to Run Basaran on Runpod: An Open-Source Alternative to OpenAI’s Completion API

Learn how to deploy Basaran, an open-source text generation API, on Runpod using a prebuilt template. Customize the model via environment variables and.

How to Run Basaran on Runpod: An Open-Source Alternative to OpenAI’s Completion API

Introduction: Basaran is an open-source alternative to the OpenAI text completion API - Repo. It is a powerful tool that can help you generate text based on a given input. In this simple guide, we will show you how to run Basaran on Runpod using a predefined template. As a bonus, we will also teach you how to change the model by editing the MODEL environment variable at pod creation if you want to use a different model than the default bigscience/bloomz-560m.

Step 1: Open the Runpod Template Click on the following link to open the Runpod template for Basaran: https://runpod.io/gsc?template=7ito7h393l&ref=vfker49t

Step 2: Create pod and let it pull the image.

Step 3: Edit the MODEL Environment Variable (Optional) If you want to use a different model than the default bigscience/bloomz-560m, you can change the MODEL environment variable. To do this go to edit pod setting, find the "Environment Variables" section in the pod edit interface. Locate the variable named "MODEL" and replace its value with the identifier of the model you wish to use. For example, you could replace bigscience/bloomz-560m with user/repo.

Note: Make sure to use a valid model identifier that is compatible with Basaran.

Replace it to use custom model after that reset pod
Replace it to use custom model after that reset pod

Step 4: After you've made any desired changes to the environment variables, reset the pod to apply new model.

Reset Pod will clear container storage and download custom model
Reset Pod will clear container storage and download custom model

Step 5: Access the Basaran Interface Once your pod is running, click on the "Connect via HTTP [Port 80]" button to access the Basaran web interface. From here, you can start using Basaran to generate text completions based on your input.
Note: You can also use API by adding /v1/completions at the end of your proxy URL.

Basaran web playground for bigscience/bloomz-560m with a prompt box and generation settings panel

Conclusion: That's it! You've successfully set up and launched Basaran on Runpod using the provided template. Now you can enjoy using this open-source alternative to OpenAI's text completion API. Remember that you can always change the model by editing the MODEL environment variable during pod creation.
Happy text generating!

Hopefully, this blog post has given you a better understanding of how to use the Fast Stable template. If you have any questions or need help, don't hesitate to send message on Runpod's Discord or other communities for support.

Author profile: Madiator2011

Related articles

View All
Deploy When Available is now GA

Deploy When Available is now GA

Queue for any GPU spec, even one that's fully rented out, and we'll deploy it the moment capacity opens up. No more refreshing the console or running a sniping tool.

All
The Chips Got Faster. The Stack Didn't.

The Chips Got Faster. The Stack Didn't.

Explore why faster chips have shifted the bottleneck to AI infrastructure, and what that means for teams running production workloads.

All

Build what’s next.

Build, train, and scale AI workloads on Runpod with cloud GPUs, Serverless, and Clusters.