The maximum number of tokens to generate. Shorter token lengths will provide faster performance.
A decimal number that determines the degree of randomness in the response
The top-k parameter limits the model's predictions to the top k most probable tokens at each step of generation.
A system prompt is a way of providing context and instructions to Claude.
ResetGenerate
Output
Submit a prompt for a response.
Notes
Introduction
The Claude 3 family introduces a new generation of large multimodal models, including Claude 3 Opus, Claude 3 Sonnet, and Claude 3 Haiku. These models marks a significant milestone in the evolution of large multimodal models, introducing a suite of capabilities that redefine the benchmarks across a variety of domains including reasoning, math, coding, multilingual understanding, and vision quality.
Claude 3 Sonnet Model
Claude 3 Sonnet is part of the broader Claude 3 family, which also includes Claude 3 Opus and Claude 3 Haiku. Sonnet is designed to provide a middle ground in terms of performance and speed, making it an ideal choice for applications requiring both efficiency and a high level of capability. Like its siblings, Sonnet is a multimodal model, capable of processing and analyzing both text and image data.
Claude 3 Sonnet has a ability to perform nuanced content creation, accurate summarization, and handle complex scientific queries. The model demonstrates increased proficiency in non-English languages and coding tasks, supporting a wider range of use cases on a global scale.
Run Claude-3 Sonnet with an API
Running the API with Clarifai's Python SDK
You can run the Claude-3 Sonnet Model API using Clarifai’s Python SDK.
Export your PAT as an environment variable. Then, import and initialize the API Client.
from clarifai.client.model import Model
from clarifai.client.inputimport Inputs
prompt ="What time of day is it?"image_url ="https://samples.clarifai.com/metro-north.jpg"inference_params =dict(temperature=0.2, max_tokens=100, top_k=50, system_prompt="You're the helpful assistent")model_prediction = Model("https://clarifai.com/anthropic/completion/models/claude-3-sonnet").predict(inputs =[Inputs.get_multimodal_input(input_id="",image_url=image_url, raw_text=prompt)],inference_params=inference_params)print(model_prediction.outputs[0].data.text.raw)
You can also run Claude-3 Sonnet API using other Clarifai Client Libraries like Java, cURL, NodeJS, PHP, etc here.
Predict via local Image
from clarifai.client.model import Model
from clarifai.client.inputimport Inputs
IMAGE_FILE_LOCATION ='LOCAL IMAGE PATH'withopen(IMAGE_FILE_LOCATION,"rb")as f:file_bytes = f.read()prompt ="What time of day is it?"inference_params =dict(temperature=0.2, max_tokens=100, top_k=50, system_prompt="You're the helpful assistent")model_prediction = Model("https://clarifai.com/anthropic/completion/models/claude-3-sonnet").predict(inputs =[Inputs.get_multimodal_input(input_id="", image_bytes = file_bytes, raw_text=prompt)], inference_params=inference_params)print(model_prediction.outputs[0].data.text.raw)
Note
Providing an image as input is optional. The model will function even if no image is provided.
Aliases: claude-3, claude 3, claude3 Sonnet, claude 3 sonnet
Use Cases
Claude 3 Sonnet excels in a wide range of tasks including but not limited to:
Open-ended conversation and collaboration on ideas.
Coding tasks and text-related operations such as searching, writing, editing, outlining, and summarizing.
Interpreting visual inputs like charts, graphs, and photos to support productivity and decision-making processes.
Specialized applications requiring nuanced content creation, analysis, forecasting, and accurate summarization.
Dataset
Claude 3 models were trained on a proprietary mix of publicly available information and non-publicdata up to August 2023, employing advanced data cleaning and filtering methods.
Advantages
Multimodal Capabilities: Claude 3 Sonnet's ability to process both text and image data opens up a plethora of new applications and use cases.
Language Proficiency: Improved fluency in non-English languages enhances its global applicability.
Balance of Speed and Quality: It offers a compelling combination of high-quality outputs with efficiency, making it suitable for a wide range of applications.
Limitations
While Claude's capabilities are cutting-edge, there are some limitations to be aware of:
High-Stakes Use Cases: As with other models of its kind, Claude 3 Sonnet should not be used as a standalone solution in situations where errors could lead to significant harm.
Current Knowledge Limit: The model's knowledge is current up to mid-2023, and it does not have real-time web search capabilities.
Language Performance Variance: While it has improved multilingual capabilities, performance may vary across languages, especially those with fewer resources.
ID
Model Type ID
Multimodal To Text
Input Type
image
Output Type
text
Description
Claude 3 Sonnet is a multimodal AI llm model balancing skills and speed, excelling in reasoning, multilingual tasks, and visual interpretation.