Giter VIP home page Giter VIP logo

Comments (4)

qiuxin2012 avatar qiuxin2012 commented on September 26, 2024

This error is caused by out of GPU memory. See our faq https://bigdl.readthedocs.io/en/latest/doc/LLM/Overview/FAQ/faq.html#native-api-failed-native-api-returns-5-pi-error-out-of-resources-5-pi-error-out-of-resources
Could you check your Memory Physical Size(output of sudo xpu-smi discovery -d 0)? See https://dgpu-docs.intel.com/driver/installation.html#xpu-smi-device-information-and-telemetry. We just find one of customer's Flex 140 only has 5GB memory, but it should be 12GB.

from bigdl.

HLneoh avatar HLneoh commented on September 26, 2024

Hi @qiuxin2012 & @rnwang04, from what I understand, the flex 140 has two GPUs per card, with a memory capacity of 12GB (6GB per GPU). See attached for my output of sudo xpu-smi discovery -d 0. Currently, the inference is only running on GPU device 0.

image
image

from bigdl.

jason-dai avatar jason-dai commented on September 26, 2024

In this case, we many need to run the model inference on two cards using TP or PP.

from bigdl.

rnwang04 avatar rnwang04 commented on September 26, 2024

As flex 140's memory is so limited, you may add cpu_embedding=True in https://github.com/intel-analytics/BigDL/blob/main/python/llm/example/GPU/HF-Transformers-AutoModels/Model/llama2/generate.py to help save memory of Embedding layer and see whether it works :

    model = AutoModelForCausalLM.from_pretrained(model_path,
                                                 load_in_4bit=True,
                                                 optimize_model=True,
                                                 trust_remote_code=True,
                                                 use_cache=True,
                                                 cpu_embedding=True)

If not, you can try to run the model inference on two cards using TP or PP, related example is here: https://github.com/intel-analytics/BigDL/tree/main/python/llm/example/GPU/Deepspeed-AutoTP

from bigdl.

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.