Llama 2 Chat 7B

Llama 2-Chat is a collection of fine-tuned large language models (LLMs) ranging from 7B to 70B parameters. This is the 7B fine-tuned model, optimized for dialogue use cases and converted for the Hugging Face Transformers format.

Model Details

Llama 2-Chat 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.

Intended Use

Intended for commercial and research use in English. Tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks.

How to Use

from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("llama-2-7b-chat")
model = AutoModelForCausalLM.from_pretrained("llama-2-7b-chat")

inputs = tokenizer("Hello, how are you?", return_tensors="pt")
outputs = model.generate(**inputs, max_length=100)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)

Training Data

The model was trained on a custom mix of publicly available online data. The fine-tuning data includes publicly available instruction datasets, as well as over one million new human-annotated examples.

Evaluation

The model has been evaluated on a comprehensive set of benchmarks including helpfulness and safety. It demonstrates strong performance across various tasks while maintaining safety guidelines.

Limitations

Like other language models, Llama 2-Chat can sometimes generate inaccurate, biased, or objectionable responses. It should be used with appropriate safeguards and human oversight.

v1.0.2 2 days ago
Updated model weights with improved conversation handling and safety filters.
Current
v1.0.1 1 week ago
Bug fixes for tokenizer configuration and improved model stability.
v1.0.0 2 weeks ago
Initial release of Llama 2 Chat 7B model with full fine-tuning.