mirror of
https://github.com/wassname/alignment-handbook.git
synced 2026-06-27 14:58:48 +08:00
CITATION.cff and fix F401 warning (#183)
* fix F401 warning * add CITATION.cff * update version in CITATION * update title * fix label * Update src/alignment/__init__.py Co-authored-by: Alvaro Bartolome <36760800+alvarobartt@users.noreply.github.com> * make style * add Alvaro Bartolome * update version in readme --------- Co-authored-by: Alvaro Bartolome <36760800+alvarobartt@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
cff-version: 1.2.0
|
||||
title: The Alignment Handbook
|
||||
message: >-
|
||||
Robust recipes to align language models with human and AI
|
||||
preferences.
|
||||
type: software
|
||||
authors:
|
||||
- given-names: Lewis
|
||||
family-names: Tunstall
|
||||
- given-names: Edward
|
||||
family-names: Beeching
|
||||
- given-names: Nathan
|
||||
family-names: Lambert
|
||||
- given-names: Nazneen
|
||||
family-names: Rajani
|
||||
- given-names: Shengyi
|
||||
family-names: Huang
|
||||
- given-names: Kashif
|
||||
family-names: Rasul
|
||||
- given-names: Alvaro
|
||||
family-names: Bartolome
|
||||
- given-names: Alexander
|
||||
name-particle: M.
|
||||
family-names: Rush
|
||||
- given-names: Thomas
|
||||
family-names: Wolf
|
||||
repository-code: 'https://github.com/huggingface/alignment-handbook'
|
||||
license: Apache-2.0
|
||||
version: 0.3.0.dev0
|
||||
@@ -115,15 +115,14 @@ You can now check out the `scripts` and `recipes` directories for instructions o
|
||||
|
||||
## Citation
|
||||
|
||||
If you find the content of this repo useful in your work, please cite it as follows:
|
||||
If you find the content of this repo useful in your work, please cite it as follows via '\usepackage{biblatex}`:
|
||||
|
||||
```bibtex
|
||||
@misc{alignment_handbook2023,
|
||||
author = {Lewis Tunstall and Edward Beeching and Nathan Lambert and Nazneen Rajani and Shengyi Huang and Kashif Rasul and Alexander M. Rush and Thomas Wolf},
|
||||
title = {The Alignment Handbook},
|
||||
year = {2023},
|
||||
publisher = {GitHub},
|
||||
journal = {GitHub repository},
|
||||
howpublished = {\url{https://github.com/huggingface/alignment-handbook}}
|
||||
@software{Tunstall_The_Alignment_Handbook,
|
||||
author = {Tunstall, Lewis and Beeching, Edward and Lambert, Nathan and Rajani, Nazneen and Huang, Shengyi and Rasul, Kashif and Bartolome, Alvaro and M. Rush, Alexander and Wolf, Thomas},
|
||||
license = {Apache-2.0},
|
||||
title = {{The Alignment Handbook}},
|
||||
url = {https://github.com/huggingface/alignment-handbook},
|
||||
version = {0.3.0.dev0}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -11,3 +11,21 @@ from .model_utils import (
|
||||
get_tokenizer,
|
||||
is_adapter_model,
|
||||
)
|
||||
|
||||
|
||||
__all__ = [
|
||||
"DataArguments",
|
||||
"DPOConfig",
|
||||
"H4ArgumentParser",
|
||||
"ModelArguments",
|
||||
"SFTConfig",
|
||||
"apply_chat_template",
|
||||
"get_datasets",
|
||||
"decontaminate_humaneval",
|
||||
"get_checkpoint",
|
||||
"get_kbit_device_map",
|
||||
"get_peft_config",
|
||||
"get_quantization_config",
|
||||
"get_tokenizer",
|
||||
"is_adapter_model",
|
||||
]
|
||||
|
||||
@@ -20,14 +20,29 @@ import packaging.version
|
||||
|
||||
|
||||
REPLACE_PATTERNS = {
|
||||
"init": (re.compile(r'^__version__\s+=\s+"([^"]+)"\s*$', re.MULTILINE), '__version__ = "VERSION"\n'),
|
||||
"setup": (re.compile(r'^(\s*)version\s*=\s*"[^"]+",', re.MULTILINE), r'\1version="VERSION",'),
|
||||
"init": (
|
||||
re.compile(r'^__version__\s+=\s+"([^"]+)"\s*$', re.MULTILINE),
|
||||
'__version__ = "VERSION"\n',
|
||||
),
|
||||
"setup": (
|
||||
re.compile(r'^(\s*)version\s*=\s*"[^"]+",', re.MULTILINE),
|
||||
r'\1version="VERSION",',
|
||||
),
|
||||
"citation": (re.compile(r"^version:\s+[^ ]+", re.MULTILINE), "version: VERSION"),
|
||||
"readme": (
|
||||
re.compile(r"version\s+=\s+\{[^}]+\}", re.MULTILINE),
|
||||
"version = {VERSION}",
|
||||
),
|
||||
}
|
||||
|
||||
README_FILE = "README.md"
|
||||
|
||||
REPLACE_FILES = {
|
||||
"init": "src/alignment/__init__.py",
|
||||
"setup": "setup.py",
|
||||
"citation": "CITATION.cff",
|
||||
"readme": README_FILE,
|
||||
}
|
||||
README_FILE = "README.md"
|
||||
|
||||
|
||||
def update_version_in_file(fname, version, pattern):
|
||||
@@ -95,7 +110,11 @@ def post_release_work():
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--post_release", action="store_true", help="Whether this is pre or post release.")
|
||||
parser.add_argument(
|
||||
"--post_release",
|
||||
action="store_true",
|
||||
help="Whether this is pre or post release.",
|
||||
)
|
||||
parser.add_argument("--patch", action="store_true", help="Whether or not this is a patch release.")
|
||||
args = parser.parse_args()
|
||||
if not args.post_release:
|
||||
|
||||
Reference in New Issue
Block a user