Open KeremTurgutlu opened 2 months ago
@KeremTurgutlu ,Thanks for your reporting! I'll take a look soon
@KeremTurgutlu Do we have a unit test script for us to reproduce? I can reproduce with tp=2 on a end2end model.
Yes I think tp=2 should be a good start. Easiest would be to rerun the python code samples I shared in this issues because they isolate the issue to a single matmul rather than end2end model testing.
@LeiWang1999 Anything else needed from my side? Thanks.
@tzj-fxz thanks, I'm working on it, the last few days have been busy.
I am trying to make bitblas quantized weights to work with vLLM's tensor parallelism. In vLLM, tensor parallelism is achieved with column parallelism and row parallelism.
Similar to the reference vLLM integration here qweight, scales and zeros have the following shapes, input dims and output dims:
Our vLLM bitblas integration can be found here.
Column Parallel
In column parallelism, parallelization is done along the weight's output dim and the outputs are concatenated along the output's output dim using an all gather operation. Testing this behavior with bitblas works as expected:
Row Parallel
In row parallelism, parallelization is done along weight's input dim (K) and reduced (summed) along the via all reduce (sum) operation.
The outputs from the following test is very different compared to without tensor parallel.
Is there a wrong assumption here regarding the layout and/or packing? Maybe the zeros and scales are not correctly split? Appreciate your help. Thanks.