GithubHelp home page GithubHelp logo

Comments (8)

Kefeng-Duan avatar Kefeng-Duan commented on August 17, 2024

Hi, vonchenplus
Please decrease the max_batch_size/max_input_len/max_output_len when building the engine.
A rough estimation is

  1. for Mixtral8x7b with fp16 precision, its weight consumes ~87GB
  2. the fp16 KVcache consumes ~65536*2048(max_bs)*4096(max_in + max_out)*2(fp16)/1024/1024/1024 = 1024GB
    the sum of the two is far larger than your GPUs capacity (160GB)

from tensorrt-llm.

vonchenplus avatar vonchenplus commented on August 17, 2024

I have a few questions I'd like to ask:

  1. When I set the workers parameter to 2 during trtllm-build, is only one GPU being used in the end? Because I see that only one GPU's memory is being utilized.
  2. When you tested Mixtral-8x7B-v0.1 fp16, what graphics card did you use?

from tensorrt-llm.

Kefeng-Duan avatar Kefeng-Duan commented on August 17, 2024

Hi, @vonchenplus

  1. How do you observe that only one GPU was used? Could you help to double confirm your observation by print the workers here:
    workers = min(torch.cuda.device_count(), args.workers)
    ?
  2. I think 2xA100 is OK

from tensorrt-llm.

vonchenplus avatar vonchenplus commented on August 17, 2024

Hi, @Kefeng-Duan ,

  1. I checked yesterday and confirmed that the workers are set to 2, but it seems that only one card is being used.
  2. However, in my current test, using two cards is indeed not working.

from tensorrt-llm.

Kefeng-Duan avatar Kefeng-Duan commented on August 17, 2024

Hi, @vonchenplus

  1. are your torch.cuda.device_count() = 1 or 2?
  2. even when you decrease the max_bs/max_seqin/max_seqout to a proper range? what's the failure message?
    Thanks

from tensorrt-llm.

vonchenplus avatar vonchenplus commented on August 17, 2024

Hi @Kefeng-Duan

  1. torch.cuda.device_count() is 2.
  2. I didn't reduce max_bs/max_seqin/max_seqout because I wanted to reproduce the performance mentioned in your report.

from tensorrt-llm.

kaiyux avatar kaiyux commented on August 17, 2024

Hi @vonchenplus , in the Mixtral-8x7B-v0.1.json file you shared, tp_size is set to 1, if you want to do TP2 with dummy weights, you'll need to set mapping as

"mapping": {
        "world_size": 2,
        "tp_size": 2,
        "pp_size": 1
    },

from tensorrt-llm.

vonchenplus avatar vonchenplus commented on August 17, 2024

Hi @kaiyux,

It's already working, thanks you.

from tensorrt-llm.

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.