Git Product home page Git Product logo

Comments (3)

AlexanderFillbrunn avatar AlexanderFillbrunn commented on July 21, 2024 14

Your M1 Mac does not have Cuda, which is a feature of Nvidia GPUs. From what I found out, theoretically you should use .to("mps") instead of .cuda() to replace Cuda with Metal, but this causes a different problem for me. The script crashes and I get the error described here: pytorch/pytorch#99564.

from stablelm.

mcmonkey4eva avatar mcmonkey4eva commented on July 21, 2024 1

The GGML project, for running LLMs on CPUs (including specifically mac support!) has an initial example project that can run StableLM: https://github.com/ggerganov/ggml/tree/master/examples/stablelm

There's also https://huggingface.co/cakewalk/ggml-q4_0-stablelm-tuned-alpha-7b/tree/main which supposedly works in llama.cpp

from stablelm.

reinies avatar reinies commented on July 21, 2024

Hey all,

same for me. If I try to execute the "python app.py" which i got from: https://huggingface.co/spaces/stabilityai/stablelm-tuned-alpha-chat/tree/main I will get:

stablelm-tuned-alpha-chat git:(main) ✗ python app.py
Starting to load the model to memory
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:34<00:00,  8.60s/it]
Traceback (most recent call last):
  File "/Users/rspies/work/projects/stablelm-tuned-alpha-chat/app.py", line 12, in <module>
    "stabilityai/stablelm-tuned-alpha-7b", torch_dtype=torch.float16).cuda()
                                                                      ^^^^^^
  File "/Users/rspies/work/projects/stablelm-tuned-alpha-chat/my_project_env/lib/python3.11/site-packages/torch/nn/modules/module.py", line 905, in cuda
    return self._apply(lambda t: t.cuda(device))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rspies/work/projects/stablelm-tuned-alpha-chat/my_project_env/lib/python3.11/site-packages/torch/nn/modules/module.py", line 797, in _apply
    module._apply(fn)
  File "/Users/rspies/work/projects/stablelm-tuned-alpha-chat/my_project_env/lib/python3.11/site-packages/torch/nn/modules/module.py", line 797, in _apply
    module._apply(fn)
  File "/Users/rspies/work/projects/stablelm-tuned-alpha-chat/my_project_env/lib/python3.11/site-packages/torch/nn/modules/module.py", line 820, in _apply
    param_applied = fn(param)
                    ^^^^^^^^^
  File "/Users/rspies/work/projects/stablelm-tuned-alpha-chat/my_project_env/lib/python3.11/site-packages/torch/nn/modules/module.py", line 905, in <lambda>
    return self._apply(lambda t: t.cuda(device))
                                 ^^^^^^^^^^^^^^
  File "/Users/rspies/work/projects/stablelm-tuned-alpha-chat/my_project_env/lib/python3.11/site-packages/torch/cuda/__init__.py", line 239, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

Is there any way to use cpu instead cuda (or similar)?

I tried it on a Mac with M1.

Best regards,
Reinhard

from stablelm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.