mirror of
https://github.com/deepseek-ai/DeepSeek-VL.git
synced 2026-11-05 00:47:24 +00:00
[PR #22] feat: add mps support #67
Labels
No labels
enhancement
environment
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-VL#67
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepSeek-VL/pull/22
Author: @Fodark
Created: 3/13/2024
Status: 🔄 Open
Base:
main← Head:mps-support📝 Commits (5)
c99e9f1automatically detect the Python version, if above 3.10 patch collections to use collections.abc5db8156use transformers 4.38.1 instead of 4.38.2 as autocast fails on mps on latest version494e622add an util function to detect platflorm and suitable dtype40ec649load model on detected device and use correct dtype4eac5b5modify example in README to use the new device and dtype function📊 Changes
7 files changed (+49 additions, -11 deletions)
View changed files
📝
README.md(+4 -2)📝
cli_chat.py(+3 -3)📝
deepseek_vl/__init__.py(+11 -0)📝
deepseek_vl/utils/io.py(+24 -1)📝
inference.py(+5 -3)📝
pyproject.toml(+1 -1)📝
requirements.txt(+1 -1)📄 Description
Detect the platform where the model is loaded and adjust
torch.deviceandtorch.dtypeappropriately.I was able to run the model on an M1 Macbook Pro (with poor performance at the moment).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.