Back to All
Developer Blog

Qualcomm AI Inference Suite: getting started is easy

Sign up for Developer monthly newsletter-image

Sign up for Developer monthly newsletter

Join thousands of developers around the globe who receive latest news and updates from our monthly curated newsletter.

Sign up
Come for support, stay for the community-image

Come for support, stay for the community

Get support from experts, connect with like-minded developers, and access exclusive virtual events.

Join Developer Discord

Developing solutions with AI inference at scale doesn’t have to be hard. Get started today using the Qualcomm AI Inference Suite, hosted on Cirrascale using our Python SDK.

Qualcomm has partnered with Cirrascale to provide a free-to-try AI inference service that makes it easy for developers to connect and run inference workloads from code. You don’t need to spin up containers or fiddle with complex cloud infrastructure. All you need to get started is to sign up and obtain an API key.

Once you have a key, it is simply a matter of choosing how to connect to the inference endpoint.  If you are most comfortable with Python, an SDK is provided along with documentation so that you can connect using familiar Python coding conventions. Many other programming languages and tools (20+) are supported if you prefer to use OpenAI compliant APIs.

Sample scenario

Let’s create a sample scenario to showcase use.  You want AI to tell you if a given customer review is positive, negative, or neutral. Once you have that data, you could later analyze which products or services are liked and which are not.

Python SDK example

Going step by step, we’ll build up our sample code.

Import functions you’ll need from the Imagine SDK:

from imagine import ChatMessage, ImagineClient

Set your API key and endpoint in env variables or in code:

myendpoint = "https://aisuite.cirrascale.com/apis/v2"
myapikey = "useyourownkeyhere"

Create your client for the API using the endpoint and key:

client = ImagineClient(endpoint=myendpoint, api_key=myapikey)

Set up your request, choosing which LLM to use:

mymodel = "Llama-3.1-8B"

feedback = "Feedback: ' We loved this hotel, we will be coming back.'"

mycontent = "You are an expert at sentiment analysis. Please evaluate the following customer feedback and answer only with positive, negative, or neutral. Only answer positive, negative, or neutral in lowercase. " + feedback

Call the chat function with your request:

mymessage = ChatMessage(role="user", content=mycontent)

chat_response = client.chat(
    messages=[mymessage],
    model=mymodel,
)

Print out the result:

print(chat_response.first_content)

Try changing the text of the feedback variable to different sets of text about any product and give it a try.

Try it out

As you can see, the process of using inference on a scalable platform like the Qualcomm AI Inference Suite is as easy as using any other simple API, but it provides access to very fast results using even larger models.  Even though this is just a small example, it could be integrated into a microservice to provide lots of customer sentiment analysis as part of a production data pipeline.

Like what you are seeing? Connect with fellow developers, get the latest news and prompt technical support by joining our Developer Discord.

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries ("Qualcomm"). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.

Qualcomm-branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries.

About the Author
Ray Stephenson
Ray StephensonDeveloper Relations Lead, Cloud
Qualcomm relentlessly innovates to deliver intelligent computing everywhere, helping the world tackle some of its most important challenges. Our leading-edge AI, high performance, low-power computing, and unrivaled connectivity deliver proven solutions that transform major industries. At Qualcomm, we are engineering human progress.

Stay connected

Get the latest Qualcomm and industry information delivered to your inbox.

Subscribe
Manage your subscription

© Qualcomm Technologies, Inc. and/or its affiliated companies.

Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries. Qualcomm patented technologies are licensed by Qualcomm Incorporated.

Note: Certain services and materials may require you to accept additional terms and conditions before accessing or using those items.

References to "Qualcomm" may mean Qualcomm Incorporated, or subsidiaries or business units within the Qualcomm corporate structure, as applicable.

Qualcomm Incorporated includes our licensing business, QTL, and the vast majority of our patent portfolio. Qualcomm Technologies, Inc., a subsidiary of Qualcomm Incorporated, operates, along with its subsidiaries, substantially all of our engineering, research and development functions, and substantially all of our products and services businesses, including our QCT semiconductor business.

Materials that are as of a specific date, including but not limited to press releases, presentations, blog posts and webcasts, may have been superseded by subsequent events or disclosures.

Nothing in these materials is an offer to sell or license any of the services or materials referenced herein.