Meta
Meta

Llama v2 70B Chat

meta-llama/llama-2-70b-chat

The flagship, 70 billion parameter language model from Meta, fine tuned for chat completions. Llama 2 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align to human preferences for helpfulness and safety.

Community

Open Source

Context Window

4,096

0

Using Llama v2 70B Chat with Python API

Using Llama v2 70B Chat 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="meta-llama/llama-2-70b-chat",
messages: [
  {
    role: 'user',
    content:
      'introduce your self',
    },
  ]
)
print(response)