text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

python download-model.py facebook/opt-1.3b

Open sfxworks opened this issue 2 years ago • 1 comments
trafficstars

Describe the bug

When running python download-model.py facebook/opt-1.3b an error occurs

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

  1. Follow the readme doc as-is with the AMD gpu route
  2. Download missing deps
pytest 7.1.3 requires tomli>=1.0.0, which is not installed.
paramiko 2.12.0 requires cryptography>=2.5, which is not installed.
Successfully installed accelerate-0.17.1 aiofiles-23.1.0 altair-4.2.2 bitsandbytes-0.37.1 click-8.1.3 entrypoints-0.4 flexgen-0.1.7 gradio-3.18.0 huggingface-hub-0.13.3 jsonschema-4.17.3 markdown-3.4.1 packaging-23.0 peft-0.2.0 psutil-5.9.4 pulp-2.7.0 pydantic-1.10.6 pyparsing-3.0.9 pyrsistent-0.19.3 pyyaml-6.0 rwkv-0.7.0 safetensors-0.3.0 sentencepiece-0.1.97 six-1.16.0 tokenizers-0.13.2 toolz-0.12.0 transformers-4.28.0.dev0
    /mnt/nvme/conda/text-generation-webui    main    pip install tomli                                                                                               ✔  16s   /mnt/nvme/textgen  
Collecting tomli
  Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Installing collected packages: tomli
Successfully installed tomli-2.0.1
    /mnt/nvme/conda/text-generation-webui    main    pip install cryptography                                                                                                ✔  /mnt/nvme/textgen  
Collecting cryptography
  Downloading cryptography-39.0.2-cp36-abi3-manylinux_2_28_x86_64.whl (4.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 32.6 MB/s eta 0:00:00
Collecting cffi>=1.12
  Downloading cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 441.8/441.8 kB 42.9 MB/s eta 0:00:00
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 15.3 MB/s eta 0:00:00
Installing collected packages: pycparser, cffi, cryptography
Successfully installed cffi-1.15.1 cryptography-39.0.2 pycparser-2.21

Attempt to download facebook opt-1.3b

Screenshot

No response

Logs

python download-model.py facebook/opt-1.3b                                                                              ✔  /mnt/nvme/textgen  
Downloading the model to models/opt-1.3b
Downloading file 1 of 7...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 653/653 [00:00<00:00, 1.16MiB/s]
Downloading file 2 of 7...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 137/137 [00:00<00:00, 393kiB/s]
Downloading file 3 of 7...
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 456k/456k [00:00<00:00, 6.29MiB/s]
Downloading file 4 of 7...
 36%|███████████████████████████████████████████████████████████▊                                                                                                        | 959M/2.63G [00:13<00:23, 70.5MiB/s]
Downloading file 5 of 7...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 441/441 [00:00<00:00, 902kiB/s]
Downloading file 6 of 7...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 685/685 [00:00<00:00, 1.31MiB/s]
Downloading file 7 of 7...
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 899k/899k [00:00<00:00, 9.29MiB/s]
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 444, in _error_catcher
    yield
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 567, in read
    data = self._fp_read(amt) if not fp_closed else b""
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 533, in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
  File "/mnt/nvme/textgen/lib/python3.10/http/client.py", line 465, in read
    s = self.fp.read(amt)
  File "/mnt/nvme/textgen/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "/mnt/nvme/textgen/lib/python3.10/ssl.py", line 1274, in recv_into
    return self.read(nbytes, buffer)
  File "/mnt/nvme/textgen/lib/python3.10/ssl.py", line 1130, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2548)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/requests/models.py", line 816, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 628, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 566, in read
    with self._error_catcher():
  File "/mnt/nvme/textgen/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 455, in _error_catcher
    raise SSLError(e)
urllib3.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2548)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/nvme/textgen/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/mnt/nvme/textgen/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/mnt/nvme/conda/text-generation-webui/download-model.py", line 39, in get_file
    for data in r.iter_content(block_size):
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/requests/models.py", line 824, in generate
    raise RequestsSSLError(e)
requests.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2548)
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/nvme/conda/text-generation-webui/download-model.py", line 179, in <module>
    results = pool.map(get_file, [[links[i], output_folder, i+1, len(links)] for i in range(len(links))])
  File "/mnt/nvme/textgen/lib/python3.10/multiprocessing/pool.py", line 367, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/mnt/nvme/textgen/lib/python3.10/multiprocessing/pool.py", line 774, in get
    raise self._value
requests.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2548)


### System Info

```shell
Manjaro 
Radeon 6800

sfxworks avatar Mar 21 '23 03:03 sfxworks

Also occurs for other models

python download-model.py EleutherAI/gpt-j-6B                                                                        INT ✘  /mnt/nvme/textgen  
Downloading the model to models/gpt-j-6B
Downloading file 1 of 8...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.04k/4.04k [00:00<00:00, 7.91MiB/s]
Downloading file 2 of 8...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 930/930 [00:00<00:00, 1.29MiB/s]
Downloading file 3 of 8...
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 456k/456k [00:00<00:00, 6.56MiB/s]
Downloading file 4 of 8...
 28%|█████████████████████████████████████████████▋                                                                                                                     | 6.79G/24.2G [01:30<03:51, 75.2MiB/s]
Downloading file 5 of 8...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 357/357 [00:00<00:00, 231kiB/s]
Downloading file 6 of 8...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.37M/1.37M [00:00<00:00, 14.4MiB/s]
Downloading file 7 of 8...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 619/619 [00:00<00:00, 1.23MiB/s]
Downloading file 8 of 8...
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 798k/798k [00:00<00:00, 9.06MiB/s]
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 444, in _error_catcher
    yield
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 567, in read
    data = self._fp_read(amt) if not fp_closed else b""
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 533, in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
  File "/mnt/nvme/textgen/lib/python3.10/http/client.py", line 465, in read
    s = self.fp.read(amt)
  File "/mnt/nvme/textgen/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "/mnt/nvme/textgen/lib/python3.10/ssl.py", line 1274, in recv_into
    return self.read(nbytes, buffer)
  File "/mnt/nvme/textgen/lib/python3.10/ssl.py", line 1130, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2548)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/requests/models.py", line 816, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 628, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 566, in read
    with self._error_catcher():
  File "/mnt/nvme/textgen/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/urllib3/response.py", line 455, in _error_catcher
    raise SSLError(e)
urllib3.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2548)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/nvme/textgen/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/mnt/nvme/textgen/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/mnt/nvme/conda/text-generation-webui/download-model.py", line 39, in get_file
    for data in r.iter_content(block_size):
  File "/mnt/nvme/textgen/lib/python3.10/site-packages/requests/models.py", line 824, in generate
    raise RequestsSSLError(e)
requests.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2548)
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/nvme/conda/text-generation-webui/download-model.py", line 179, in <module>
    results = pool.map(get_file, [[links[i], output_folder, i+1, len(links)] for i in range(len(links))])
  File "/mnt/nvme/textgen/lib/python3.10/multiprocessing/pool.py", line 367, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/mnt/nvme/textgen/lib/python3.10/multiprocessing/pool.py", line 774, in get
    raise self._value
requests.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2548)

sfxworks avatar Mar 21 '23 03:03 sfxworks

Resuming download helps after parts for larger models. Not sure why this occurs.

sfxworks avatar Apr 08 '23 01:04 sfxworks

This issue has been closed due to inactivity for 6 weeks. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.

github-actions[bot] avatar Dec 01 '23 23:12 github-actions[bot]