AI Agent Hub
Back to models
Llama-2-7b-hf logo

Llama-2-7b-hf

Open Source meta-llama Released 2023-07-18
-- 7.0B params 4.1K context Open Source

About this model

Llama-2-7b-hf is the 7-billion-parameter base pretrained model from Meta's Llama 2 family, released in July 2023 as part of the first major open-access LLM suite with commercial licensing. It is a decoder-only Transformer trained on 2 trillion tokens of publicly available online data, doubling the context length of Llama 1 to 4,096 tokens and delivering substantial gains across reasoning, knowledge, coding, and safety benchmarks compared to its predecessor.

On standard academic evaluations reported in the official model card and paper, Llama 2 7B achieves 45.3% on MMLU, 32.6% on BBH, 29.3% on AGIEval, 14.6% on GSM8K, and 12.8% pass@1 on HumanEval. It outperforms Llama 1 7B and contemporary open models such as MPT-7B and Falcon-7B on most grouped benchmarks, while remaining lightweight enough for single-GPU deployment.

The model is intended as a foundation for downstream fine-tuning and research rather than direct conversational use. Meta also released instruction-tuned Llama-2-7b-chat-hf variants optimized for dialogue. Weights are distributed via Hugging Face under the Llama 2 Community License, requiring acceptance of Meta's license terms before download.

Benchmark Scores

AGIEval
29.3

Technical Specs

  • Parameters: 7.0B
  • Architecture: Transformer
  • Context Window: 4,096 tokens
  • Input Modalities: text

Hardware Requirements

  • VRAM: 14.0 GB
  • Compute: Single GPU with at least 14GB VRAM for FP16 inference (16GB+ recommended with KV cache)