#How to run gpt-4chan? TypeError: expected str, bytes or os.PathLike object, not NoneType

9 messages · Page 1 of 1 (latest)

tame silo
#

This is my error

Traceback (most recent call last):
  File "/home/tewi/ai/text-generation-webui/server.py", line 285, in <module>
    shared.model, shared.tokenizer = load_model(shared.model_name)
  File "/home/tewi/ai/text-generation-webui/modules/models.py", line 176, in load_model
    tokenizer = AutoTokenizer.from_pretrained(Path(f"{shared.args.model_dir}/{shared.model_name}/"))
  File "/home/tewi/ai/text-generation-webui/venv/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 694, in from_pretrained
    return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
  File "/home/tewi/ai/text-generation-webui/venv/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1811, in from_pretrained
    return cls._from_pretrained(
  File "/home/tewi/ai/text-generation-webui/venv/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1965, in _from_pretrained
    tokenizer = cls(*init_inputs, **init_kwargs)
  File "/home/tewi/ai/text-generation-webui/venv/lib/python3.10/site-packages/transformers/models/gpt2/tokenization_gpt2_fast.py", line 140, in __init__
    super().__init__(
  File "/home/tewi/ai/text-generation-webui/venv/lib/python3.10/site-packages/transformers/tokenization_utils_fast.py", line 117, in __init__
    slow_tokenizer = self.slow_tokenizer_class(*args, **kwargs)
  File "/home/tewi/ai/text-generation-webui/venv/lib/python3.10/site-packages/transformers/models/gpt2/tokenization_gpt2.py", line 188, in __init__
    with open(vocab_file, encoding="utf-8") as vocab_handle:
TypeError: expected str, bytes or os.PathLike object, not NoneType
#
$ tree models
models
├── EleutherAI_gpt-j-6B
│   ├── added_tokens.json
│   ├── config.json
│   ├── huggingface-metadata.txt
│   ├── merges.txt
│   ├── pytorch_model.bin
│   ├── README.md
│   ├── special_tokens_map.json
│   ├── tokenizer_config.json
│   ├── tokenizer.json
│   └── vocab.json
├── facebook_galactica-125m
│   ├── config.json
│   ├── generation_config.json
│   ├── huggingface-metadata.txt
│   ├── pytorch_model.bin
│   ├── README.md
│   ├── special_tokens_map.json
│   ├── tokenizer_config.json
│   └── tokenizer.json
├── gpt4chan_model
│   ├── config.json
│   ├── pytorch_model.bin
│   ├── tokenizer_config.json
│   └── tokenizer.json
└── place-your-models-here.txt
#

I solved this by copying everything except the model.bin from gpt-j into gpt4chan. but now I get this:

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 2.00 MiB (GPU 0; 5.78 GiB total capacity; 4.63 GiB already allocated; 15.31 MiB free; 4.65 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
novel minnow
#

When I try to run it, it just freezes and nothing happens

tame silo
#

I think we don't have enough GPU VRAM

novel minnow
#

I don't even have an NVidia GPU. It won't run on CPU?

tame silo
#

im not sure, probably not

#

i should learn some basics of this stuff

novel minnow
#

I've got it running on CPU now, but it's super slow with Stable Diffusion also running on CPU in the background.