Yejin Choi, Hannaneh Hajishirzi, Noah Smith, Yizhong Wang, Jiacheng Liu, Valentina Pyatkin, Zeqiu Wu, Hamish Ivison, Nathan Lambert
We lifted 19 functions out of this paper's own repositories and ran 15 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.
| Repository | Role | Ran |
|---|---|---|
| hamishivi/easylm | canonical | 10 of 13 |
| hamishivi/EasyLM | extension | 5 of 6 |
| Function | Status | Where it lives |
|---|---|---|
| apply_rotary_pos_emb | Ran | hamishivi/easylm/EasyLM/models/gptj/gptj_model.py code served (permissive licence) · get_code("0f14840c40641281") |
| blockwise_attn | Ran | hamishivi/easylm/EasyLM/bpt.py code served (permissive licence) · get_code("dbfe03f34fca42fc") |
| concatenated_forward | Ran | hamishivi/EasyLM/EasyLM/models/llama/llama_train_dpo.py code served (permissive licence) · get_code("119ac1062aa47fe1") |
| convert_logits_to_logps | Ran | hamishivi/EasyLM/EasyLM/models/llama/llama_train_dpo.py code served (permissive licence) · get_code("4c4036a5cbd39f10") |
| create_sinusoidal_positions | Ran | hamishivi/easylm/EasyLM/models/gptj/gptj_model.py code served (permissive licence) · get_code("ff574bc6676f34f1") |
| get_jax_mesh | Ran | hamishivi/easylm/EasyLM/jax_utils.py code served (permissive licence) · get_code("0cad657acf954c2f") |
| get_names_from_parition_spec | Ran | hamishivi/easylm/EasyLM/jax_utils.py code served (permissive licence) · get_code("dad72196bdb2301a") |
| masked_mean | Ran | hamishivi/EasyLM/EasyLM/models/llama/llama_train_ppo.py code served (permissive licence) · get_code("7125896060f86225") |
| masked_sum | Ran | hamishivi/EasyLM/EasyLM/models/llama/llama_train_ppo.py code served (permissive licence) · get_code("7cbbe7f38c74cab8") |
| masked_var | Ran | hamishivi/EasyLM/EasyLM/models/llama/llama_train_ppo.py code served (permissive licence) · get_code("c39dac404ff3f2b3") |
| match_keywords | Ran | hamishivi/easylm/EasyLM/models/llama/convert_easylm_to_hf.py code served (permissive licence) · get_code("cc2ba1b1b0c83f6c") |
| optax_add_scheduled_weight_decay | Ran | hamishivi/easylm/EasyLM/optimizers.py code served (permissive licence) · get_code("1db35ae97b8e784f") |
| pad_out_to_full_batch | Ran | hamishivi/easylm/EasyLM/data.py code served (permissive licence) · get_code("cdf684770f174015") |
| read_json | Ran | hamishivi/easylm/EasyLM/models/llama/convert_easylm_to_hf.py code served (permissive licence) · get_code("c5bcf01d18bba63d") |
| rotate_every_two | Ran | hamishivi/easylm/EasyLM/models/gptj/gptj_model.py code served (permissive licence) · get_code("768565e8f56c5fb0") |
| blockwise_ffn | Not yet run | hamishivi/easylm/EasyLM/bpt.py code served (permissive licence) · get_code("4833ab3506125762") |
| dpo_loss | Not yet run | hamishivi/EasyLM/EasyLM/models/llama/llama_train_dpo.py code served (permissive licence) · get_code("a6d706f6e0699b5c") |
| inverse_permute | Not yet run | hamishivi/easylm/EasyLM/models/llama/convert_hf_to_easylm.py code served (permissive licence) · get_code("667a8648b1f3ad2c") |
| make_shard_and_gather_fns | Not yet run | hamishivi/easylm/EasyLM/jax_utils.py code served (permissive licence) · get_code("e23d17afdb6ab8b8") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Learning from preference feedback has emerged as an essential step for improving the generation quality and performance of modern language models (LMs). Despite its widespread use, the way preference-based learning is applied varies wildly, with differing data, learning algorithms, and evaluations used, making disentangling the impact of each aspect difficult. In this work, we identify four core aspects of preference-based learning: preference data, learning algorithm, reward model, and policy training prompts, systematically investigate the impact of these components on downstream model performance, and suggest a recipe for strong learning for preference feedback. Our findings indicate that all aspects are important for performance, with better preference data leading to the largest improvements, followed by the choice of learning algorithm, the use of improved reward models, and finally the use of additional unlabeled prompts for policy training. Notably, PPO outperforms DPO by up to 2.5% in math and 1.2% in general domains. High-quality preference data leads to improvements of up to 8% in instruction following and truthfulness. Despite significant gains of up to 5% in mathematical evaluation when scaling up reward models, we surprisingly observe marginal improvements in other categories. We publicly release the code used for training 1 and evaluating 2 our models, along with the models and datasets themselves 3 . 1 https://github.com/hamishivi/EasyLM 2 https://github.com/allenai/open-instruct 3 https://huggingface.co/collections/allenai/tulu-v25-suite-66676520fd578080e126f618 4 Sometimes this stage is called reinforcement learning from human feedback (RLHF). However, the human and reinforcement learning aspects are not always present, while the learning from preferences aspect is always present. We will use the terms 'learning from preferences' and 'preference-based learning' interchangeably. 38th Conference on Neural Information Processing Systems (NeurIPS 2024).
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2406.09279")
get_code_for_paper("2406.09279")
have("2406.09279")
Connect an agent — have() is free.