Models / Meta
LLM

LLaMA-2

LLM trained on 2T tokens with double Llama 1's context length, available in 7B, 13B, and 70B parameter sizes.

About model

Llama-2 generates human-like text based on input prompts, excelling at conversational dialogue and long-form content creation. Its 70 billion parameter architecture supports advanced language understanding and generation. Suitable for developers and businesses requiring high-quality text generation capabilities.

  • API usage

    • cURL
    • Python
    • Typescript

    Endpoint:

    meta-llama/Llama-2-70b-hf

    curl -X POST "https://api.together.xyz/v1/chat/completions" \
      -H "Authorization: Bearer $TOGETHER_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "meta-llama/Llama-2-70b-hf",
        "messages": [
          {
            "role": "user",
            "content": "What are some fun things to do in New York?"
          }
        ]
    }'
    
    from together import Together
    
    client = Together()
    
    response = client.chat.completions.create(
      model="meta-llama/Llama-2-70b-hf",
      messages=[
        {
          "role": "user",
          "content": "What are some fun things to do in New York?"
        }
      ]
    )
    print(response.choices[0].message.content)
    
    import Together from 'together-ai';
    const together = new Together();
    
    const completion = await together.chat.completions.create({
      model: 'meta-llama/Llama-2-70b-hf',
      messages: [
        {
          role: 'user',
          content: 'What are some fun things to do in New York?'
         }
      ],
    });
    
    console.log(completion.choices[0].message.content);
    
Related models
  • Model provider
    Meta
  • Type
    LLM
  • Main use cases
    Chat
    Medium General Purpose
  • Deployment
    Serverless
    On-Demand Dedicated
    Monthly Reserved
  • Parameters
    69B
  • Context length
    4K
  • Input price

    $0.90 / 1M tokens

  • Output price

    $0.90 / 1M tokens

  • Input modalities
    Text
  • Output modalities
    Text