juansensio / chat

chatgpt clone
8 stars 5 forks source link

Ayuda, me sale un error en el codigo y no se que hacer :( #1

Open Alemar5 opened 1 year ago

Alemar5 commented 1 year ago

The model weights are not tied. Please use thetie_weightsmethod before using theinfer_auto_devicefunction. ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ in <module>:13 │ │ │ │ 10 tokenizer = AutoTokenizer.from_pretrained(checkpoint, cache_dir=cache_dir) │ │ 11 # model = GPTNeoXForCausalLM.from_pretrained(checkpoint, cache_dir=cache_dir).half().cud │ │ 12 # model = GPTNeoXForCausalLM.from_pretrained(checkpoint, cache_dir=cache_dir, device_map │ │ ❱ 13 model = GPTNeoXForCausalLM.from_pretrained(checkpoint, cache_dir=cache_dir, device_map=" │ │ 14 # model.tie_weights() │ │ 15 │ │ 16 │ │ │ │ c:\Users\aleja\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\modeling_u │ │ tils.py:2881 in from_pretrained │ │ │ │ 2878 │ │ │ │ mismatched_keys, │ │ 2879 │ │ │ │ offload_index, │ │ 2880 │ │ │ │ error_msgs, │ │ ❱ 2881 │ │ │ ) = cls._load_pretrained_model( │ │ 2882 │ │ │ │ model, │ │ 2883 │ │ │ │ state_dict, │ │ 2884 │ │ │ │ loaded_state_dict_keys, # XXX: rename? │ │ │ │ c:\Users\aleja\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\modeling_u │ │ tils.py:2980 in _load_pretrained_model │ │ │ │ 2977 │ │ │ ) │ │ 2978 │ │ │ is_safetensors = archive_file.endswith(".safetensors") │ │ 2979 │ │ │ if offload_folder is None and not is_safetensors: │ │ ❱ 2980 │ │ │ │ raise ValueError( │ │ 2981 │ │ │ │ │ "The currentdevice_maphad weights offloaded to the disk. Please │ │ 2982 │ │ │ │ │ " for them. Alternatively, make sure you havesafetensorsinstalle │ │ 2983 │ │ │ │ │ " offers the weights in this format." │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ValueError: The currentdevice_maphad weights offloaded to the disk. Please provide anoffload_folderfor them. Alternatively, make sure you havesafetensorsinstalled if the model you are using offers the weights in this format.

DLesmes commented 1 year ago

Do you have enough space on your disk? 🤔

Alemar5 commented 1 year ago

Yeah i have it, i have 1T disk, and im not using too much space