Gpt-2-simple

Latest version: v0.8.1

Safety actively analyzes 634607 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.5.3

Assertion was triggering false positives, so removing it.

0.5.2

Minor fix to prevent issue hit with gpt-2-cloud-run.

A goal of the release was to allow a graph reset without resetting the parameters; that did not seem to work, so holding off on that release.

0.5.1

Merged PRs (including fix for prefix issue). (see commits for more info)

0.5

Adapted a few functions from Neil Shepperd's fork:

* Nucleus Sampling (`top_p`) when generating text, which results in surprisingly different results. (setting `top_p=0.9` works well). Supercedes `top_k` when used. (51)
* An `encode_dataset()` function to preencode and compress a large dataset before loading it for finetuning. (19, 54)

Improvements to continuing model training:

* `overwrite` argument for `finetune`: with `restore_from="latest"`, this continues model training without creating a duplicate copy of the model, and is therefore good for transfer learning using multiple datasets (20)
* You can continue to `finetune` a model without having the original GPT-2 model present.

Improvements with I/O involving Colaboratory
* Checkpoint folders are now packaged into a `.tar` file when copying to Google Drive, and when copying from Google Drive, the '.tar' file is automatically unpackaged into the correct checkpoint format. (you can pass `copy_folder=True` to the `copy_checkpoint` function to revert to the old behavior). (37: thanks woctezuma !)
* `copy_checkpoint_to_gdrive` and `copy_checkpoint_from_gdrive` now take a `run_name` argument instead of a `checkpoint_folder` argument.

Miscellaneous

* Added CLI arguments for `top_k`, `top_p`, `overwrite`.
* Cleaned up redundant function parameters (39)

0.4.2

* `load_gpt2()` in a fresh session is much faster and uses much less memory when loaded. (for the 117M model, the system will stay under <2 GB RAM which is the critical point for cloud services)
* `start_tf_sess()` now accepts a `threads` parameter, which is useful if you know exactly how many threads will be used.

0.4.1

Number of CSV tokens was inadvertently doubled. (25)

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.