Papers › Llama 2: Open Foundation and Fine-Tuned Chat Models

Llama 2: Open Foundation and Fine-Tuned Chat Models

18 Jul 2023arXiv:2307.09288archive 2025-07-28

Hugo Touvron, Louis Martin, Kevin Stone, Peter 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, Alan 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, Sergey Edunov, Thomas Scialom

In 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. Our 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 closed-source 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.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

No sample from the archive's official repository (facebookresearch/llama) is linked to this paper; the 52 samples below come from 8 community repositories. Syntology harvested code from facebookresearch/llama for another paper.

facebookresearch/llama: Syntology's graph links these samples to On the Influence of Gender and Race in Romantic Relationship Prediction from Large... (arXiv:2410.03996; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 1 violated, 0 with no contract checked; 3 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method.

Syntology 52 code samples harvested from 8 repositories linked to this paper: 33 ran (of which 7 constructed an object rather than computing a result; 20 with no instrument failure: 1 honoured, 1 violated, 18 with no contract checked; 13 where Syntology's instrument failed) · 19 unverified. Where Syntology's instrument failed: 9 where our contract draft was wrong; 4 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 52 samples from 8 repositories, 33 ran (20 with no instrument failure; 13 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 4 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 7 of the 33 samples that ran have no recorded date.

19 repositories listed; official and paper-mentioned ones first.

facebookresearch/llama officialmentioned in paperpytorchNOASSERTIONSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to On the Influence of Gender and Race in Romantic Relationship Prediction from Large... (arXiv:2410.03996; that paper's own run record: 4 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 1 violated, 0 with no contract checked; 3 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
IBM/Dromedary mentioned on GitHubpytorchGPL-3.0Syntology: 16 samples, 16 ran (8 instrument-failed) · 0 unverified report
Lightning-AI/lit-gpt mentioned on GitHubpytorchSyntology: 5 samples, 4 ran (1 instrument-failed) · 1 unverified report
coastalcph/eu-politics-llms mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Llama meets EU: Investigating the European Political Spectrum through the Lens of LLMs (arXiv:2403.13592; that paper's own run record: 5 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 1 honoured, 0 violated, 1 with no contract checked; 3 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
eternityyw/tram-benchmark mentioned on GitHubMITSyntology: not harvested report
flagalpha/llama2-chinese mentioned on GitHubpytorchSyntology: not harvested report
glb400/Toy-RecLM mentioned on GitHubpytorchSyntology: 5 samples, 1 ran (0 instrument-failed) · 4 unverified report
idiap/abroad-re mentioned on GitHubpytorchGPL-3.0Syntology: not harvested report
llamafamily/llama-chinese mentioned on GitHubpytorchSyntology: not harvested report
meetyou-ai-lab/can-mc-evaluate-llms mentioned on GitHubpytorchSyntology: 7 samples, 4 ran (0 instrument-failed) · 3 unverified report
ninglab/ecellm mentioned on GitHubpytorchCC-BY-4.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to eCeLLM: Generalizing Large Language Models for E-commerce from Large-scale,... (arXiv:2402.08831; that paper's own run record: 3 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 1 where Syntology's instrument failed) · 2 unverified); nothing checks that they implement this paper's method. report
rijgersberg/geitje mentioned on GitHubpytorchApache-2.0Syntology: not harvested report
squeezeailab/squeezellm mentioned on GitHubpytorchMITSyntology: 15 samples, 7 ran (4 instrument-failed) · 8 unverified report
usyd-fsalab/fp6_llm mentioned on GitHubpytorchApache-2.0Syntology: not harvested report
xuetianci/pacit mentioned on GitHubpytorchSyntology: not harvested report
xverse-ai/xverse-13b mentioned on GitHubpytorchSyntology: 1 sample, 0 ran · 1 unverified report
xzhang97666/alpacare mentioned on GitHubApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to AlpaCare:Instruction-tuned Large Language Models for Medical Application (arXiv:2310.14558; that paper's own run record: 7 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
young-geng/easylm mentioned on GitHubjaxSyntology: 2 samples, 0 ran · 2 unverified report
zurichnlp/contradecode mentioned on GitHubpytorchSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

52 samples harvested: 33 ran (of which 7 constructed an object rather than computing a result; 20 with no instrument failure: 1 honoured, 1 violated, 18 with no contract checked; 13 where Syntology's instrument failed) · 19 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
1ran · violated contract
9ran · our draft was wrong
4ran; the contract check could not run
18ran
19unverified

Licence: 20 of the 52 samples are pointer only, meaning Syntology does not serve that copy's text. For 4 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 8 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 3 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

IBM/Dromedary community (archive-listed) 16 samples, 16 ran (8 instrument-failed) · 0 unverified
repeat_kv in 244 papers
census: 15 implementations from 60 papers, 2 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 4, kind float, dtype float32
training/llama_with_flash_attn.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant fingerprinted GPL-3.0 (copyleft) · pointer only · 30d7eec482ebf6b1 · report fixture: signature hidden_states:Tensor/4/float, n_rep:int/0/int · returned Tensor · level recorded, date not recorded
apply_rotary_emb in 121 papers llama_dromedary/llama_dromedary/model.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant GPL-3.0 (copyleft) · pointer only · b47d48e431b34acd · report fixture: signature xq:Tensor/4/float, xk:Tensor/4/float, freqs_cis:Tensor/2/complex · returned tuple · level recorded 2026-09-22
apply_rotary_pos_emb in 393 papers
census: 14 implementations from 15 papers, 8 distinct outputs across 7 buckets, one shared input per bucket
training/llama_with_flash_attn.py ran GPL-3.0 (copyleft) · pointer only · e34097675d132bc1 · report fixture: signature q:Tensor/3/float, k:Tensor/3/float, cos:Tensor/4/float, sin:Tensor/4/float, position_ids:Tensor/2/int · returned tuple · level recorded 2026-09-24
extract_alpaca_dataset in 10 papers training/data_utils_sft.py ran · our draft was wrong GPL-3.0 (copyleft) · pointer only · b5445674ab17410f · report fixture: signature example:dict/0/? · returned dict · level recorded, date not recorded
extract_dromedary_dataset training/data_utils_sft.py ran GPL-3.0 (copyleft) · pointer only · 48456f10725088b5 · report fixture: signature example:dict/0/?, meta_prompts:list/1/str · returned dict · level recorded 2026-09-24
extract_unnatural_instructions_data in 8 papers training/data_utils_sft.py ran · our draft was wrong GPL-3.0 (copyleft) · pointer only · f82430123a91cf21 · report fixture: signature examples:dict/0/?, extract_reformulations:bool/0/bool · returned dict · level recorded, date not recorded
generate_prompt in 110 papers inference/run_stream_chatbot_demo.py ran · our draft was wrong fingerprinted GPL-3.0 (copyleft) · pointer only · 55e55d5b9201bf5c · report fixture: signature instruction:str/0/str, input:str/0/str, meta_prompt:str/0/str · returned str · level recorded, date not recorded
generate_prompt in 110 papers mc_evaluation/evaluate_hhh_eval.py ran GPL-3.0 (copyleft) · pointer only · c478c1e77422f0de · report fixture: signature meta_prompt:str/0/str, instruction:str/0/str, input:str/0/str · returned str · level recorded 2026-09-24
get_log_prob mc_evaluation/evaluate_hhh_eval.py ran GPL-3.0 (copyleft) · pointer only · 0c0f540ee97855aa · report fixture: signature generator:callable/0/?, example:dict/0/?, targets:list/1/str, meta_prompt:str/0/str, generate_prompt_fn:callable/0/?, temperature:float/0/float, max_seq_len:int/0/int · returned list · level recorded 2026-09-24
get_log_prob mc_evaluation/evaluate_truthfulqa_mc.py ran GPL-3.0 (copyleft) · pointer only · 47407f4c74f590df · report fixture: signature generator:callable/0/?, example:dict/0/?, targets:list/1/str, meta_prompt:str/0/str, generate_prompt_fn:callable/0/?, temperature:float/0/float, max_seq_len:int/0/int · returned list · level recorded 2026-09-24
measure_multiple_choice_grade mc_evaluation/evaluate_hhh_eval.py ran GPL-3.0 (copyleft) · pointer only · b14dfe7367095841 · report fixture: signature samples:list/1/dict · returned float · level recorded 2026-09-24
measure_multiple_choice_grade mc_evaluation/evaluate_truthfulqa_mc.py ran GPL-3.0 (copyleft) · pointer only · dfcc630d6e498f6f · report fixture: signature samples:list/1/dict · returned float · level recorded 2026-09-24
precompute_freqs_cis in 112 papers llama_dromedary/llama_dromedary/model.py ran · violated contract GPL-3.0 (copyleft) · pointer only · 14a84c2cbfebc413 · report fixture: signature dim:int/0/int, end:int/0/int, theta:float/0/float · returned Tensor · level recorded 2026-09-22
reshape_for_broadcast in 90 papers
census: 6 implementations from 10 papers, 1 distinct output on one shared input
llama_dromedary/llama_dromedary/model.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant fingerprinted GPL-3.0 (copyleft) · pointer only · 70bf6ebaafd266c4 · report fixture: signature freqs_cis:Tensor/2/float, x:Tensor/4/float · returned Tensor · level recorded, date not recorded
rotate_half in 424 papers
census: 24 implementations from 96 papers, 4 distinct outputs across 2 buckets, one shared input per bucket this sample: bucket 1 of 2, arg 1: rank 2, kind float, dtype float32
training/llama_with_flash_attn.py ran · our draft was wrong fingerprinted GPL-3.0 (copyleft) · pointer only · b99eea6376d1e212 · report fixture: signature x:Tensor/2/float · returned Tensor · level recorded, date not recorded
sample_top_p in 35 papers llama_dromedary/llama_dromedary/generation.py ran · our draft was wrong fingerprinted GPL-3.0 (copyleft) · pointer only · 8845976729f4c4ee · report fixture: signature probs:Tensor/2/float, p:float/0/float · returned Tensor · level recorded 2026-09-22
Lightning-AI/lit-gpt community (archive-listed) 5 samples, 4 ran (1 instrument-failed) · 1 unverified
Config in 46 papers litgpt/model.py ran Apache-2.0 (permissive) · bf78fefededc09f7 · report fixture: returned Config · level recorded 2026-09-22
RMSNorm in 61 papers litgpt/model.py ran fingerprinted Apache-2.0 (permissive) · 1e7100681c300ca2 · report fixture: returned RMSNorm · level recorded 2026-09-22
check_indicator_and_length litgpt/model.py ran; the contract check could not run (RAISES) fingerprinted Apache-2.0 (permissive) · faa77017b4beec30 · report fixture: signature params:list/1/int, name:str/0/str, required_length:int/0/int, use_initial_part:bool/0/bool, def_val:int/0/int · returned list · level recorded 2026-09-22
find_multiple in 31 papers litgpt/model.py ran · honoured contract fingerprinted Apache-2.0 (permissive) · ffe8d3a5e6f4b477 · report fixture: signature n:int/0/int, k:int/0/int · returned int · level recorded 2026-09-22
LLaMAMLP litgpt/model.py unverified Apache-2.0 (permissive) · b336e5e4f4b40ceb · report
glb400/Toy-RecLM community (archive-listed) 5 samples, 1 ran (0 instrument-failed) · 4 unverified
FeedForward in 198 papers model.py ran · metamorphic tier: invariant MIT (permissive) · 9715deb8f27d4266 · report fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-22
LLaMA2_SASRec model.py unverified MIT (permissive) · 4427e517543e4577 · report
ModelArgs in 13 papers model.py unverified MIT (permissive) · 75e3a8170f256bb7 · report
TransformerBlock in 73 papers model.py unverified MIT (permissive) · 61aae005c3076a9b · report
meetyou-ai-lab/can-mc-evaluate-llms community (archive-listed) 7 samples, 4 ran (0 instrument-failed) · 3 unverified
LlamaConfig in 6 papers Embeddings/src/llama/modeling_llama.py ran Apache-2.0 (permissive) · 1bcd8d227ad19b17 · report fixture: returned LlamaConfig · level recorded 2026-09-22
LlamaMLP in 13 papers Embeddings/src/llama/modeling_llama.py ran Apache-2.0 (permissive) · 50260ad39d7c5e06 · report fixture: returned LlamaMLP · level recorded 2026-09-22
LlamaRMSNorm in 9 papers Embeddings/src/llama/modeling_llama.py ran Apache-2.0 (permissive) · 98b6bb174c074dae · report fixture: returned LlamaRMSNorm · level recorded 2026-09-22
LlamaRotaryEmbedding in 13 papers Embeddings/src/llama/modeling_llama.py ran Apache-2.0 (permissive) · 26ec53f064adbca5 · report fixture: returned LlamaRotaryEmbedding · level recorded 2026-09-22
LlamaAttention in 15 papers Embeddings/src/llama/modeling_llama.py unverified Apache-2.0 (permissive) · 1104581ac75ea9c6 · report
LlamaDecoderLayer in 11 papers Embeddings/src/llama/modeling_llama.py unverified Apache-2.0 (permissive) · 660d5e5234e28212 · report
LlamaModel in 9 papers Embeddings/src/llama/modeling_llama.py unverified Apache-2.0 (permissive) · 865ca1b3e9c1aa5c · report
squeezeailab/squeezellm community (archive-listed) 15 samples, 7 ran (4 instrument-failed) · 8 unverified
round_to_nearest_pole_sim squeezellm/quant.py ran · our draft was wrong MIT (permissive) · cdc0ad3109c8984b · report fixture: signature w:Tensor/1/float, poles:tuple/1/float · returned Tensor · level recorded, date not recorded
find_layers in 68 papers squeezellm/modelutils.py ran · our draft was wrong MIT (permissive) here; the stored copy is pointer only · a9e7f2cdf016b88b · report fixture: signature module:callable/0/?, layers:list/1/callable, name:str/0/str · returned dict · level recorded 2026-09-22
get_module_names in 6 papers squeezellm/model_parse.py ran · our draft was wrong MIT (permissive) here; the stored copy is pointer only · b65e0b634a94c717 · report fixture: signature model_type:str/0/str · returned list · level recorded 2026-09-25
parse_model in 6 papers squeezellm/model_parse.py ran · our draft was wrong MIT (permissive) here; the stored copy is pointer only · dd982ece7960b018 · report fixture: signature model:callable/0/? · returned str · level recorded 2026-09-25
remove_outliers in 6 papers squeezellm/outliers.py ran MIT (permissive) · 303e2b878d149f4a · report fixture: signature model:dict/0/?, sensitivity:int/0/int, outlier_config:dict/0/?, gradients:dict/0/? · returned list · level recorded 2026-09-24
remove_outliers_by_sensitivity squeezellm/outliers.py ran MIT (permissive) · e3a24217edf7812c · report fixture: signature model:dict/0/?, gradients:dict/0/?, sensitivity:float/0/float · returned list · level recorded 2026-09-24
remove_outliers_by_threshold squeezellm/outliers.py ran MIT (permissive) · 3d2bc2ac00f3f434 · report fixture: signature model:dict/0/?, outlier_config:dict/0/?, outlier_weights:list/1/list · returned list · level recorded 2026-09-24
get_c4 in 41 papers squeezellm/datautils.py unverified MIT (permissive) · 92dc709e4e73e133 · report
get_model in 368 papers llama.py unverified MIT (permissive) · fd802dc39c73084a · report
get_ptb in 43 papers squeezellm/datautils.py unverified MIT (permissive) · b1e98f962f5ae82d · report
get_wikitext2 in 78 papers squeezellm/datautils.py unverified MIT (permissive) · efc347eff314b865 · report
kmeans_fit quantization/nuq.py unverified MIT (permissive) · 77fbadc3b9632874 · report
load_model in 479 papers squeezellm/model_parse.py unverified MIT (permissive) here; the stored copy is pointer only · b66c43d90a1a3a1b · report
load_quant in 8 papers llama.py unverified MIT (permissive) · c0d4637f25eabf00 · report
tiktoken_tokenizer models/xgen-7b-8k-base/tokenization_xgen.py unverified MIT (permissive) · 5445de6acd6035bb · report
xverse-ai/xverse-13b community (archive-listed) 1 sample, 0 ran · 1 unverified
init_model in 38 papers chat_demo.py unverified Apache-2.0 (permissive) · b796bb9465578920 · report
young-geng/easylm community (archive-listed) 2 samples, 0 ran · 2 unverified
FlaxLLaMAModel EasyLM/models/llama/llama_model.py unverified Apache-2.0 (permissive) · cf00f2eef08595e6 · report
FlaxLLaMAPreTrainedModel EasyLM/models/llama/llama_model.py unverified Apache-2.0 (permissive) · 72032d6f73d90892 · report
zurichnlp/contradecode community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
PromptTemplate in 5 papers translation_models/llama.py ran MIT (permissive) · 4d273bfb0feb28e0 · report fixture: returned PromptTemplate · level recorded 2026-09-22

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.

6 assemblies on this paper: 6 harvested, 0 generated, listed in 2 groups (siblings lifted in one batch form one group).

2 sibling assemblies for Llama 2-Chat (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for Llama 2-Chat (graph method: Llama 2-Chat). 1 brick; individually on a fixture: 1 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; the one sample that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.

one of 2 siblings

  1. PromptTemplate entry · level 1 · ran · 4d273bfb0feb28e0

harvested Assembly for Llama 2-Chat (graph method: Llama 2-Chat). 1 brick; individually on a fixture: 0 ran · 1 unverified. The assembly has not been run end-to-end.

one of 2 siblings

  1. init_model entry · level 0 · unverified · b796bb9465578920

4 sibling assemblies for Llama 2 (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for Llama 2 (graph method: Llama 2). 11 bricks; individually on a fixture: 8 ran (of which 4 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 4 where Syntology's instrument failed) · 3 unverified. The assembly has not been run end-to-end.

one of 4 siblings

  1. LlamaModel entry · level 0 · unverified · 865ca1b3e9c1aa5c
  2. LlamaConfig helper · level 1 · ran · 1bcd8d227ad19b17
  3. LlamaDecoderLayer model · level 0 · unverified · 660d5e5234e28212
  4. LlamaRMSNorm helper · level 1 · ran · 98b6bb174c074dae
  5. _expand_mask helper · level 1 · ran · our draft was wrong · 24b08fbedd93aff0
  6. _make_causal_mask helper · level 1 · ran; the contract check could not run · c5c590da5a7c2a3f
  7. LlamaAttention model · level 0 · unverified · 1104581ac75ea9c6
  8. LlamaMLP model · level 1 · ran · 50260ad39d7c5e06
  9. LlamaRotaryEmbedding helper · level 1 · ran · 26ec53f064adbca5
  10. apply_rotary_pos_emb helper · level 1 · ran; the contract check could not run · 9a65a30d006fc96e
  11. rotate_half helper · level 1 · ran · our draft was wrong · e03d53ba9d4f9ae5

harvested Assembly for Llama 2 (graph method: Llama 2). 5 bricks; individually on a fixture: 4 ran (of which 2 constructed an object rather than computing a result; 3 with no instrument failure: 1 honoured, 0 violated, 2 with no contract checked; 1 where Syntology's instrument failed) · 1 unverified. The assembly has not been run end-to-end.

one of 4 siblings

  1. LLaMAMLP entry · level 0 · unverified · b336e5e4f4b40ceb
  2. Config helper · level 1 · ran · bf78fefededc09f7
  3. RMSNorm model · level 1 · ran · 1e7100681c300ca2
  4. check_indicator_and_length helper · level 1 · ran; the contract check could not run (RAISES) · faa77017b4beec30
  5. find_multiple helper · level 1 · ran · honoured contract · ffe8d3a5e6f4b477

harvested Assembly for Llama 2 (graph method: Llama 2). 17 bricks; individually on a fixture: 9 ran (of which 4 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 5 where Syntology's instrument failed) · 8 unverified. The assembly has not been run end-to-end.

one of 4 siblings

  1. FlaxLLaMAModel entry · level 0 · unverified · cf00f2eef08595e6
  2. FlaxLLaMAModule model · level 0 · unverified · 9238f425f871bc11
  3. FlaxLLaMAPreTrainedModel helper · level 0 · unverified · 72032d6f73d90892
  4. FlaxLLaMABlockCollection model · level 1 · ran · 2b160cc445933c46
  5. RMSNorm model · level 1 · ran · aaa8a447973c0f68
  6. FlaxLLaMABlock model · level 0 · unverified · 7e8dcebe492702bb
  7. get_gradient_checkpoint_policy helper · level 1 · ran · our draft was wrong · a9b09c32ed58621c
  8. FlaxLLaMAAttention model · level 0 · unverified · 733d82a9306baa8b
  9. FlaxLLaMAMLP model · level 1 · ran · a4fb09d490cd772f
  10. blockwise_ffn helper · level 0 · unverified · 4833ab3506125762
  11. with_sharding_constraint helper · level 1 · ran · our draft was wrong · 6c8893718b619284
  12. apply_rotary_emb model · level 0 · unverified · f280056a639ae634
  13. blockwise_attn helper · level 1 · ran · our draft was wrong · 4932ae36f745aea2
  14. get_names_from_parition_spec helper · level 1 · ran · our draft was wrong · dad72196bdb2301a
  15. names_in_current_mesh helper · level 0 · unverified · a8530c4a22be1de7
  16. Carry helper · level 1 · ran · a066e3b4457453fd
  17. _chunk_attention_bias helper · level 1 · ran · our draft was wrong · d81e74d07a61f182

harvested Assembly for Llama 2 (graph method: Llama 2). 10 bricks; individually on a fixture: 6 ran (of which 1 constructed an object rather than computing a result; 3 with no instrument failure: 1 honoured, 0 violated, 2 with no contract checked; 3 where Syntology's instrument failed) · 4 unverified. The assembly has not been run end-to-end.

one of 4 siblings

  1. LLaMA2_SASRec entry · level 0 · unverified · 4427e517543e4577
  2. ModelArgs helper · level 0 · unverified · 75e3a8170f256bb7
  3. RMSNorm model · level 1 · ran · e27b34a3f741d4de
  4. TransformerBlock model · level 0 · unverified · 61aae005c3076a9b
  5. precompute_freqs_cis helper · level 1 · ran · honoured contract · 5f447bdd807ed3c0
  6. Attention model · level 0 · unverified · 4334c46d3961b3fb
  7. FeedForward model · level 1 · ran · 9715deb8f27d4266
  8. apply_rotary_emb helper · level 1 · ran · our draft was wrong · af440c67b16afe67
  9. repeat_kv helper · level 2 · ran; the contract check could not run · 6d2a08dcf3466514
  10. reshape_for_broadcast helper · level 1 · ran; the contract check could not run · e04ad9d4b02f50b6

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2307.09288") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Arithmetic ReasoningCode GenerationMath Word Problem SolvingMulti-task Language UnderstandingMultiple Choice Question Answering (MCQA)Question AnsweringSentence Completion

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Arithmetic Reasoning GSM8K LLaMA 2 70B (on-shot) Accuracy 56.8 #123 of 164 Archive leaderboard report
Arithmetic Reasoning GSM8K LLaMA 2 70B (on-shot) Parameters (Billion) 70 #123 of 164 Archive leaderboard report
Code Generation MBPP Llama 2 70B (zero-shot) Accuracy 45 #76 of 99 Archive leaderboard report
Code Generation MBPP Llama 2 34B (0-shot) Accuracy 33 #89 of 99 Archive leaderboard report
Code Generation MBPP Llama 2 13B (0-shot) Accuracy 30.6 #90 of 99 Archive leaderboard report
Code Generation MBPP Llama 2 7B (0-shot) Accuracy 20.8 #97 of 99 Archive leaderboard report
Math Word Problem Solving MAWPS LLaMA 2-Chat Accuracy (%) 82.4 #16 of 25 Archive leaderboard report
Math Word Problem Solving SVAMP LLaMA 2-Chat Execution Accuracy 69.2 #12 of 26 Archive leaderboard report
Multi-task Language Understanding MML LLaMA 2 34B (5-shot) Average (%) 62.6 #16 of 44 Archive leaderboard report
Multi-task Language Understanding MML LLaMA 2 13B (5-shot) Average (%) 54.8 #23 of 44 Archive leaderboard report
Multi-task Language Understanding MML LLaMA 2 7B (5-shot) Average (%) 45.3 #28 of 44 Archive leaderboard report
Multiple Choice Question Answering (MCQA) MMLU (Professional medicine) Llama2-7B Accuracy 43.38 #5 of 6 Archive leaderboard report
Multiple Choice Question Answering (MCQA) MMLU (Professional medicine) Llama2-7B-chat Accuracy 40.07 #6 of 6 Archive leaderboard report
Question Answering BoolQ LLaMA 2 70B (0-shot) Accuracy 85 #18 of 65 Archive leaderboard report
Question Answering BoolQ LLaMA 2 34B (0-shot) Accuracy 83.7 #22 of 65 Archive leaderboard report
Question Answering BoolQ LLaMA 2 13B (0-shot) Accuracy 81.7 #25 of 65 Archive leaderboard report
Question Answering BoolQ LLaMA 2 7B (zero-shot) Accuracy 77.4 #30 of 65 Archive leaderboard report
Question Answering MultiTQ LLaMA2 Hits@1 18.5 #7 of 11 Archive leaderboard report
Question Answering Natural Questions LLaMA 2 70B (one-shot) EM 33.0 #31 of 47 Archive leaderboard report
Question Answering PIQA LLaMA 2 70B (0-shot) Accuracy 82.8 #18 of 67 Archive leaderboard report
Question Answering PIQA LLaMA 2 34B (0-shot) Accuracy 81.9 #24 of 67 Archive leaderboard report
Question Answering PIQA LLaMA 2 13B (0-shot) Accuracy 80.5 #32 of 67 Archive leaderboard report
Question Answering PIQA LLaMA 2 7B (0-shot) Accuracy 78.8 #38 of 67 Archive leaderboard report
Question Answering PubChemQA Llama2-7B-chat BLEU-2 0.075 #2 of 2 Archive leaderboard report
Question Answering PubChemQA Llama2-7B-chat BLEU-4 0.009 #2 of 2 Archive leaderboard report
Question Answering PubChemQA Llama2-7B-chat MEATOR 0.149 #2 of 2 Archive leaderboard report
Question Answering PubChemQA Llama2-7B-chat ROUGE-1 0.184 #2 of 2 Archive leaderboard report
Question Answering PubChemQA Llama2-7B-chat ROUGE-2 0.043 #2 of 2 Archive leaderboard report
Question Answering PubChemQA Llama2-7B-chat ROUGE-L 0.142 #2 of 2 Archive leaderboard report
Question Answering TriviaQA LLaMA 2 70B (one-shot) EM 85 #7 of 56 Archive leaderboard report
Question Answering UniProtQA Llama2-7B-chat BLEU-2 0.019 #2 of 2 Archive leaderboard report
Question Answering UniProtQA Llama2-7B-chat BLEU-4 0.002 #2 of 2 Archive leaderboard report
Question Answering UniProtQA Llama2-7B-chat MEATOR 0.052 #2 of 2 Archive leaderboard report
Question Answering UniProtQA Llama2-7B-chat ROUGE-1 0.103 #2 of 2 Archive leaderboard report
Question Answering UniProtQA Llama2-7B-chat ROUGE-2 0.060 #2 of 2 Archive leaderboard report
Question Answering UniProtQA Llama2-7B-chat ROUGE-L 0.009 #2 of 2 Archive leaderboard report
Sentence Completion HellaSwag LLaMA 2 70B (0-shot) Accuracy 85.3 #26 of 89 Archive leaderboard report
Sentence Completion HellaSwag LLaMA 2 34B (0-shot) Accuracy 83.3 #33 of 89 Archive leaderboard report
Sentence Completion HellaSwag LLaMA 2 13B (0-shot) Accuracy 80.7 #43 of 89 Archive leaderboard report
Sentence Completion HellaSwag LLaMA 2 7B (0-shot) Accuracy 77.2 #49 of 89 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamWAttentionBPEDense ConnectionsDropoutEntropy RegularizationFeedforward NetworkGrouped-query attentionLabel SmoothingPPORMSNormResidual ConnectionRotary EmbeddingsSoftmaxSwiGLUTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections