Skip to content

online_training synced with main - #1221

Merged
uralik merged 127 commits into
online_trainingfrom
ot_merge
Jul 22, 2025
Merged

online_training synced with main#1221
uralik merged 127 commits into
online_trainingfrom
ot_merge

Conversation

@uralik

@uralik uralik commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

What does this PR do? Please describe:

Many changes that reflect main updates, major ones:

  • vllm is using huggingface models now for inference, trainer sync the model weights with vllm this way now
  • data batch and layouts format used in online recipe
  • model sync functions are now decoupled from optimization unit

this way we support qwen and other archs available in fairseq2 and huggignface for online training now

cbalioglu and others added 30 commits February 25, 2025 15:57
* add examples and minor updates

* update gsm8k dataset example notebook

* Update doc/source/notebooks/models/load_model.ipynb

Co-authored-by: Artem Kozhevnikov <kozhevnikov.artem@gmail.com>

* add example

* update model notebook

* nit

* format

* format

---------

Co-authored-by: Artem Kozhevnikov <kozhevnikov.artem@gmail.com>
* Compiles and passes pytest when disabled

* Working implementation missing save/restore

* All passing tests

* Simplify thread pool class

* Revert minor test change

* Python lint

* Fix C++ missing include

* C++ lint

* adding extra test

* Lint

* Add TBB task_arena as default thread pool implementation

* Remove useless non local

* isort

* Format C++

---------

Co-authored-by: Artem Kozhevnikov <kozhevnikov.artem@gmail.com>
Co-authored-by: Artyom Kozhevnikov <artyomko@fb.com>
* move configs

* move stopes utils

* move stopes utils

* fix ci

* add dependencies for arrow

* add configs

* update parquet utils

* add parquet transform fns

* add draft pipeline

* add pytest fixture for pq

* cleanup

* cleanup

* fix ci

* try fix ci

* try fix ci

* try fix ci

* fix pipeline ci

* revise pipeline

* cleanup dependencies

* remove parquet_fragments_to_pipeline_builder

* cleanup non-generic transform

* cleanup

* cleanup

* after rebase

* rebase continue

* fixing tests

* first config split

* more options

* first restructuring commit

* loading code

* tests on loading

* tests loading

* more tests params

* bucketing

* some tests for bucketing

* fixing imports

* some minor fixes

* ff

* ff

* typo

* trace flatten

* parsing manifest

* fixing primary direction

* black

* pq_mt_dataset debug

* caching mt directions per split

* typo

* small order change

* moving functions

* more moving

* moving between transform and utils

* fixing tests

* adding extra test

* rm joblib

* more readme

* comment

* fixing integration tests and adding some basic integration

* typos

* to_device -> to

* fix

* filters directly in fragment loading

* typo

* cannot filter directly if adding traces

* rm unused e

* better assert

* mypy

* generic length column

* nit

* add doc

* nit

* nit

* update readme

* typo

* typos

* doc update

* hf integration notebook example

* update readme

* add sphinx doc

* nit

* update doc

* update doc

* adding non_deterministic_read options

* flake8

---------

Co-authored-by: Artyom Kozhevnikov <artyomko@fb.com>
Co-authored-by: Paul-Ambroise Duquenne <duquenne.pa@gmail.com>
Co-authored-by: Artem Kozhevnikov <kozhevnikov.artem@gmail.com>
Co-authored-by: artyomko <artyomko@etinyclues.com>
@uralik
uralik requested a review from jacklanchantin July 1, 2025 18:08
@uralik
uralik requested a review from cbalioglu as a code owner July 1, 2025 18:08
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 1, 2025
@uralik
uralik changed the base branch from main to online_training July 1, 2025 18:09
@uralik
uralik requested review from artemru and zyaoj as code owners July 1, 2025 18:09
Ilia Kulikov and others added 14 commits July 2, 2025 19:43
Removed duplicate parameter in DPO configuration which otherwise leads to an error.

Trace for visibility:
```
> fairseq2 lm instruction_finetune $OUTPUT_DIR --config-file $CONFIG_FILE
(...)
 File "/Users/aerben/miniconda3/envs/fairseq2/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 281, in check_mapping_key
                                 raise DuplicateKeyError(*args)
                             ruamel.yaml.constructor.DuplicateKeyError: while constructing a mapping
                               in "temp.config", line 3, column 9
                             found duplicate key "max_seq_len" with value "4096" (original value: "4096")
                               in "temp.config", line 6, column 9
```
* add parquet based text dataloader with packing, plus minor refactors

* missing file

* using stric_state=False to avoid big buffer serialization

* mypy

* annotations

* flake 8

* pinned_memory

* comments

* rm recipes

* rm npc=1

* stricter split selection

* adding split pattern

* copy

---------

Co-authored-by: Artyom Kozhevnikov <artyomko@fb.com>
* Pairwise J1 prompt

* Adding Pairwise-J1 support

* Minor changes

* Simplifying

* Add logging back in

* Add generation prompt.

* removing debug statements

* More logging for scores out of range

* Adding reward name as a reward class attribute

* Cleaning up generative judges with extractor classes

* Typing

* logger label

---------

Co-authored-by: swarna <swarnadeep@meta.com>
Co-authored-by: Ilia Kulikov <kulikov@meta.com>
* add gener_verifier for hf backend

* working? with HF background

* fix bug

* comments

* working with vllm now

* add generative_judge

* merge

* remove GeneralVerifier

* move wrap_text to extractor

* rename wrap_text --> format_prompt

* string

* remove comment

* comment

* comments

* comment
* bug fix

* new parser

* fix

* fix parsing

* dont parse ref answer

* remove unused
Co-authored-by: Kevin Heffernan <kevinheffernan@meta.com>
* add optional regex customization

* look up the regex expression in base cards as well

* type annotation
* create the adafactor optimizer

* lint

* further lint

* Add missing docstring
…cipes (#1228)

* chat template overwriting, chat mode in SFT dataset

* qwen template added

* formatting

* dpo recipe with chat mode

* extra newline fix in the template

* introducing chat template interface

* lint

* lint

* lint

* removing v0.4 compatibility

---------

Co-authored-by: Ilia Kulikov <kulikov@meta.com>
@uralik
uralik merged commit af1e84e into online_training Jul 22, 2025
8 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.