-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[DistillationTrainer refactor] Emit prompt_ids / prompt_mask / completion_ids #6487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+30
−0
Merged
Changes from all commits
Commits
Show all changes
215 commits
Select commit
Hold shift + click to select a range
6983b6f
Pin the distillation objective before refactoring
qgallouedec d443d3b
Pin on-policy and off-policy training end to end
qgallouedec a8bb14c
Document the num_items_in_batch denominator bug
qgallouedec 98eef79
Move IW-OPD to a dedicated experimental trainer
qgallouedec b65f8a7
Extract the teacher-server path into ServerDistillationTrainer
qgallouedec f75cd7e
Remove the local sparse top-1 loss path from the base trainer
qgallouedec 6458636
Remove top-k support from the base generalized JSD loss
qgallouedec 166808b
Validate the teacher by vocab size instead of tokenizer identity
qgallouedec 952b0c3
Deprecate `lmbda` on/off-policy mixing
qgallouedec 55e5973
Point the GKD paper reproduction at GKDTrainer
qgallouedec 0b72a4e
Remove `lmbda` and the off-policy training branch
qgallouedec 2527d3d
style
qgallouedec 1c5bdea
Merge branch '04-move-iw-opd' into 05-extract-server-distillation
qgallouedec f232c18
Merge branch '05-extract-server-distillation' into 06-remove-local-sp…
qgallouedec 7aab597
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec 6efeb9f
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec 0a4a3d6
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec 5eabac4
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec aa0b5fb
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec e058764
style
qgallouedec 4c65faf
Merge branch '05-extract-server-distillation' into 06-remove-local-sp…
qgallouedec 3500348
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec de167a9
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec 1908e5f
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec 5a4f715
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec f270c1f
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec 456df91
Fix IW-OPD paper metadata used in the model card
qgallouedec 9ecf348
Merge branch '04-move-iw-opd' into 05-extract-server-distillation
qgallouedec 28382eb
Merge branch '05-extract-server-distillation' into 06-remove-local-sp…
qgallouedec c4acfb4
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec d95c977
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec f64f96c
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec 614bb6b
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec 5cd0e91
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec 26038dd
Remove stale on/off-policy comments after the off-policy removal
qgallouedec 3515b22
Accept a `prompt` column alongside `messages`
qgallouedec 4e5d06f
Accept a `prompt` column alongside `messages`
qgallouedec dfbf0e5
style
qgallouedec 89494f2
Relax self-distillation train-loss assertion to tolerate fp noise
qgallouedec 9b5ad81
Fix server-config construction to only copy dataclass init fields
qgallouedec d616372
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec 1341b51
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec 33667d3
Merge branch 'main' into 01-pin-distillation-objective
qgallouedec 041e337
Merge branch '01-pin-distillation-objective' into 02-pin-on-and-off-p…
qgallouedec 9e989d1
Merge branch '02-pin-on-and-off-policy-training' into 03-document-num…
qgallouedec b2c2b73
Merge branch '03-document-num-items-in-batch-bug' into 04-move-iw-opd
qgallouedec 97cb164
Merge branch '04-move-iw-opd' into 05-extract-server-distillation
qgallouedec 7db5120
Merge branch '05-extract-server-distillation' into 06-remove-local-sp…
qgallouedec 2d2d32f
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec e63069d
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec e4764cc
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec 800b68b
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec b290c1a
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec cad0c5e
Merge branch '11-remove-lmbda-offpolicy' into 12-accept-prompt-column
qgallouedec c978997
0.5 -> 0.25
qgallouedec acc70cc
Merge branch 'main' into 01-pin-distillation-objective
qgallouedec 854d89d
Merge branch '01-pin-distillation-objective' into 02-pin-on-and-off-p…
qgallouedec b9f99f1
Diverge the teacher in the on/off-policy param-update pin
qgallouedec 911b0e5
Merge branch 'main' into 01-pin-distillation-objective
qgallouedec 6e8a528
Merge branch '01-pin-distillation-objective' into 02-pin-on-and-off-p…
qgallouedec fd67ed4
Merge branch '02-pin-on-and-off-policy-training' into 03-document-num…
qgallouedec a4831c6
Merge branch '03-document-num-items-in-batch-bug' into 04-move-iw-opd
qgallouedec 222615d
Merge branch '04-move-iw-opd' into 05-extract-server-distillation
qgallouedec 15a7f6f
Merge branch '05-extract-server-distillation' into 06-remove-local-sp…
qgallouedec 34e801a
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec 0a79977
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec cff3b68
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec 1f8690a
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec 4871948
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec 8057ca4
Merge branch '11-remove-lmbda-offpolicy' into 12-accept-prompt-column
qgallouedec a0d5328
Merge branch 'main' into 02-pin-on-and-off-policy-training
qgallouedec f750ddd
Merge branch '02-pin-on-and-off-policy-training' into 03-document-num…
qgallouedec d0d7de3
Merge branch '03-document-num-items-in-batch-bug' into 04-move-iw-opd
qgallouedec e8ac1df
Merge branch '04-move-iw-opd' into 05-extract-server-distillation
qgallouedec 0b4fa84
Merge branch '05-extract-server-distillation' into 06-remove-local-sp…
qgallouedec b4f7d75
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec f7d9dc8
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec 5914158
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec b8f85a4
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec 1492b20
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec d8892e4
Merge branch '11-remove-lmbda-offpolicy' into 12-accept-prompt-column
qgallouedec 26eba3c
remove unused import
qgallouedec f51acd6
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec 0462f03
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec ce31b5d
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec 989ae4d
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec 15e24cc
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec 3cbd70f
Merge branch '11-remove-lmbda-offpolicy' into 12-accept-prompt-column
qgallouedec 24b235c
Merge remote-tracking branch 'origin/main' into pr/qgallouedec/6452
qgallouedec 5e05b9d
Rework the num_items_in_batch xfail: applied denominator, on-policy
qgallouedec 23784c3
Use a non-strict xfail for the num_items_in_batch pin
qgallouedec 7615bfe
Merge branch '03-document-num-items-in-batch-bug' into 04-move-iw-opd
qgallouedec 82a2017
Merge branch '04-move-iw-opd' into 05-extract-server-distillation
qgallouedec 3eaabc7
Merge branch '05-extract-server-distillation' into 06-remove-local-sp…
qgallouedec 4d9ac2b
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec e881f07
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec 7632074
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec 4b3c62a
Merge branch 'main' into 04-move-iw-opd
qgallouedec 685d3f5
Merge branch '04-move-iw-opd' into 05-extract-server-distillation
qgallouedec 7bf9d07
Merge branch '05-extract-server-distillation' into 06-remove-local-sp…
qgallouedec 40f96ed
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec 40ee117
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec 821d875
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec 9ad8c2a
Merge remote-tracking branch 'origin/main' into pr/qgallouedec/6454
qgallouedec fc5b481
Merge branch '05-extract-server-distillation' into 06-remove-local-sp…
qgallouedec 6f8c4a7
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec 59a804d
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec f23fc4f
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec d3be590
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec ba3aa35
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec 6a2be12
Deprecate `messages`-format datasets
qgallouedec a41d5df
Merge remote-tracking branch 'origin/main' into pr/qgallouedec/6455
qgallouedec f069c1e
Merge branch '06-remove-local-sparse-top1' into 07-remove-topk-from-jsd
qgallouedec 58c13be
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec 01b6f67
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec 3faa04b
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec 1375800
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec 43c42f4
Merge remote-tracking branch 'origin/11-remove-lmbda-offpolicy' into …
qgallouedec 1a58484
Merge remote-tracking branch 'origin/main' into 07-remove-topk-from-jsd
qgallouedec 45fdb23
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec 0bca659
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec 939143d
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec 0a08547
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec 901b155
Merge branch '11-remove-lmbda-offpolicy' into 12-accept-prompt-column
qgallouedec a056303
Merge branch '12-accept-prompt-column' into 13-deprecate-messages-dat…
qgallouedec 93f6f55
Drop the loss_top_k usage-tips bullet from the docs
qgallouedec dc4c01b
Merge branch '07-remove-topk-from-jsd' into 08-teacher-vocab-validation
qgallouedec 356eaab
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec bca4b35
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec 825de01
Merge branch 'main' into 08-teacher-vocab-validation
qgallouedec 6d09aa1
Merge branch '08-teacher-vocab-validation' into 09-deprecate-lmbda
qgallouedec 5b99699
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec e185842
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec 4365c60
Merge branch '11-remove-lmbda-offpolicy' into 12-accept-prompt-column
qgallouedec a5fa96c
Merge branch '12-accept-prompt-column' into 13-deprecate-messages-dat…
qgallouedec 94a185d
Merge branch 'main' into 09-deprecate-lmbda
qgallouedec e9365a6
Merge branch '09-deprecate-lmbda' into 10-move-gkd-paper-repro
qgallouedec a320f99
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec 16ec8c3
Merge branch '11-remove-lmbda-offpolicy' into 12-accept-prompt-column
qgallouedec e6b1d37
Merge branch '12-accept-prompt-column' into 13-deprecate-messages-dat…
qgallouedec 8567f94
Merge branch 'main' into 10-move-gkd-paper-repro
qgallouedec 9ef74d9
Merge branch '10-move-gkd-paper-repro' into 11-remove-lmbda-offpolicy
qgallouedec 109333e
Merge branch '11-remove-lmbda-offpolicy' into 12-accept-prompt-column
qgallouedec 0d76047
Merge branch '12-accept-prompt-column' into 13-deprecate-messages-dat…
qgallouedec 782f088
Merge branch 'main' into 11-remove-lmbda-offpolicy
qgallouedec 88795b0
Merge branch '11-remove-lmbda-offpolicy' into 12-accept-prompt-column
qgallouedec 749efd6
Merge branch '12-accept-prompt-column' into 13-deprecate-messages-dat…
qgallouedec ddcb836
Drop leftover lmbda=1.0 from the num_items xfail test
qgallouedec d36d174
Merge branch '11-remove-lmbda-offpolicy' into 12-accept-prompt-column
qgallouedec c077758
Merge branch '12-accept-prompt-column' into 13-deprecate-messages-dat…
qgallouedec 71883b9
Merge remote-tracking branch 'origin/main' into 12-accept-prompt-column
qgallouedec ff9a39a
Merge branch '12-accept-prompt-column' into 13-deprecate-messages-dat…
qgallouedec 46d1c26
Fix num_items_in_batch to count generated completion tokens
qgallouedec 010f250
Revert "Fix num_items_in_batch to count generated completion tokens"
qgallouedec 6c60211
Fix num_items_in_batch to count generated completion tokens
qgallouedec fbf4c3b
style
qgallouedec fa5e277
Normalize the num_items loss correctly for DDP and grad-accumulation
qgallouedec 8351cb0
Normalize the num_items loss correctly for DDP and grad-accumulation
qgallouedec 289c40c
Switch tests, docs, and example to prompt-only datasets
qgallouedec b02741c
remove pr desc
qgallouedec 4a9273f
Qualify expected dataset as conversational prompt-only
qgallouedec 2b5b737
Remove messages-format support and prompt-length config
qgallouedec 4f91a90
Pin signature columns to GRPO's [prompt, image, images]
qgallouedec 3c42827
Emit completion_mask alongside labels in the generated batch
qgallouedec 6497bc5
Switch the loss to consume completion_mask instead of labels
qgallouedec b38280e
Emit prompt_ids/prompt_mask/completion_ids in the batch
qgallouedec 790e9eb
Merge remote-tracking branch 'origin/main' into 13-deprecate-messages…
db068b1
Merge branch '13-deprecate-messages-datasets' into 14-fix-num-items
qgallouedec 5f60751
Merge branch '14-fix-num-items' into 15-switch-tests-docs-prompt-only
qgallouedec 14bb155
Merge branch '15-switch-tests-docs-prompt-only' into 16-remove-messag…
qgallouedec df5112e
Merge branch '16-remove-messages-support' into 17-pin-signature-columns
qgallouedec 58514ce
Merge branch '17-pin-signature-columns' into 18-emit-completion-mask
qgallouedec 1962b77
Merge branch '18-emit-completion-mask' into 19-loss-consumes-completi…
qgallouedec 54ecc8b
Merge branch '19-loss-consumes-completion-mask' into 20-emit-prompt-c…
qgallouedec 5d9178a
Merge branch 'main' into 14-fix-num-items
qgallouedec 194481e
Merge branch '14-fix-num-items' into 15-switch-tests-docs-prompt-only
qgallouedec 5aac5aa
Merge branch '15-switch-tests-docs-prompt-only' into 16-remove-messag…
qgallouedec c0c999a
Merge branch '16-remove-messages-support' into 17-pin-signature-columns
qgallouedec a35c66d
Merge branch '17-pin-signature-columns' into 18-emit-completion-mask
qgallouedec 16ecfbd
Merge branch '18-emit-completion-mask' into 19-loss-consumes-completi…
qgallouedec 3de49f6
Merge branch '19-loss-consumes-completion-mask' into 20-emit-prompt-c…
qgallouedec 9378f79
Merge branch 'main' into 15-switch-tests-docs-prompt-only
qgallouedec 76115bf
Merge branch '15-switch-tests-docs-prompt-only' into 16-remove-messag…
qgallouedec e044b15
Merge branch '16-remove-messages-support' into 17-pin-signature-columns
qgallouedec a0e4aad
Merge branch '17-pin-signature-columns' into 18-emit-completion-mask
qgallouedec f030767
Merge branch '18-emit-completion-mask' into 19-loss-consumes-completi…
qgallouedec 77712c0
Merge branch '19-loss-consumes-completion-mask' into 20-emit-prompt-c…
qgallouedec f1d4896
Remove stale teacher-server section from the distillation doc
qgallouedec 7cd12e0
Merge branch '15-switch-tests-docs-prompt-only' into 16-remove-messag…
qgallouedec 431f1da
Merge branch '16-remove-messages-support' into 17-pin-signature-columns
qgallouedec a9d882d
Merge branch '17-pin-signature-columns' into 18-emit-completion-mask
qgallouedec 7fa5fcd
Merge branch '18-emit-completion-mask' into 19-loss-consumes-completi…
qgallouedec 66d058d
Merge branch '19-loss-consumes-completion-mask' into 20-emit-prompt-c…
qgallouedec fe497cd
Merge branch 'main' into 15-switch-tests-docs-prompt-only
qgallouedec 9f68612
Merge branch '15-switch-tests-docs-prompt-only' into 16-remove-messag…
qgallouedec 34f6eb1
Merge branch '16-remove-messages-support' into 17-pin-signature-columns
qgallouedec 3bf52d7
Merge branch '17-pin-signature-columns' into 18-emit-completion-mask
qgallouedec d59a130
Merge branch '18-emit-completion-mask' into 19-loss-consumes-completi…
qgallouedec 8de3282
Merge branch '19-loss-consumes-completion-mask' into 20-emit-prompt-c…
qgallouedec f07dd4e
Merge remote-tracking branch 'origin/main' into 16-remove-messages-su…
qgallouedec 532ba1e
Merge branch '16-remove-messages-support' into 17-pin-signature-columns
qgallouedec 7837ea4
Merge branch '17-pin-signature-columns' into 18-emit-completion-mask
qgallouedec 292a17a
Merge branch '18-emit-completion-mask' into 19-loss-consumes-completi…
qgallouedec 095502a
Merge branch '19-loss-consumes-completion-mask' into 20-emit-prompt-c…
qgallouedec ac1f71f
Drop stale local-teacher loss comment
qgallouedec ea143ae
Merge branch 'main' into 17-pin-signature-columns
qgallouedec a934541
Merge branch '17-pin-signature-columns' into 18-emit-completion-mask
qgallouedec 40ec499
Merge branch '18-emit-completion-mask' into 19-loss-consumes-completi…
qgallouedec 752c9b3
Merge branch '19-loss-consumes-completion-mask' into 20-emit-prompt-c…
qgallouedec a33b289
Merge branch 'main' into 18-emit-completion-mask
qgallouedec f263644
Merge branch '18-emit-completion-mask' into 19-loss-consumes-completi…
qgallouedec be286b1
Merge branch '19-loss-consumes-completion-mask' into 20-emit-prompt-c…
qgallouedec 80d20fb
Merge branch 'main' into 19-loss-consumes-completion-mask
qgallouedec 79cc62c
Merge branch '19-loss-consumes-completion-mask' into 20-emit-prompt-c…
qgallouedec 69bbafc
Merge branch 'main' into 20-emit-prompt-completion-ids
qgallouedec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.