Giter Club home page Giter Club logo

Comments (5)

MikkoMMM avatar MikkoMMM commented on August 18, 2024 1

For me it would be using something else -downloaded models in KoboldAI, but I suppose it makes sense to have ways to do it both ways.

The tensorflow version of the model_v5 GPT-2 (the original AI Dungeon 2 model) at least seems to fail when I select option "Custom GPT-2 (eg CloverEdition)":

Initializing transformers, please wait...
2021-06-03 20:41:12.078066: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0
file /mnt/ssd/aidungeon-tensorflow-models/model_v5/config.json not found
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/transformers/configuration_utils.py", line 458, in get_config_dict
    resolved_config_file = cached_path(
  File "/usr/lib/python3.9/site-packages/transformers/file_utils.py", line 1180, in cached_path
    raise EnvironmentError(f"file {url_or_filename} not found")
OSError: file /mnt/ssd/aidungeon-tensorflow-models/model_v5/config.json not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/lvdata/games/AIDungeon2/KoboldAI-Client/aiserver.py", line 322, in <module>
    model     = GPT2LMHeadModel.from_pretrained(vars.custmodpth)
  File "/usr/lib/python3.9/site-packages/transformers/modeling_utils.py", line 975, in from_pretrained
    config, model_kwargs = cls.config_class.from_pretrained(
  File "/usr/lib/python3.9/site-packages/transformers/configuration_utils.py", line 401, in from_pretrained
    config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/usr/lib/python3.9/site-packages/transformers/configuration_utils.py", line 478, in get_config_dict
    raise EnvironmentError(msg)
OSError: Can't load config for '/mnt/ssd/aidungeon-tensorflow-models/model_v5/'. Make sure that:

- '/mnt/ssd/aidungeon-tensorflow-models/model_v5/' is a correct model identifier listed on 'https://huggingface.co/models'

- or '/mnt/ssd/aidungeon-tensorflow-models/model_v5/' is the correct path to a directory containing a config.json file

I checked that it does work in at least AID: Unleashed.

A sidenote: I'm not actually using the GUI to select these models; I edited the code to have modpath directly have the correct path. An "upvote" for that headless option mentioned in #3; it's going to be really clunky to navigate to the desired model's directory every time I want to play.

from koboldai-client.

MasterofNothing avatar MasterofNothing commented on August 18, 2024

I think it already offers this option. Suppose you want to run another copy of GPT-Neo 2.7B, you can do the following. Instead of selecting option 2 (that downloads it to some folder in your C:), select option 8 (Custom Neo) and point CMD to wherever you have this normal GPT-Neo 2.7B model installed (though you can also point to the finetunes). All the other model types offer similar options.

I don't know where Kobold stores its models by default, but if you know that I'm assuming you can also just symlink like you used to.

from koboldai-client.

MasterofNothing avatar MasterofNothing commented on August 18, 2024

(Can't edit my post.)

Or did you mean the other way around? For you to use the Kobold-downloaded models in something else (e.g. Clover)?

from koboldai-client.

Arcitec avatar Arcitec commented on August 18, 2024

Model Directory:

  • KoboldAI uses the "Transformers" library which configures the neural network layouts, and loads/downloads pre-trained models.
  • Transformers downloads ALL data (temporary and permanent) into HOME FOLDER / .cache / huggingface / transformers on all platforms (Windows, Linux, Mac).
  • The models are stored as randomly named files, with a JSON file that contains the path it was downloaded from, which can help you identify and delete unwanted models.
  • If the Transformers library crashes during a download, it will have orphaned temporary files in that folder. So feel free to look there and delete them. I can't remember the temp name but I think it had "temp" or "tmp" in the filename. Delete all of those if you see any.

from koboldai-client.

henk717 avatar henk717 commented on August 18, 2024

In 1.17 it now converts the models to efficient local models stored in the KoboldAI directory. In 1.18 this is further optimized with a seperate models directory. Downloaded models can be moved around if you use option 1 to load them. If you keep them in their original location they can also be selected from the main menu.

from koboldai-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.