Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix model conversion #76

Merged
merged 2 commits into from
Aug 16, 2023
Merged

Fix model conversion #76

merged 2 commits into from
Aug 16, 2023

Conversation

vietanhdev
Copy link
Contributor

I've had this error on macOS and fixed it in this pr:

Downloading: "https:/dl.fbaipublicfiles.com/encodec/v0/encodec_24khz-d7cc33bc.th" to /Users/vietanhdev/.cache/torch/hub/checkpoints/encodec_24khz-d7cc33bc.th
Traceback (most recent call last):
  File "download_weights.py", line 41, in <module>
    state_dict = torch.hub.load_state_dict_from_url(
  File "/opt/homebrew/Caskroom/miniforge/base/envs/bark/lib/python3.8/site-packages/torch/hub.py", line 746, in load_state_dict_from_url
    download_url_to_file(url, cached_file, hash_prefix, progress=progress)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/bark/lib/python3.8/site-packages/torch/hub.py", line 611, in download_url_to_file
    u = urlopen(req)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/bark/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/bark/lib/python3.8/urllib/request.py", line 522, in open
    req = meth(req)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/bark/lib/python3.8/urllib/request.py", line 1278, in do_request_
    raise URLError('no host given')
urllib.error.URLError: <urlopen error no host given>

For the running model conversion, I'm still missing vocab.txt and need to comment following part to convert the model successfully:

    # generate_vocab_file(vocab_path, out_dir / "ggml_vocab.bin")
    # print(" Vocab loaded.")

@PABannier
Copy link
Owner

Hi @vietanhdev ! Thanks for the PR! FYI, I've just pushed vocab.txt in ggml_weights. This is the vocab file from the bert-multilingual-cased tokenizer on HuggingFace.

@PABannier PABannier merged commit 5767cf1 into PABannier:main Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants