Skip to main content
Version: 0.0.0

Chat: meta-llama/Llama-2-70b-chat-hf


See the Hugging Face model page for more model details.

About this model

Model name to use in API calls:


Meta developed and publicly released the Llama 2 family of large language models (LLMs), a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. The fine-tuned LLMs, called Llama-2-Chat, are for dialog use cases. Llama-2-Chat models outperform open source chat models on most benchmarks tested, and in the human evaluations for helpfulness and safety, are on par with some popular closed-source models like ChatGPT and PaLM.

Model Developers: Meta

Variations: Llama 2 comes in a range of parameter sizes --- 7B, 13B, and 70B --- as well as pretrained and fine-tuned variations.

Input Models: input text only.

Output Models: generate text only.

Model Architecture: 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.

Context Length: 4096

Model Dates: Llama 2 completed training between January 2023 and July 2023.

Status: this is a static model trained on an offline dataset.

License: a custom commercial license is available at:

Intended Use Cases: Llama 2 is for commercial and research use in English purposes. Tuned models are for assistant-like chat, whereas pretrained models are adaptable for a variety of natural language generation tasks.

To get the expected features and performance for the chat versions, a specific formatting must apply, including the INST and &<<SYS>> tags, BOS and EOS tokens, and the whitespaces and break lines in between. Call strip() on inputs to avoid double-spaces. See the reference code in GitHub for details: chat_completion.

Out-of-scope Uses: use in any manner that violates applicable laws or regulations, including trade compliance laws. Use in languages other than English. Use in any other way that's prohibited by the Acceptable Use Policy and Licensing Agreement for Llama 2.