-
Notifications
You must be signed in to change notification settings - Fork 320
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 torch device #41
base: main
Are you sure you want to change the base?
Fix torch device #41
Conversation
You left your prompts.py change in, might want to remove that for the PR (a suggestion, to be clear, I'm not important :P). |
That's what I get for trying to go back and isolate changes in commits instead of just doing it all at once lol. It's a good prompt for this kind of thing but i'm taking it back for clarity of PR |
@Arrabonae |
Just wasted 2h figuring out why KVCache is misplaced on mps, and then saw this PR already exists. One thing here: the buffers are already on the correct device, hence we don't have to move the KVCache to device while |
Dude I literally made the fix and was about to PR 💀 |
Bug: device not set correctly, some tensors on
cpu
while the rest are successfully onmps
.RuntimeError: Placeholder storage has not been allocated on MPS device!
The device logic was duplicated across several files, so it was easy to miss the one line where this happened. I've moved that logic into a function in
torch_device.py
.