meta
/
llama-2-70b-chat
A 70 billion parameter language model from Meta, fine tuned for chat completions
Run replicate-internal/llama-2-70b-chat-int8-4xa100-80gb-triton with an API
Use one of our client libraries to get started quickly.
Set the REPLICATE_API_TOKEN
environment variable
export REPLICATE_API_TOKEN=<paste-your-token-here>
Learn more about authentication
Install Replicate’s Node.js client library
npm install replicate
Run meta/llama-2-70b-chat using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
import Replicate from "replicate";
const replicate = new Replicate();
const input = {
top_p: 1,
prompt: "Can you write a poem about open source machine learning? Let's make it in the style of E. E. Cummings.",
temperature: 0.5,
max_new_tokens: 500,
min_new_tokens: -1
};
for await (const event of replicate.stream("meta/llama-2-70b-chat", { input })) {
process.stdout.write(`${event}`)
};
//=> "Sure, here's a poem about open source machine learning i...