Perplexity
Perplexity: Llama3 Sonar 8B
perplexity/llama-3-sonar-small-32k-chat
Llama3 Sonar is Perplexity's latest model family. It surpasses their earlier Sonar models in cost-efficiency, speed, and performance.
This is a normal offline LLM, but the online version of this model has Internet access.
Context Window
32,768
Using Perplexity: Llama3 Sonar 8B with Python API
Using Perplexity: Llama3 Sonar 8B with OpenAI compatible API
import openai
client = openai.Client(
api_key= '{your_api_key}',
base_url="https://api.model.box/v1",
)
response = client.chat.completions.create(
model="perplexity/llama-3-sonar-small-32k-chat",
messages: [
{
role: 'user',
content:
'introduce your self',
},
]
)
print(response)