[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-283425-105":53,"doc-detail-283425-en":127},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":120,"head_meta":122,"extra_data":124,"updated_unix":126},105,"en","llama-2-open-foundation-and-fine-tuned-chat-models-arxiv-230709288v2","Llama 2 - Open Foundation and Fine-Tuned Chat Models - arXiv 2307.09288v2","","Llama 2 presents a release of pretrained and fine-tuned large language models spanning 7B to 70B parameters. The fine-tuned models, Llama 2-Chat, are optimized for dialogue and evaluated against open-source chat systems across most tested benchmarks. Human evaluations for helpfulness and safety indicate the models may serve as substitutes for closed-source alternatives. The work documents the fine-tuning procedure and the safety improvements used to support responsible development by the community.",{"@graph":63,"@context":119},[64,80,102],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/llama-2-open-foundation-and-fine-tuned-chat-models-arxiv-230709288v2/283425/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/llama-2-open-foundation-and-fine-tuned-chat-models-arxiv-230709288v2/283425.png","ImageObject",442,249,{"name":88,"@type":89},"\tWilliam","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-11-04","2026-09-17",true,{"@type":98,"interactionType":99,"userInteractionCount":101},"InteractionCounter",{"@type":100},"ViewAction",22,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115],{"name":106,"@type":107,"acceptedAnswer":108},"What is Llama 2 and what model sizes are included?","Question",{"text":109,"@type":110},"Llama 2 is a collection of pretrained and fine-tuned large language models. It ranges from 7 billion to 70 billion parameters.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"What is the purpose of Llama 2-Chat?",{"text":114,"@type":110},"Llama 2-Chat is fine-tuned and optimized for dialogue use cases. It is designed for chat-oriented interaction.",{"name":116,"@type":107,"acceptedAnswer":117},"How does the paper improve safety in Llama 2-Chat?",{"text":118,"@type":110},"Safety is addressed through safety-focused fine-tuning and evaluation, including human feedback approaches and red teaming, followed by safety evaluation of Llama 2-Chat.","https://schema.org",{"og:url":78,"og:type":121,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":123,"canonical":78},"index,follow",{"doc_id":125,"site_id":56},283425,1791728206,{"code":4,"msg":5,"data":128},{"doc_id":125,"user_id":129,"nickname":88,"user_avatar":130,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":101,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":136,"language":137,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":138,"faqs":139,"seo_title":140,"seo_description":61,"update_tm":141,"read_time":142},5909887254083,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","arXiv :2307 .09288v2 [ cs .CL] 19 Jul 2023  \nLlama 2: Open Foundation and Fine-Tuned Chat Models  \nHugo Touvron∗ Louis Martin† Kevin Stone†  \nPeter Albert Amjad Almahairi Yasmine Babaei Nikolay Bashlykov Soumya Batra Prajjwal Bhargava Shruti Bhosale Dan Bikel Lukas Blecher Cristian Canton Ferrer Moya Chen Guillem Cucurull David Esiobu Jude Fernandes Jeremy Fu Wenyin Fu Brian Fuller Cynthia Gao Vedanuj Goswami Naman Goyal Anthony Hartshorn Saghar Hosseini Rui Hou Hakan Inan Marcin Kardas Viktor Kerkez Madian Khabsa Isabel Kloumann Artem Korenev Punit Singh Koura Marie-Anne Lachaux Thibaut Lavril Jenya Lee Diana Liskovich Yinghai Lu Yuning Mao Xavier Martinet Todor Mihaylov Pushkar Mishra Igor Molybog Yixin Nie Andrew Poulton Jeremy Reizenstein Rashi Rungta Kalyan Saladi  \nAlan Schelten Ruan Silva Eric Michael Smith Ranjan Subramanian Xiaoqing Ellen Tan Binh Tang Ross Taylor Adina Williams Jian Xiang Kuan Puxin Xu Zheng Yan Iliyan Zarov Yuchen Zhang Angela Fan Melanie Kambadur Sharan Narang Aurelien Rodriguez Robert Stojnic  \nSergey Edunov Thomas Scialom∗  \nGenAI, Meta  \nAbstract  \nIn this work, we develop and release Llama 2, a collection of pretrained and fine-tuned large language models (LLMs) ranging in scale from 7 billion to 70 billion parameters.  \nOur fine-tuned LLMs, called Llama 2-Chat, are optimized for dialogue use cases. Our models outperform open-source chat models on most benchmarks we tested, and based on our human evaluations for helpfulness and safety, may be a suitable substitute for closedsource models. We provide a detailed description of our approach to fine-tuning and safety improvements of Llama 2-Chat in order to enable the community to build on our work and contribute to the responsible development of LLMs.  \n∗ Equal contribution, corresponding authors: {tscialom, [htouvron}@meta.com](htouvron}@meta.com)[ ](htouvron}@meta.com)†Second author  \nContributions for all the authors can be found in Section A.1.  \nContents  \n1 Introduction 3  \n2 Pretraining 5  \n2.1 Pretraining Data ............................................. 5  \n2.2 Training Details ............................................. 5  \n2.3 Llama 2 Pretrained Model Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7  \n3 Fine-tuning 8  \n3.1 Supervised Fine-Tuning (SFT) ..................................... 9  \n3.2 Reinforcement Learning with Human Feedback (RLHF) ..................... 9  \n3.3 System Message for Multi-Turn Consistency ............................. 16  \n3.4 RLHF Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17  \n4 Safety 20  \n4.1 Safety in Pretraining .......................................... 20  \n4.2 Safety Fine-Tuning ........................................... 23  \n4.3 Red Teaming ............................................... 28  \n4.4 Safety Evaluation of Llama 2-Chat .................................. 29  \n5 Discussion 32  \n5.1 Learnings and Observations ...................................... 32  \n5.2 Limitations and Ethical Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34  \n5.3 Responsible Release Strategy ..................................... 35  \n6 Related Work 35  \n7 Conclusion 36  \nA Appendix 46  \nA. 1 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46  \nA.2 Additional Details for Pretraining ................................... 47  \nA.3 Additional Details for Fine-tuning .................................. 51  \nA.4 Additional Details for Safety ...................................... 58  \nA.5 Data Annotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72  \nA.6 Dataset Contamination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75  \nA.7 Model Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77  \nFigure 1: Helpfulness human evaluat","cbCaif8NyXn4dmP6","https://ap.wps.com/l/cbCaif8NyXn4dmP6","pdf",13661300,77,"English","# Introduction\n## Pretraining\n## Fine-tuning\n## Safety\n## Discussion\n## Related Work\n## Conclusion\n# Appendix","[{\"question\":\"What is Llama 2 and what model sizes are included?\",\"answer\":\"Llama 2 is a collection of pretrained and fine-tuned large language models. It ranges from 7 billion to 70 billion parameters.\"},{\"question\":\"What is the purpose of Llama 2-Chat?\",\"answer\":\"Llama 2-Chat is fine-tuned and optimized for dialogue use cases. It is designed for chat-oriented interaction.\"},{\"question\":\"How does the paper improve safety in Llama 2-Chat?\",\"answer\":\"Safety is addressed through safety-focused fine-tuning and evaluation, including human feedback approaches and red teaming, followed by safety evaluation of Llama 2-Chat.\"}]","Llama 2 - Open Foundation and Fine-Tuned Chat Models - arXiv 2307.09288v2 | PDF",1789605461,27]