Coder Social home page Coder Social logo

RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:6 and cuda:7! (when checking argumen t for argument mat2 in method wrapper_CUDA_mm) about xtuner HOT 4 CLOSED

xmy0916 avatar xmy0916 commented on June 11, 2024
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:6 and cuda:7! (when checking argumen t for argument mat2 in method wrapper_CUDA_mm)

from xtuner.

Comments (4)

LZHgrla avatar LZHgrla commented on June 11, 2024

@xmy0916
我在我的环境下执行以下命令以模拟您的情况,但是无法复现该报错。考虑可能是触发了 peft 某些奇怪的载入逻辑导致了这个报错。

CUDA_VISIBLE_DEVICES=0,1 xtuner mmbench internlm/internlm2-chat-7b --llava xtuner/llava-internlm2-7b  --visual-encoder openai/clip-vit-large-patch14-336  --prompt-template internlm2_chat --data-path ./MMBench_DEV_EN.tsv

目前可以尝试在单卡环境下评测,验证是否有问题。

比如使用2号卡单卡评测:

CUDA_VISIBLE_DEVICES=2 xtuner mmbench XXX

同时,也可以启用 DDP,以加速评测。以使用2号、3号卡为例:

NPROC_PER_NODE=2 CUDA_VISIBLE_DEVICES=2,3 xtuner mmbench XXX

from xtuner.

xmy0916 avatar xmy0916 commented on June 11, 2024

@LZHgrla project layer我做了点改动,加了个卷积层,不确定是不是这个导致的

from xtuner.

LZHgrla avatar LZHgrla commented on June 11, 2024

@xmy0916
如果改动不涉及 device,应该不会有问题

from xtuner.

xmy0916 avatar xmy0916 commented on June 11, 2024

@xmy0916 如果改动不涉及 device,应该不会有问题

好滴,我也感觉挺奇怪的,我加cuda device visalbe=0限制只用一张卡就行了

from xtuner.

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.