facebookresearch / spiritlm

Inference code for the paper "Spirit-LM Interleaved Spoken and Written Language Model".
Other
817 stars 52 forks source link

load model in colab - path not found #11

Closed rowntreerob closed 1 month ago

rowntreerob commented 1 month ago

examples/speech_generation/spirit_model.ipynb is throwing an error loading the model.

trying to install/ run in colab and looking like "lm-base-7b" not in local fs with path = '/usr/local/lib/python3.10/dist-packages/checkpoints/spiritlm_model/spirit-lm-base-7b'

I ran "setup.py install " and it looked to a nooby like its ok. however the path '/usr/local/lib/python3.10/dist-packages/checkpoints does not exist.

So I missed something for build/install/run on colab??

--stdout

[/usr/local/lib/python3.10/dist-packages/transformers/utils/hub.py](https://localhost:8080/#) in cached_file(path_or_repo_id, filename, cache_dir, force_download, resume_download, proxies, token, revision, local_files_only, subfolder, repo_type, user_agent, _raise_exceptions_for_gated_repo, _raise_exceptions_for_missing_entries, _raise_exceptions_for_connection_errors, _commit_hash, **deprecated_kwargs)
    464         raise EnvironmentError(f"There was a specific connection error when trying to load {path_or_repo_id}:\n{err}")
    465     except HFValidationError as e:
--> 466         raise EnvironmentError(
    467             f"Incorrect path_or_model_id: '{path_or_repo_id}'. Please provide either the path to a local folder or the repo_id of a model on the Hub."
    468         ) from e

OSError: Incorrect path_or_model_id: '/usr/local/lib/python3.10/dist-packages/checkpoints/spiritlm_model/spirit-lm-base-7b'. Please provide either the path to a local folder or the repo_id of a model on the Hub.
rowntreerob commented 1 month ago

will do as ref by #12 thank you

hitchhicker commented 1 month ago

Thanks @rowntreerob for raising the issue and thanks @tarekabouzeid for the PR!

@rowntreerob I wonder if you apply the fix in #12 does it work for you? Do you have a working open colab to share? Thanks!

hitchhicker commented 1 month ago

I just notice that this issue was closed automatically by Github, please reopen it if the issue is not resolved.

rowntreerob commented 1 month ago

im working on uploading the model to a working colab session ttyl on my progress

thank you for helping out

On Wed, Oct 23, 2024 at 3:27 PM hitchhicker @.***> wrote:

Thanks @rowntreerob https://github.com/rowntreerob for raising the issue and thanks @tarekabouzeid https://github.com/tarekabouzeid for the PR!

@rowntreerob https://github.com/rowntreerob I wonder if you apply the fix in #12 https://github.com/facebookresearch/spiritlm/pull/12 does it work for you? Do you have a working open colab to share? Thanks!

— Reply to this email directly, view it on GitHub https://github.com/facebookresearch/spiritlm/issues/11#issuecomment-2433585019, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJQADP2VQ62PYYUEDKCU3Z5APFZAVCNFSM6AAAAABQNRNREWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZTGU4DKMBRHE . You are receiving this because you were mentioned.Message ID: @.***>

hitchhicker commented 1 month ago

Please keep in mind that if your colab session is open to any third party, you should follow the guidance as per our LICENSE, thanks!

rowntreerob commented 1 month ago

[image: image.png]

--resolved by:

  1. use links to download the zip file for a single model
  2. upload zip to g.drive
  3. run the cell shown to unzip - /content/drive/MyDrive/data/checkpoints/spiritlm_model/spirit-lm-base-7b"
  4. use the path above to instantiate the model spirit_lm = Spiritlm({path_to_model])

On Thu, Oct 24, 2024 at 7:34 AM Robert Rowntree @.***> wrote:

im working on uploading the model to a working colab session ttyl on my progress

thank you for helping out

On Wed, Oct 23, 2024 at 3:27 PM hitchhicker @.***> wrote:

Thanks @rowntreerob https://github.com/rowntreerob for raising the issue and thanks @tarekabouzeid https://github.com/tarekabouzeid for the PR!

@rowntreerob https://github.com/rowntreerob I wonder if you apply the fix in #12 https://github.com/facebookresearch/spiritlm/pull/12 does it work for you? Do you have a working open colab to share? Thanks!

— Reply to this email directly, view it on GitHub https://github.com/facebookresearch/spiritlm/issues/11#issuecomment-2433585019, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABJQADP2VQ62PYYUEDKCU3Z5APFZAVCNFSM6AAAAABQNRNREWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZTGU4DKMBRHE . You are receiving this because you were mentioned.Message ID: @.***>