meta
/
llama-2-7b
Base version of Llama 2 7B, a 7 billion parameter language model
- Public
- 650.8K runs
-
Priced per token
Run replicate-internal/llama-2-7b-int8-1xa100-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-7b 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_k: 250,
prompt: "A llama walks into a bar",
temperature: 0.95,
max_new_tokens: 500,
min_new_tokens: -1
};
for await (const event of replicate.stream("meta/llama-2-7b", { input })) {
process.stdout.write(`${event}`)
};
//=> ", he orders a martini. everyone in the place stops and s...