SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.14394 · NeurIPS · 2024

Instruction Tuning With Loss Over Instructions

Laurence Aitchison, Adam Yang, Emine Yilmaz, Aldo Lipani, Zhengyan Shi, Bin Wu

arXiv · PDF · Open in the Atlas

Code that ran

16 of 20 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 13 failures of our instrument; 4 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2405.14394.json · badge: /api/ran/2405.14394.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ZhengxiangShi/InstructionModelling canonical (classifier label)
classifier basis: census
15 ran · 2 no recorded run
zhengxiangshi/instructionmodelling alias (classifier label)
classifier basis: classifier_2025
1 ran · 2 no recorded run
FunctionStatusWhere it lives
add_ref_model_logit_to_columns Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ZhengxiangShi/InstructionModelling/src/finetune_kl.py
pointer only (licence: NONE) · get_code("1447821f32348ac5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_kl_divergence_loss Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ZhengxiangShi/InstructionModelling/src/utils.py
pointer only (licence: NONE) · get_code("9104e80d99f2ab8a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_llm_eval_performance Ran
ran, honoured the contract we drafted
ZhengxiangShi/InstructionModelling/src/get_results_group.py
pointer only (licence: NONE) · get_code("969b779909d41a48")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_prompt_with_tulu_chat_format Ran
ran; our contract draft was wrong, not the code
ZhengxiangShi/InstructionModelling/src/generate.py
pointer only (licence: NONE); the stored copy get_code serves, from thu-keg/crab, is pointer only (licence: NONE) · get_code("697d92a5d51eff3e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

encode_few_shot_example Ran
ran; our contract draft was wrong, not the code
ZhengxiangShi/InstructionModelling/src/instruction_encode_templates.py
pointer only (licence: NONE) · get_code("96351a65183bb428")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

encode_instruction_example Ran
ran; our contract draft was wrong, not the code
ZhengxiangShi/InstructionModelling/src/instruction_encode_templates.py
pointer only (licence: NONE) · get_code("f839fd4c6f96a26f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

encode_with_messages_format Ran
ran; our contract draft was wrong, not the code
ZhengxiangShi/InstructionModelling/src/compute_loss.py
pointer only (licence: NONE) · get_code("1cb0eeb16cf04ee3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

encode_with_messages_format Ran
ran; our contract draft was wrong, not the code
ZhengxiangShi/InstructionModelling/src/finetune.py
pointer only (licence: NONE) · get_code("8a32cc283c5e5807")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

encode_with_messages_format Ran
ran; our contract draft was wrong, not the code
ZhengxiangShi/InstructionModelling/src/finetune_kl.py
pointer only (licence: NONE) · get_code("fc23892a28f95bc1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

encode_with_prompt_completion_format Ran
ran; our contract draft was wrong, not the code
zhengxiangshi/instructionmodelling/src/compute_loss.py
pointer only (licence: NONE) · get_code("c90f3a5ec6457c6d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhengxiangshi/instructionmodelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

encode_with_prompt_completion_format Ran
ran; our contract draft was wrong, not the code
ZhengxiangShi/InstructionModelling/src/finetune.py
pointer only (licence: NONE) · get_code("e7170ef85d1fec78")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_human_eval_results Ran
ran, honoured the contract we drafted
ZhengxiangShi/InstructionModelling/src/get_results_group.py
pointer only (licence: NONE) · get_code("cb1ba0cfe1a9de8a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_instruction Ran
ran; our contract draft was wrong, not the code
ZhengxiangShi/InstructionModelling/src/generate.py
pointer only (licence: NONE) · get_code("88c99652268092f3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

group_texts Ran
ran; our contract draft was wrong, not the code
ZhengxiangShi/InstructionModelling/src/compute_loss.py
pointer only (licence: NONE) · get_code("d09e0781a55d3694")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

neftune_post_forward_hook Ran
ran; our contract draft was wrong, not the code
ZhengxiangShi/InstructionModelling/src/utils.py
pointer only (licence: NONE) · get_code("8813cfd84beec509")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

should_be_filtered Ran
ran, violated the contract we drafted
ZhengxiangShi/InstructionModelling/src/reformat_datasets.py
pointer only (licence: NONE) · get_code("08f4816632095bc7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_kl_divergence_loss_target_token Not yet run
unverified (harvested, no recorded run)
ZhengxiangShi/InstructionModelling/src/utils.py
pointer only (licence: NONE) · get_code("c46f87d3e93c4108")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

compute_model_performance Not yet run
unverified (harvested, no recorded run)
ZhengxiangShi/InstructionModelling/src/get_results_group.py
pointer only (licence: NONE) · get_code("9cc81ad65b572087")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, ZhengxiangShi/InstructionModelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

main Not yet run
unverified (harvested, no recorded run)
zhengxiangshi/instructionmodelling/src/compute_loss.py
pointer only (licence: NONE) · get_code("e5ce78b681258794")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhengxiangshi/instructionmodelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

parse_args Not yet run
unverified (harvested, no recorded run)
zhengxiangshi/instructionmodelling/src/compute_loss.py
pointer only (licence: NONE) · get_code("1c89153db0460637")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, zhengxiangshi/instructionmodelling when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 20 distinct functions with an identity, 5 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 3 the same month, 5 later) and 15 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
create_prompt_with_tulu_chat_format 8 other papers
3 dated earlier, 1 the same month, 4 later
2401.10768 (2024-01)
Knowledge Verification to Nip Hallucination in the Bud
2401.16405 (2024-01)
Scaling Sparse Fine-Tuning to Large Language Models
2403.03870 (2024-03)
Learning to Decode Collaboratively with Multiple Language Models
and 5 more not named here
encode_with_messages_format
brick of this paper's assembly: data_transform
8 other papers
7 dated earlier, 1 later
2310.08491 (2023-10)
Prometheus: Inducing Fine-grained Evaluation Capability in Language Models
2310.11511 (2023-10)
Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
2311.05657 (2023-11)
Agent Lumos: Unified and Modular Training for Open-Source Language Agents
and 5 more not named here
encode_few_shot_example 3 other papers
1 dated earlier, 1 the same month, 1 later
2312.07540 (2023-12)
diff History for Neural Language Agents
2405.05008 (2024-05)
ADELIE: Aligning Large Language Models on Information Extraction
2410.16208 (2024-10)
Compute-Constrained Data Selection
encode_instruction_example 3 other papers
1 dated earlier, 1 the same month, 1 later
2312.07540 (2023-12)
diff History for Neural Language Agents
2405.05008 (2024-05)
ADELIE: Aligning Large Language Models on Information Extraction
2410.16208 (2024-10)
Compute-Constrained Data Selection
should_be_filtered 2 other papers
2 later
2407.15235 (2024-07)
TAGCOS: Task-agnostic Gradient Clustered Coreset Selection for Instruction Tuning Data
2410.16208 (2024-10)
Compute-Constrained Data Selection

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Instruction tuning plays a crucial role in shaping the outputs of language models (LMs) to desired styles. In this work, we propose a simple yet effective method, INSTRUCTION MODELLING (IM), which trains LMs by applying a loss function to the instruction and prompt part rather than solely to the output part. Through experiments across 21 diverse benchmarks, we show that, in many scenarios, IM can effectively improve the LM performance on both NLP tasks (e.g., MMLU, TruthfulQA, and HumanEval) and open-ended generation benchmarks (e.g., MT-Bench and AlpacaEval). Remarkably, in the most advantageous case, IM boosts model performance on AlpacaEval 1.0 by over 100%. We identify two key factors influencing the effectiveness of IM: (1) The ratio between instruction length and output length in the training data; and (2) The number of training examples. We observe that IM is especially beneficial when trained on datasets with lengthy instructions paired with brief outputs, or under the Superficial Alignment Hypothesis (SAH) where a small amount of training examples are used for instruction tuning. Further analysis substantiates our hypothesis that our improvement can be attributed to reduced overfitting to instruction tuning datasets. It is worth noting that we are not proposing IM as a replacement for current fine-tuning processes. Instead, our work aims to provide practical guidance for instruction tuning LMs, especially in low-resource scenarios. Our code is available at https://github.com/ZhengxiangShi/InstructionModelling.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2405.14394")
get_code_for_paper("2405.14394")
have("2405.14394")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2405.14394.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2405.14394.svg)](https://syntology.ai/paper/2405.14394)

Connect an agent — have() is free.