Skip to content

Commit

Permalink
Pytorch 2 - OpenNMT-py v3.3 (#2418)
Browse files Browse the repository at this point in the history
* Pytorch 2 - OpenNMT-py v3.3
  • Loading branch information
vince62s committed Jun 21, 2023
1 parent 648c003 commit bd1f52f
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ jobs:
-ban_unk_token \
-length_penalty none \
-out /tmp/gen
diff data/data_lm/gen-nucleus-sampling-sol.txt /tmp/gen && rm /tmp/gen
diff data/data_lm/gen-nucleus-sampling-sol$(python -c "import torch; print(torch.__version__[0])").txt /tmp/gen && rm /tmp/gen
- name: Test LM generation with random sampling multi-beams
run: |
python translate.py -model onmt/tests/test_model_lm.pt \
Expand All @@ -389,7 +389,7 @@ jobs:
-ban_unk_token \
-min_length 5 \
-out /tmp/gen
diff data/data_lm/gen-sampling-beams-sol.txt /tmp/gen && rm /tmp/gen
diff data/data_lm/gen-sampling-beams-sol$(python -c "import torch; print(torch.__version__[0])").txt /tmp/gen && rm /tmp/gen
- name: Test extract_vocabulary tool
run: |
python tools/extract_vocabulary.py \
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@
**Notes on versioning**

## [Unreleased]
## [3.2.0](https://github.com/OpenNMT/OpenNMT-py/tree/3.2.0) (2023-06-XX)

## [3.3.0](https://github.com/OpenNMT/OpenNMT-py/tree/3.2.0) (2023-06-21)

* Switch to pytorch 2.0.1
* Eval LLM with MMLU benchmark
* Fix Falcon 40B conversion / finetuning / inference
* Plugin encoder/decoder thanks @kleag / @n2oblife
* Safetensors for model storage (beta)
* finetuning config templates for supported LLMs


## [3.2.0](https://github.com/OpenNMT/OpenNMT-py/tree/3.2.0) (2023-06-07)
* Skip init during model build (way faster building)
* Enable quantization of LoRA layers
* Enable 4bit quantization from bitsandbytes (NF4 / FP4)
Expand Down
File renamed without changes.
7 changes: 7 additions & 0 deletions data/data_lm/gen-nucleus-sampling-sol2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
like your equipment !
in your Presidency or registering erratic full detailed table since Waddington , as well handled separately .
the importance 's future .
there is survivors , under new public beforehand ?
bankers sit on the honour and the old , accusations by Cubase for political leadership in the fifth generation of 0.5 , 1 January in serving the old , 1 .
can do planet what Mr Titley , should like What is really do so done guarantee - ™ your Gore .
we can restore confidence in Switzerland .
File renamed without changes.
7 changes: 7 additions & 0 deletions data/data_lm/gen-sampling-beams-sol2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
you ! your staff !
in German Presidency or rather than Andalusia .
a moment , one century .
" s operational from 06: 00 on weekdays , clothes hang thick from the and 00 until about 00 until the sea .
fine words has underlined the fine vegetarian ...
service are buying any of my property .
we are much running behind the facts .
2 changes: 1 addition & 1 deletion onmt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
onmt.modules,
]

__version__ = "3.2.0"
__version__ = "3.3.0"
4 changes: 2 additions & 2 deletions onmt/tests/pull_request_chk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ ${PYTHON} translate.py -model ${TEST_DIR}/test_model_lm.pt \
-ban_unk_token \
-length_penalty none \
-out $TMP_OUT_DIR/gen_sampling >> ${LOG_FILE} 2>&1
diff ${DATA_DIR}/data_lm/gen-nucleus-sampling-sol.txt $TMP_OUT_DIR/gen_sampling
diff ${DATA_DIR}/data_lm/gen-nucleus-sampling-sol$(python -c "import torch; print(torch.__version__[0])").txt $TMP_OUT_DIR/gen_sampling
[ "$?" -eq 0 ] || error_exit
echo "Succeeded" | tee -a ${LOG_FILE}
rm $TMP_OUT_DIR/gen_sampling
Expand All @@ -509,7 +509,7 @@ ${PYTHON} translate.py -model ${TEST_DIR}/test_model_lm.pt \
-ban_unk_token \
-min_length 5 \
-out $TMP_OUT_DIR/gen_sampling >> ${LOG_FILE} 2>&1
diff ${DATA_DIR}/data_lm/gen-sampling-beams-sol.txt $TMP_OUT_DIR/gen_sampling
diff ${DATA_DIR}/data_lm/gen-sampling-beams-sol$(python -c "import torch; print(torch.__version__[0])").txt $TMP_OUT_DIR/gen_sampling
[ "$?" -eq 0 ] || error_exit
echo "Succeeded" | tee -a ${LOG_FILE}
rm $TMP_OUT_DIR/gen_sampling
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
description="A python implementation of OpenNMT",
long_description=long_description,
long_description_content_type="text/markdown",
version="3.2.0",
version="3.3",
packages=find_packages(),
project_urls={
"Documentation": "http://opennmt.net/OpenNMT-py/",
Expand All @@ -21,7 +21,7 @@
},
python_requires=">=3.8",
install_requires=[
"torch>=1.13,<2",
"torch>=1.13,<2.1",
"configargparse",
"ctranslate2>=3.2,<4",
"tensorboard>=2.3",
Expand Down

0 comments on commit bd1f52f

Please sign in to comment.