Commit Graph

588 Commits

Author SHA1 Message Date
Henk d041ec0921 Safer defaults and more flexibility
There have been a lot of reports from newer users who experience AI breakdown because not all models properly handle 2048 max tokens. 1024 is the only value that all models support and was the original value KoboldAI used. This commit reverts the decision to increase this to 2048, any existing configurations are not effected. Users who wish to increase the max tokens can do so themselves. Most models handle up to 1900 well (The GPT2 models are excluded), for many you can go all the way. (It is currently not yet known why some finetunes cause a decrease in maxtoken support,

In addition this commit contains a request for more consistent slider behavior, allowing the sliders to be changed at 0.01 intervals instead of some sliders being capped to 0.05.
2022-07-03 15:07:54 +02:00
Henk e2f7fed99f Don't turn gamestarted off 2022-07-02 12:59:14 +02:00
vfbd ebba79fed6 Remove trailing whitespace from submissions
(cherry picked from commit b99d1449c9)
2022-06-26 14:06:34 -04:00
vfbd 2a4d37ce60 Clean up whitespace at the end of actions when loading story
Specifically, we merge blank actions into the next action and we move
whitespace at the end of non-blank actions to the beginning of the next
action.

(cherry picked from commit 4b16600e49)
2022-06-26 14:04:36 -04:00
Henk 9e7eb80db4 Nerys V2 part 2 2022-06-25 14:03:19 +02:00
Henk ecc6ee9474 Nerys V2 2022-06-25 13:47:49 +02:00
Henk 8be0964427 AIDG Import Fix 2022-06-24 18:29:06 +02:00
vfbd 3da885d408 GPT-NeoX HF model badwords fix 2022-06-23 15:02:43 -04:00
vfbd 0eb9f8a879 Account for lnheader in budget calculation 2022-06-22 19:16:24 -04:00
Gnome Ann 8c594c6869 Correct the padding token for GPT-NeoX 2022-06-21 19:37:43 -04:00
Gnome Ann a7f667c34c Use NeoX badwords when loading from HF GPT-NeoX model 2022-06-21 19:33:25 -04:00
Gnome Ann 5e71f7fe97 Use slow tokenizer if fast tokenizer is not available 2022-06-17 21:08:37 -04:00
Gnome Ann f71bae254a Fix OPT tokenization problems 2022-06-17 13:29:42 -04:00
Henk 661a2d2727 1.18.1 version bump
Since 1.18 Kobold had a few smaller features added, specifically the ability to re-order sampling options and a new sampler. Since it is a smaller addition a minor version bump was chosen since there are no breaking changes.
2022-06-15 00:55:12 +02:00
Gnome Ann 6231106f95 Add Samplers menu 2022-06-13 20:18:09 -04:00
Gnome Ann 4c7d6f42d9 Add `sampler_order` to settings file 2022-06-13 19:14:38 -04:00
Gnome Ann 2d3db7b4ba Implement support for sampler order in the backend code 2022-06-13 19:12:23 -04:00
Henk 66c0dda485 Hide (Broken) Chatbot Models
Removing this option because they are currently unavailable. People who still have them can load them trough the load from file option. Once they have been retrained and reuploaded I will add the menu back.
2022-06-11 22:54:51 +02:00
Henk 5c81374a48 Top A for GooseAi 2022-06-11 22:04:37 +02:00
Gnome Ann fdb2a7fa4c Top-A sampling 2022-06-10 22:28:20 -04:00
Gnome Ann fe619d4677 Update list of versions with broken OPT again
They released another version of transformers that still doesn't have
the OPT patch so I decided it would be safer to just mark all 4.19
transformers versions as needing the OPT patch.
2022-06-09 17:42:46 -04:00
Henk e5dcf91a08 Defaults Support
This adds support for loading settings from the defaults folder, settings are loaded in the following order and overwritten if needed by the higher number.

1. The model config file.
2. The defaults folder.
3. The users defined settings file.

With this support we can begin to ship better defaults for models we do not manage. Our community tuners have been most helpful at adding good defaults to their configuration files, but for other models such as the base models this gives us the flexibility to define better settings for each model without messing with a users desired settings if they already exist.
2022-06-01 10:34:16 +02:00
Gnome Ann 707316de31 Kaggle TPU support 2022-05-31 12:20:16 -04:00
Henk 1a1f2f6428 30B ram requirements 2022-05-31 13:17:06 +02:00
Gnome Ann 69da5b7bc2 Update list of transformers versions that have broken OPT 2022-05-28 23:44:19 -04:00
Henk 4b65ce9c76 1.18 version bump 2022-05-28 19:39:05 +02:00
Henk b30370bf4b 2048 maxtoken default
Almost everyone prefers 2048 max tokens because of the superior coherency. It should only be lower due to ram limits, but the menu already shows the optimal ram for 2048. Negatively effected users can turn it down themselves, for everyone else especially on rented machines or colab 2048 is a better default.
2022-05-27 01:23:48 +02:00
Gnome Ann c692987e40 Fix an error that occurs when loading GPT-2 models
I forgot that this new_rebuild_tensor function's first argument's type
is different when loading GPT-2 models.
2022-05-20 14:54:49 -04:00
Julius ter Pelkwijk 6ae7b48b69
Adding Nerys model 13B 2022-05-18 13:50:57 +02:00
Julius ter Pelkwijk f0df3de610
Adding Nerys model 2.7B 2022-05-16 09:50:45 +02:00
Gnome Ann d5ab3ef5b1 Fix `no attribute get_checkpoint_shard_files` 2022-05-14 11:49:04 -04:00
Gnome Ann 1476e76cfc Copy fp16 model files instead of resaving them 2022-05-14 00:45:43 -04:00
Gnome Ann 0c5ca5261e Loading a sharded model will now display only one progress bar 2022-05-13 23:32:16 -04:00
Gnome Ann f9f1a5f3a9 Make sure tqdm progress bars display properly in Colab 2022-05-13 17:37:45 -04:00
Gnome Ann 91d3672446 Proper progress bar for aria2 downloads 2022-05-13 17:00:10 -04:00
henk717 7ea0c49c1a
Merge pull request #128 from VE-FORBRYDERNE/opt
OPT breakmodel and TPU support
2022-05-13 18:07:02 +02:00
Gnome Ann 1200173386 Custom badwords for OPT
Generated using:
```
import transformers
tokenizer = transformers.AutoTokenizer.from_pretrained("facebook/opt-350m", fast=False)
badwordsids_opt = [[v] for k, v in tokenizer.vocab.items() if any(c in k for c in "<>[]")]
```
2022-05-13 10:45:28 -04:00
Henk d5fa782483 NS Mode (comment fix) 2022-05-13 10:53:19 +02:00
Henk 8376f12e21 Add NS mode
OPT supports newlines, but it also needs some of the behavior we use in S mode. NS mode is a more limited version of S mode that still handles the </s> token, but instead of replacing it with a new line we replace it empty and newlines are not converted.

In future if your Fairseq style model has newline support use NS mode, while if it needs artifically inserted newlines use S mode. This also means that people finetuning fairseq models to include newlines might benefit from testing their models on ns mode.
2022-05-13 10:44:12 +02:00
Gnome Ann 55079f672a Fix typo in soft prompt patching code 2022-05-13 01:51:55 -04:00
Gnome Ann 29bb3f569b Fix a bug in OPTForCausalLM where self.lm_head is the wrong size 2022-05-13 01:37:17 -04:00
Gnome Ann defbb53b68 OPT breakmodel 2022-05-13 01:03:38 -04:00
Gnome Ann b1d8797a54 Allow TPU Colab to load sharded HF models 2022-05-12 23:51:40 -04:00
Gnome Ann 4fa5f1cd6a Add TPU support for OPT-350M
The 350M model seems to have a different structure than the other ones ???
2022-05-12 22:21:15 -04:00
Henk 5c4a087970 Disable S mode for OPT 2022-05-13 01:47:59 +02:00
Henk e98cc3cb16 OPT models 2022-05-12 23:55:21 +02:00
Henk 376e76f5da S mode for OPT 2022-05-12 02:18:14 +02:00
Gnome Ann 46cfa1367f Add `--no_aria2` command line flag 2022-05-11 00:44:56 -04:00
Gnome Ann f09959f9be Fix patching code of `PreTrainedModel.from_pretrained()` 2022-05-11 00:41:53 -04:00
Gnome Ann 4b49d1c464 Make sure `vars.revision` is defined 2022-05-10 22:51:36 -04:00