Skip to content

Commit

Permalink
feat sambanova models (#1858)
Browse files Browse the repository at this point in the history
Co-authored-by: jorgep_snova <[email protected]>
Co-authored-by: João Moura <[email protected]>
  • Loading branch information
3 people authored Jan 7, 2025
1 parent 673a38c commit 0e94236
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/concepts/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ The CLI will initially prompt for API keys for the following services:
* Groq
* Anthropic
* Google Gemini
* SambaNova

When you select a provider, the CLI will prompt you to enter your API key.

Expand Down
13 changes: 13 additions & 0 deletions docs/concepts/llms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,19 @@ Here's a detailed breakdown of supported models and their capabilities, you can
Groq is known for its fast inference speeds, making it suitable for real-time applications.
</Tip>
</Tab>
<Tab title="SambaNova">
| Model | Context Window | Best For |
|-------|---------------|-----------|
| Llama 3.1 70B/8B | Up to 131,072 tokens | High-performance, large context tasks |
| Llama 3.1 405B | 8,192 tokens | High-performance and output quality |
| Llama 3.2 Series | 8,192 tokens | General-purpose tasks, multimodal |
| Llama 3.3 70B | Up to 131,072 tokens | High-performance and output quality|
| Qwen2 familly | 8,192 tokens | High-performance and output quality |

<Tip>
[SambaNova](https://cloud.sambanova.ai/) has several models with fast inference speed at full precision.
</Tip>
</Tab>
<Tab title="Others">
| Provider | Context Window | Key Features |
|----------|---------------|--------------|
Expand Down
1 change: 1 addition & 0 deletions docs/how-to/llm-connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ LiteLLM supports a wide range of providers, including but not limited to:
- Cloudflare Workers AI
- DeepInfra
- Groq
- SambaNova
- [NVIDIA NIMs](https://docs.api.nvidia.com/nim/reference/models-1)
- And many more!

Expand Down
20 changes: 20 additions & 0 deletions src/crewai/cli/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@
"key_name": "CEREBRAS_API_KEY",
},
],
"sambanova": [
{
"prompt": "Enter your SambaNovaCloud API key (press Enter to skip)",
"key_name": "SAMBANOVA_API_KEY",
}
],
}


Expand All @@ -98,6 +104,7 @@
"bedrock",
"azure",
"cerebras",
"sambanova",
]

MODELS = {
Expand Down Expand Up @@ -156,6 +163,19 @@
"bedrock/mistral.mistral-7b-instruct-v0:2",
"bedrock/mistral.mixtral-8x7b-instruct-v0:1",
],
"sambanova": [
"sambanova/Meta-Llama-3.3-70B-Instruct",
"sambanova/QwQ-32B-Preview",
"sambanova/Qwen2.5-72B-Instruct",
"sambanova/Qwen2.5-Coder-32B-Instruct",
"sambanova/Meta-Llama-3.1-405B-Instruct",
"sambanova/Meta-Llama-3.1-70B-Instruct",
"sambanova/Meta-Llama-3.1-8B-Instruct",
"sambanova/Llama-3.2-90B-Vision-Instruct",
"sambanova/Llama-3.2-11B-Vision-Instruct",
"sambanova/Meta-Llama-3.2-3B-Instruct",
"sambanova/Meta-Llama-3.2-1B-Instruct",
],
}

DEFAULT_LLM_MODEL = "gpt-4o-mini"
Expand Down
12 changes: 12 additions & 0 deletions src/crewai/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ def flush(self):
"mixtral-8x7b-32768": 32768,
"llama-3.3-70b-versatile": 128000,
"llama-3.3-70b-instruct": 128000,
#sambanova
"Meta-Llama-3.3-70B-Instruct": 131072,
"QwQ-32B-Preview": 8192,
"Qwen2.5-72B-Instruct": 8192,
"Qwen2.5-Coder-32B-Instruct": 8192,
"Meta-Llama-3.1-405B-Instruct": 8192,
"Meta-Llama-3.1-70B-Instruct": 131072,
"Meta-Llama-3.1-8B-Instruct": 131072,
"Llama-3.2-90B-Vision-Instruct": 16384,
"Llama-3.2-11B-Vision-Instruct": 16384,
"Meta-Llama-3.2-3B-Instruct": 4096,
"Meta-Llama-3.2-1B-Instruct": 16384,
}

DEFAULT_CONTEXT_WINDOW_SIZE = 8192
Expand Down

0 comments on commit 0e94236

Please sign in to comment.