This website uses cookies to anonymously analyze website traffic using Google Analytics.

Llama 3 8B Instruct Reference API

Auto-regressive LLM with optimized transformers, SFT, and RLHF for alignment with helpfulness and safety preferences.

Try our Llama 3 API

Llama 3 8B Instruct Reference API Usage

Endpoint

RUN INFERENCE

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-3-8b-chat-hf",
    "messages": [],
    "stream": true
  }'

RUN INFERENCE

from together import Together

client = Together()

response = client.chat.completions.create(
    model="meta-llama/Llama-3-8b-chat-hf",
    messages=[],
    stream=True
)
for token in response:
    if hasattr(token, 'choices'):
        print(token.choices[0].delta.content, end='', flush=True)

RUN INFERENCE

import Together from "together-ai";

const together = new Together();

const response = await together.chat.completions.create({
  messages: [],
  model: "meta-llama/Llama-3-8b-chat-hf",
  stream: true
});

for await (const token of response) {
  console.log(token.choices[0]?.delta?.content)
}

How to use Llama 3 8B Instruct Reference

Model details

Prompting Llama 3 8B Instruct Reference

Applications & Use Cases

Looking for production scale? Deploy on a dedicated endpoint

Deploy Llama 3 8B Instruct Reference on a dedicated endpoint with custom hardware configuration, as many instances as you need, and auto-scaling.

Get started