Comments (2)
I may be misunderstanding Kompute - it looks like it might not support Apple Silicon at all?
In that case I'm confused by the docs here: https://docs.gpt4all.io/gpt4all_python.html#gpt4all.gpt4all.GPT4All.device which say:
device
(str | None
, default:None
) --The processing unit on which the GPT4All model will run. It can be set to: - "cpu": Model will run on the central processing unit. - "gpu": Use Metal on ARM64 macOS, otherwise the same as "kompute". - "kompute": Use the best GPU provided by the Kompute backend. - "cuda": Use the best GPU provided by the CUDA backend. - "amd", "nvidia": Use the best GPU provided by the Kompute backend from this vendor. - A specific device name from the list returned by
GPT4All.list_gpus()
. Default is Metal on ARM64 macOS, "cpu" otherwise.
But when I do this:
model = GPT4All("Phi-3-mini-4k-instruct.Q4_0.gguf", device='gpu')
I get this:
availableGPUDevices: built without Kompute
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/simon/.local/share/virtualenvs/llm-gpt4all-N30dYrxH/lib/python3.11/site-packages/gpt4all/gpt4all.py", line 208, in __init__
self.model.init_gpu(device)
File "/Users/simon/.local/share/virtualenvs/llm-gpt4all-N30dYrxH/lib/python3.11/site-packages/gpt4all/_pyllmodel.py", line 272, in init_gpu
all_gpus = self.list_gpus()
^^^^^^^^^^^^^^^^
File "/Users/simon/.local/share/virtualenvs/llm-gpt4all-N30dYrxH/lib/python3.11/site-packages/gpt4all/_pyllmodel.py", line 260, in list_gpus
raise ValueError("Unable to retrieve available GPU devices")
ValueError: Unable to retrieve available GPU devices
from gpt4all.
Firstly, that documentation is for a version of the python bindings that hasn't been released yet. As of the current release, the only way to use the GPU on Apple Silicon is to not pass the device argument. There is no way to force use of the CPU.
Secondly, the Metal backend is much more complete (and efficient) than a Vulkan-based backend on top of MoltenVK would be. So we've never built GPT4All with Kompute support on Apple Silicon.
Even on the latest main branch, GPT4All.list_gpus()
is not implemented for the Metal backend. But I'm not aware of any devices the llama.cpp Metal backend supports that can have more than one GPU.
from gpt4all.
Related Issues (20)
- [Feature] GPU support for GPT-J HOT 3
- [Feature] Search via CTRL+F in references (context) for LocalDocs HOT 1
- GPT-J models fail to load unless device is set to "CPU" HOT 2
- [Feature] User-configurable stop sequences HOT 1
- Documentation for build the project from source code HOT 1
- How come GLM-4-9b is not supported yet? HOT 1
- Multithreaded app/concurrent generation requests - Thread 4 "python3" received signal SIGSEGV, Segmentation fault. HOT 5
- Error during installation process (gpt4all) ... missing d3dcompiler_47.dll HOT 1
- [Feature] Saving default model settings HOT 1
- Not accepting ChatGTP-4 API key
- Answers containing code are unreadable with light theme
- Calling generate before opening a chat session (with a system prompt specified) consistently malfunctions
- [Feature] Add a callback for generation complete in streaming mode or some other signal like is_final_token
- The API server is not working
- [Feature] Windows ARM64 Support HOT 1
- flatpak crashes on launch HOT 4
- Deep Seek V2 - Compatibility[Feature] Feature request title...
- Error tensor 'token_embd. weight' not found while loading model HOT 3
- handle documents - deactivate
- [Feature] Flash Attention In-app Feature Option Request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt4all.