This post demonstrates how to deploy DeepSeek-R1-0528-Qwen3-8B using vLLM on Vast.ai and integrate it with Crew AI for multi-agent workflows. The setup creates an OpenAI-compatible API endpoint that Crew AI can use as a custom LLM provider.
Crew AI is an open-source framework for building multi-agent AI systems. It allows you to create autonomous AI agents that can work together on complex tasks, with each agent having its own role, goals, and tools. The framework handles agent coordination, task delegation, and workflow orchestration.
Key features of Crew AI:
Vast.ai provides a marketplace for renting GPU compute power, offering a cost-effective alternative to major cloud providers. It allows us to find and rent specific GPU configurations that match our model's requirements, with the flexibility to select hardware optimized for specific models.
We will:
First, install the Vast CLI and configure your API key. You can get your API key on the Account Page in the Vast Console:
#In an environment of your choice
pip install --upgrade vastai
# Set your api key
export VAST_API_KEY="" # Your key here
vastai set api-key $VAST_API_KEY
Next, install the required packages for our Crew AI integration:
pip install --upgrade litellm langchain-openai
pip install --upgrade openai crewai crewai-tools
DeepSeek R1 (8B parameters) with Crew AI multi-agent workflows requires:
We'll search for suitable hardware:
vastai search offers "compute_cap >= 750 \
gpu_ram >= 24 \
num_gpus = 1 \
static_ip = true \
direct_port_count >= 1 \
verified = true \
disk_space >= 60 \
rentable = true"
Pricing varies depending on GPU type and availability.
Choose an instance ID from your search results and deploy using vLLM's OpenAI-compatible server:
export INSTANCE_ID="" # Insert instance ID
# Deploy with the converted Docker command for DeepSeek R1-0528-Qwen3-8B
vastai create instance $INSTANCE_ID --image vllm/vllm-openai:latest --env '-p 8000:8000' --disk 60 --args --model deepseek-ai/DeepSeek-R1-0528-Qwen3-8B --served-model-name custom/deepseek --max-model-len 4096 --reasoning-parser qwen3
Key parameters explained:
--image vllm/vllm-openai:latest
: Provides OpenAI-compatible API endpoints--reasoning-parser qwen3
: Enables DeepSeek's step-by-step reasoning capabilities--max-model-len 4096
: Sufficient context for most multi-agent workflows--served-model-name custom/deepseek
: Clean model name for Crew AI integrationThe deployment will take 5-10 minutes to download the model and start serving.
To get your instance connection details:
You should see something like:
XX.XX.XXX.XX:YYYY -> 8000/tcp
Test the connection to verify your model is ready:
import requests
VAST_IP_ADDRESS = "" # Your instance IP
VAST_PORT = "" # Your instance port
# Check what model your API serves
response = requests.get(f"http://{VAST_IP_ADDRESS}:{VAST_PORT}/v1/models")
models = response.json()
model_name = models['data'][0]['id']
print(f"API serves model: {model_name}")
Now let's create a sophisticated multi-agent research team powered by DeepSeek's reasoning capabilities:
from crewai import Agent, Task, Crew
from langchain_openai import ChatOpenAI
from openai import OpenAI
# Replace with your actual Vast.ai instance IP and port
VAST_IP_ADDRESS = "" # Your instance IP
VAST_PORT = "" # Your instance port
client = OpenAI(
api_key="DUMMY",
base_url=f"http://{VAST_IP_ADDRESS}:{VAST_PORT}/v1"
)
import litellm
# Your Vast AI vLLM endpoint
litellm.api_base = f"http://{VAST_IP_ADDRESS}:{VAST_PORT}/v1"
litellm.api_key = "DUMMY" # Required by litellm even if unused
import requests
# Check what model your API serves
response = requests.get(f"http://{VAST_IP_ADDRESS}:{VAST_PORT}/v1/models")
models = response.json()
model_name = models['data'][0]['id']
print(f"API serves model: {model_name}")
# Create LLM connection for Crew AI
crew_llm = ChatOpenAI(
model=f"openai/{model_name}",
openai_api_base=f"http://{VAST_IP_ADDRESS}:{VAST_PORT}/v1",
openai_api_key="DUMMY",
temperature=0.7,
max_tokens=1000,
request_timeout=60
)
print(f"โ
Using model: openai/{model_name}")
Define a collaborative research team with distinct roles and expertise:
# Create specialized agents for our research team
research_analyst = Agent(
role="Senior Research Analyst",
goal="Uncover cutting-edge developments in AI and technology",
backstory="""You are a veteran researcher with 15 years of experience in technology analysis.
You're known for your ability to identify important trends and synthesize complex information.""",
llm=crew_llm,
verbose=True
)
tech_writer = Agent(
role="Tech Writer",
goal="Craft compelling narratives about complex technical topics",
backstory="""You are an experienced technical writer who excels at making complex topics
accessible. You have a talent for explaining technical concepts in clear, engaging ways.""",
llm=crew_llm,
verbose=True
)
quality_reviewer = Agent(
role="Editorial Reviewer",
goal="Ensure accuracy and clarity in technical communications",
backstory="""You are a meticulous editor with a keen eye for detail. You ensure all content
is accurate, well-structured, and easy to understand.""",
llm=crew_llm,
verbose=True
)
Define collaborative tasks that leverage each agent's expertise:
# Define tasks for each agent
research_task = Task(
description="""Research and analyze the impact of open-source LLMs on enterprise AI adoption.
Focus on:
1. Key open-source models being adopted by enterprises
2. Cost comparisons with proprietary solutions
3. Main use cases and success stories
4. Challenges and limitations
Provide a comprehensive analysis with specific examples.""",
expected_output="A detailed research report with findings and insights",
agent=research_analyst
)
writing_task = Task(
description="""Based on the research findings, create a concise executive summary that:
1. Highlights the 3 most important insights
2. Includes specific examples and data points
3. Provides actionable recommendations for enterprises
Make it engaging and accessible to non-technical executives.""",
expected_output="A polished executive summary of 200-300 words",
agent=tech_writer
)
review_task = Task(
description="""Review the executive summary for:
1. Technical accuracy
2. Clarity and readability
3. Logical flow and structure
Provide specific feedback and a final approval.""",
expected_output="Review feedback and final approved version",
agent=quality_reviewer
)
# Create and execute the crew
print("๐ Starting multi-agent research team...\n")
crew = Crew(
agents=[research_analyst, tech_writer, quality_reviewer],
tasks=[research_task, writing_task, review_task],
verbose=1
)
result = crew.kickoff()
print(f"\n๐ Final Result:\n{result}")
This section shows the complete execution of our DeepSeek-powered Crew AI workflow, demonstrating how three specialized agents collaborate to produce comprehensive research and analysis.
The workflow begins with Crew AI setting up the execution environment:
๐ Starting multi-agent research team...
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Crew Execution Started โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Crew Execution Started โ
โ Name: crew โ
โ ID: e303ddc0-b84c-4c4f-ba6f-5934c767eceb โ
โ Tool Args: โ
โ โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Our Senior Research Analyst agent conducts comprehensive research on open-source LLMs in enterprise environments:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ค Agent Started โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Agent: Senior Research Analyst โ
โ โ
โ Task: Research and analyze the impact of open-source LLMs on enterprise AI adoption. โ
โ Focus on: โ
โ 1. Key open-source models being adopted by enterprises โ
โ 2. Cost comparisons with proprietary solutions โ
โ 3. Main use cases and success stories โ
โ 4. Challenges and limitations โ
โ โ
โ Provide a comprehensive analysis with specific examples. โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
The Research Analyst produces a comprehensive analysis including:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
Agent Final Answer โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Agent: Senior Research Analyst โ
โ โ
โ Final Answer: โ
โ **Research Report: Impact of Open-Source Large Language Models (LLMs) on Enterprise AI Adoption** โ
โ โ
โ **Executive Summary:** โ
โ Open-source Large Language Models (LLMs) are rapidly transitioning from research projects to enterprise-grade โ
โ tools, offering a compelling alternative or complement to proprietary AI solutions. Enterprises are โ
โ leveraging these models for cost savings, customization, avoiding vendor lock-in, and accelerating โ
โ innovation. While challenges related to integration, data security, performance tuning, and talent exist, the โ
โ trend indicates a significant shift in how businesses approach and deploy AI, particularly for internal โ
โ applications, research, and development. โ
โ โ
โ **1. Key Open-Source Models Being Adopted by Enterprises:** โ
[... detailed model output truncated ...]
โ **Conclusion:** โ
โ โ
โ The adoption of open-source LLMs by enterprises represents a significant shift toward more democratized, โ
โ cost-effective, and customizable AI solutions. While challenges exist, particularly around infrastructure, โ
โ talent, and integration complexity, the benefits of cost savings, customization, and avoiding vendor lock-in โ
โ are driving accelerated adoption across industries. โ
โ โ
โ Enterprises most successful with open-source LLM adoption tend to have: โ
โ 1. Clear use cases with high-volume, consistent usage patterns โ
โ 2. Dedicated AI/ML teams or partnerships with specialized vendors โ
โ 3. Robust data security and compliance frameworks โ
โ 4. Long-term strategic commitment to AI capabilities development โ
โ โ
โ As the open-source LLM ecosystem continues to mature, with improved tooling, managed services, and more โ
โ permissive licensing, enterprise adoption is expected to accelerate significantly over the next 2-3 years. โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
The Tech Writer agent transforms the research into an executive-ready summary:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ค Agent Started โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Agent: Tech Writer โ
โ โ
โ Task: Based on the research findings, create a concise executive summary that: โ
โ 1. Highlights the 3 most important insights โ
โ 2. Includes specific examples and data points โ
โ 3. Provides actionable recommendations for enterprises โ
โ โ
โ Make it engaging and accessible to non-technical executives. โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Executive Summary Output:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
Agent Final Answer โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Agent: Tech Writer โ
โ โ
โ Final Answer: โ
โ **Executive Summary: Open-Source AI Models Transform Enterprise Operations** โ
โ โ
โ Open-source large language models (LLMs) are reshaping how enterprises approach artificial intelligence, โ
โ offering compelling alternatives to expensive proprietary solutions. Our analysis reveals three critical โ
โ insights that should inform every executive's AI strategy. โ
โ โ
โ **1. Dramatic Cost Reduction Potential** โ
[... detailed model output truncated ...]
โ The open-source AI revolution is not a future trendโit's happening now. Enterprises that act decisively to โ
โ evaluate and adopt these technologies will gain significant competitive advantages in cost efficiency, โ
โ customization capabilities, and strategic control over their AI future. โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
The Editorial Reviewer agent performs final quality assurance:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ค Agent Started โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Agent: Editorial Reviewer โ
โ โ
โ Task: Review the executive summary for: โ
โ 1. Technical accuracy โ
โ 2. Clarity and readability โ
โ 3. Logical flow and structure โ
โ โ
โ Provide specific feedback and a final approval. โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Editorial Review Output:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
Agent Final Answer โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ Agent: Editorial Reviewer โ
โ โ
โ Final Answer: โ
โ **Editorial Review and Final Approval** โ
โ โ
โ **Review Assessment:** โ
โ โ
โ **Technical Accuracy: โ
APPROVED** โ
โ The executive summary accurately reflects the research findings with correct data points and realistic cost โ
โ projections. The 60-80% cost savings figure aligns with industry reports, and the specific example of the โ
โ retail company's $320,000 investment with 9-month break-even is mathematically sound and represents typical โ
โ enterprise deployment scenarios. โ
โ โ
โ **Clarity and Readability: โ
APPROVED** โ
โ The document successfully translates complex technical concepts into accessible business language. Technical โ
โ jargon is minimized, and each insight is supported by concrete examples that non-technical executives can โ
โ easily understand and relate to their own organizational contexts. โ
โ โ
โ **Logical Flow and Structure: โ
APPROVED** โ
โ The summary follows a clear progression from identifying opportunities (cost savings) to competitive โ
โ advantages (customization) to strategic considerations (control and future-proofing). The actionable โ
โ recommendations are appropriately segmented by timeline and provide clear next steps for decision-makers. โ
โ โ
โ **Minor Enhancement Suggestion:** โ
โ Consider adding a brief risk mitigation note about the talent and infrastructure requirements to provide a โ
โ balanced perspective for executive decision-making. โ
โ โ
โ **Final Approved Version:** โ
โ โ
โ **Executive Summary: Open-Source AI Models Transform Enterprise Operations** โ
โ โ
โ Open-source large language models (LLMs) are reshaping how enterprises approach artificial intelligence, โ
โ offering compelling alternatives to expensive proprietary solutions. Our analysis reveals three critical โ
โ insights that should inform every executive's AI strategy. โ
โ โ
โ **1. Dramatic Cost Reduction Potential** โ
โ Enterprises are achieving 60-80% cost savings by transitioning from proprietary AI services to open-source โ
โ alternatives. A retail company reduced monthly AI expenses from $45,000 to $10,000 by self-hosting Llama 2 โ
โ models, achieving break-even in just 9 months despite a $320,000 initial investment. For high-volume users โ
โ processing over 10 million tokens monthly, the economics strongly favor open-source deployment. โ
โ โ
โ **2. Customization Drives Competitive Advantage** โ
โ Unlike closed systems, open-source models can be fine-tuned on proprietary company data, creating unique โ
โ competitive advantages. A financial services firm developed custom models for personalized client reporting, โ
โ while an e-commerce platform achieved 92% customer satisfaction with automated support handling 70% of โ
โ inquiries. This customization capability allows enterprises to embed their specific knowledge, processes, and โ
โ brand voice directly into AI systems. โ
โ โ
โ **3. Strategic Control and Future-Proofing** โ
โ Open-source adoption eliminates vendor lock-in while providing complete control over sensitive data and AI โ
โ capabilities. A pharmaceutical company now analyzes research literature internally using fine-tuned models, โ
โ reducing analysis time from weeks to days while maintaining strict data privacy. This approach future-proofs โ
โ AI investments against pricing changes and service discontinuations. โ
โ โ
โ **Actionable Recommendations** โ
โ โ
โ **Immediate Actions (Next 90 Days):** โ
โ - Identify high-volume, repetitive AI use cases within your organization โ
โ - Pilot open-source models for internal applications where data privacy is critical โ
โ - Assess current AI spending and usage patterns to quantify potential savings โ
โ โ
โ **Strategic Investments (6-12 Months):** โ
โ - Build internal AI capabilities or establish partnerships with specialized vendors โ
โ - Develop data governance frameworks suitable for AI model training โ
โ - Create hybrid deployment strategies combining open-source and proprietary solutions based on use case โ
โ requirements โ
โ โ
โ **Long-term Positioning (12+ Months):** โ
โ - Establish centers of excellence for AI model development and deployment โ
โ - Invest in secure, compliant infrastructure for self-hosted AI models โ
โ - Develop proprietary datasets and fine-tuning capabilities as strategic differentiators โ
โ โ
โ **Implementation Considerations:** โ
โ Success requires significant upfront investment in specialized talent and infrastructure. Enterprises should โ
โ evaluate their technical capabilities and consider managed service partnerships to mitigate implementation โ
โ risks while capturing the strategic benefits of open-source AI adoption. โ
โ โ
โ The open-source AI revolution is not a future trendโit's happening now. Enterprises that act decisively to โ
โ evaluate and adopt these technologies will gain significant competitive advantages in cost efficiency, โ
โ customization capabilities, and strategic control over their AI future. โ
โ โ
โ **EDITORIAL APPROVAL: โ
APPROVED FOR PUBLICATION** โ
โ *This document has been reviewed for accuracy, clarity, and completeness. Ready for executive distribution.* โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Crew Execution Completed โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ โ
โ Crew Execution Completed โ
โ Total execution time: 0:02:18 โ
โ โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
The workflow output demonstrates the potential of this multi-agent approach clearly. The research analyst produced a comprehensive enterprise AI adoption analysis with specific examples and quantified benefits, diving deep into cost comparisons, use cases, and implementation challenges. The technical writer then transformed this detailed research into executive-ready insights with actionable recommendations segmented by timeline. Finally, the editorial reviewer ensured accuracy and clarity throughout, providing both critique and a polished final version.
This guide demonstrated how to combine DeepSeek R1's advanced reasoning, Crew AI's multi-agent orchestration, and Vast.ai's flexible GPU marketplace to create sophisticated AI workflows that were previously only accessible to organizations with massive infrastructure budgets. The integration shows that complex AI applications no longer require dedicated data centers or long-term hardware commitments.
Vast.ai makes this advanced AI orchestration accessible to any organization by providing on-demand access to the computational power needed without massive upfront investment. Whether you're experimenting with new AI workflows or scaling existing operations, the combination of DeepSeek's reasoning, Crew AI's orchestration, and Vast.ai's flexible infrastructure opens up entirely new possibilities for automated knowledge work.