In this example we are going to use vLLM to host an API for deepseek-ai/DeepSeek-R1-Distill-Qwen-7B on Beam.
This example requires our multi-GPU feature, which needs to be enabled on your
Beam account. Please send us a message in our Slack
Community
and we’ll enable it for you!
We provide an interactive command line interface to run the API. You’ll be prompted to enter the API URL from the deployment output above. If you select stream mode, the API will stream the response to the console.
Copy
$ python chat.pyWelcome to the CLI Chat Application!Type 'quit' to exit the conversation.Enter the app URL: https://deepseek-r1-distill-qwen-7b-54b3407-v4.app.beam.cloudStream mode? (y/n): y✅ Model deepseek-ai/DeepSeek-R1-Distill-Qwen-7B is ready
The first time you run the API, the model weights will be downloaded from
Hugging Face. This may take a few minutes, but will be cached for future runs.
You can now interact with the DeepSeek R1 API. The API will stream the response to the console, and print out the tokens generated and the time taken.
Copy
**Question:** What’s the meaning of life?<think></think>The question of the meaning of life is a deep and complex one, and different people and cultures may have different perspectives and answers. Some common themes across various philosophies and belief systems include:1. **Philosophical Views** - **Existentialism**: The belief that life is inherently meaningless, and individuals must create their own meaning. - **Mysticism**: The idea that the meaning of life is found within oneself, through spiritual or divine connection. - **Buddhism**: The concept of "suffering" (dukkha) and the goal of achieving liberation from suffering, often seen as the ultimate meaning of life.2. **Cultural and Religious Views** - **Religion**: Many religions—such as Christianity, Islam, and Buddhism—propose a higher power or purpose that gives life meaning. - **Science and Empiricism**: A materialistic or scientific view often suggests that life’s meaning is derived from personal fulfillment, relationships, or contributing to the greater good.3. **Personal Perspectives** - **Purpose**: Many people find meaning in life by aligning their actions with their personal values, goals, and aspirations. - **Relationships**: Building meaningful connections with others can provide a sense of purpose and fulfillment. - **Creativity**: Engaging in creative activities, such as art, music, or writing, can bring meaning to life.Ultimately, the meaning of life is often left open to interpretation, as it can vary greatly depending on individual experiences, beliefs, and contexts. Some find meaning through achieving their personal goals, while others find it in helping others or contributing to the world in some way.📜 Tokens Generated: 350⏳ Time Taken: 12.66s⚡ Tokens Per Second: 27.64