Commit Graph

19 Commits

Author SHA1 Message Date
Traun Leyden 5ad6db0c79 Fixes #96 by handling RepositoryNotFoundError (#97)
* Fixes #96 by handling RepositoryNotFoundError

* Update src/alignment/model_utils.py

Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>

* Remove redundant code

* Add unit test

* Reformat file

* make style

---------

Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
2024-02-01 15:47:14 +01:00
Nathan Azrak ad3d43aeea Make peft bnb_4bit_compute_dtype consistent with torch_dtype (#107)
Co-authored-by: Nathan Azrak <nazrak@atlassian.com>
2024-01-29 11:59:15 +01:00
Nathan Azrak de7d8883cd Add check before inserting system message (#106)
* add check before inserting system message

* change in-place for consistency

* fix unit test

---------

Co-authored-by: Nathan Azrak <nazrak@atlassian.com>
2024-01-29 11:56:24 +01:00
lewtun f0ffa0d7a6 Update Zephyr configs to account for UltraFeedback & TRL fixes (#88)
* Add files

* Add checkpointing

* Add checkpointing to SFT

* Add loss type

* Fix setup|

* Clean SFT

* Add lora config

* Rename config

* Remove max eval samples

* Add kwargs tp push to hub

* Add DPO configs

* Fix dpo configs

* Extend chat template test to multi-turn

* Add warmup

* Refactor

* Fix LoRA -> QLoRA

* Fix configs

* Specify chat template

* Add sample logging

* Fix push to hub hanging

* Add reentrant

* Fix quality

* Add transformer logging

* Tweak grad acc

* Add null type

* Add doc
2024-01-10 17:42:24 +11:00
Nathan Azrak c69ae4b8a5 Check that default_chat_template is also None (#83)
* Check that `default_chat_template` is also None before overwriting chat template

* add unit test to `get_tokenizer` to ensure default behaviour of chat template is not changed

---------

Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
2024-01-08 17:54:23 +11:00
Kirill 98fe28fb14 Clean deprecated max_samples arguments (#89) 2024-01-05 09:06:47 +11:00
Lewis Tunstall 8f6e5b666b Bump dev version v0.3.0.dev 2024-01-04 01:39:11 +00:00
Scott Fleming 61a11a5c7d Update docstring for data.py to reflect true behavior of shuffle parameter (#60)
* Update data.py

The docs state that the `shuffle` parameter in `mix_datasets` from `data.py` controls `Whether to shuffle the training data`, but then in the code if `shuffle` is set to `True` it also shuffles the test data. This small change makes the functionality consistent with the docstring. (If you instead want to keep the functionality the same, then we should update the docstring).

* Update data.py

Reverted to the original code structure but updated the docstring.

* Update docstring in `get_dataset` and `mix_datasets`

Updated docstrings to reflect the fact that `shuffle` being set to `True` leads to shuffling of both the training and testing/validation data.
2023-12-06 10:44:17 +01:00
Dragan Milchevski 15279e7157 Allow loading datasets from disk using load_from_disk method. (#53)
* feat: Allow loading datasets from disk using `load_from_disk` method.

* Fixing the type of error being catched.
2023-12-01 11:05:35 +01:00
Dragan Milchevski 80e952ec47 Allow running DPO from a local model (#49)
* Update model_utils.py

Check if a model is adapter model when a local path is supplied instead of HF model

* Cleaner solution, thanks to lewtun
2023-11-27 11:31:09 +01:00
Alvaro Bartolome c9d9035f95 Fix apply_chat_template function for dpo and unknown task (#30)
* Fix `apply_chat_template` function for `dpo` and unknown `task`

* Remove duplicated `# coding=utf-8`

* Manually run `black --line-length 119`
2023-11-21 11:47:21 +01:00
Lewis Tunstall f5e70fbf9e Add licenses 2023-11-10 14:47:54 +00:00
Lewis Tunstall e2e8ab945d Refactor imports 2023-11-10 13:38:45 +00:00
edbeeching 7f1a14e0d4 adds auto adapter merge to dpo script 2023-11-10 14:15:44 +01:00
Lewis Tunstall 2ed5a45d25 Add model utils tests 2023-11-10 09:42:15 +00:00
Lewis Tunstall 967eab4cfb Add skeleton 2023-11-08 13:21:57 +00:00
Lewis Tunstall a28b4cfc6e Bump dev version 2023-10-26 10:17:28 +00:00
Lewis Tunstall 1ca8add5fa Add release details 2023-10-26 10:10:57 +00:00
Lewis Tunstall 9e330bc37a Add init 2023-10-26 09:02:55 +00:00