Git Product home page Git Product logo

cutlass_fpa_intb_gemm's People

Contributors

cyx-6 avatar junrushao avatar masahi avatar vinx13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cutlass_fpa_intb_gemm's Issues

Test example

Would you plan to provide any test example of this kernel in the future which will be very helpful?
I have observed that some recent SOTA work like GPTQ and AWQ have used 4/3 bit weight-only quantization, so I wonder if I can use the kernel in this repo to do 4bit weight-only quantization.

compute result problem

This work is awesome, and I hope to ask for more details about using. Have you tested the accuracy or are there any test cases, because I don't know if I use this correctly. Below is my wrapper for gemm_fp16_int_bias_act . I get weird result such as nan but the torch output is correct in the same case.

void fpA_intB_gemm_forward_cuda(torch::Tensor &input,
                                torch::Tensor &weight,
                                torch::Tensor &scale,
                                torch::Tensor &output,
                                int m, int n, int k)
{
    c10::cuda::CUDAGuard device_guard(input.device());
    const fastertransformer::half *input_ptr = reinterpret_cast<fastertransformer::half *>(input.data_ptr());
    const uint8_t *weight_ptr = reinterpret_cast<const uint8_t *>(weight.data_ptr());
    const fastertransformer::half *scale_ptr = reinterpret_cast<fastertransformer::half *>(scale.data_ptr());
    fastertransformer::half *output_ptr = reinterpret_cast<fastertransformer::half *>(output.data_ptr());

    fastertransformer::gemm_fp16_int_bias_act(
        input_ptr,
        weight_ptr,
        scale_ptr,
        nullptr,
        output_ptr,
        std::nullopt,
        m, n, k,
        0,
        nullptr,
        0,
        0);
}

Question about INT4 weight only GEMM

Thank you for your excellent work.

May I ask if this project fully supports int4 weight-only quantized inference, such as AWQ's group-wise int4 quantization?

I've seen some features related to int4

if (group_size != 64 && group_size != 128)

T in {half, __nv_bfloat} WeightType in {int8_t, cutlass::uint4b_t}

but I'm not sure how to use them specifically.

Windows-compatible

Have you tested the code for compatibility in the Windows environment? Can you publish a Windows-compatible version?

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.