Giter Site home page Giter Site logo

liangan1 / fbgemm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pytorch/fbgemm

0.0 0.0 0.0 1.02 MB

FB (Facebook) + GEMM (General Matrix-Matrix Multiplication) - https://code.fb.com/ml-applications/fbgemm/

License: Other

CMake 1.58% C++ 98.35% C 0.07%

fbgemm's Introduction

Welcom to Liangang's Github

Liangang is an AI framework engineer in Intel and now is working on the LLM inference optimization.

My Contributons in Github

Tensor Parallel for LLM

Implementate the tensor parallel from the scratch and use Shared Memory based All-reduce to speedup.

PagedAttention

This kernel enables the flash decoding based the paged kv cache and it has been used in the vllm repository.

Indirect Access KV Cache

Indirect Access KV_cache (IAKV) is a similar solution to PagedAttention and it is used to reduce the memory overheads caused by the KV cache. Firstly, IAKV pre-allocates buffers (key and value use different buffer) to store all key/value hidden states and beam index information, the data format is shown in the following left figure (beam_width=4 in this case) and token state of key (value) in every timestamp will be store in this pre-allocated buffer. Secondly, we can use beam index history which is shown in the following right figure to decide which beam should be used by a timestamp and this information will generate a offset to access the kv_cache buffer which means that the reorder_cache and concat overheads will be eliminated by this way.

Data Layout of KV Cache Beam index history

Rotary Position Embeeding

Support multple LLM models. e.g., lamma/gpt-neox/falcon/GPT-J 6B/CodeGen/ChatGLM...

More contiributions can be found here

My Publications and Talks

基于至强处理器的AI软件生态

A Novel Scale-Out Training Solution for Deep Learning Recommender Systems

fbgemm's People

Contributors

amylittleyang avatar dhpollack avatar dskhudia avatar efiks avatar evhunter avatar ezyang avatar houseroad avatar jaewonlee-fb avatar jianyuh avatar jspark1105 avatar lifeiteng avatar williamtambellini avatar xiaomengy avatar zlateski avatar zpao avatar zrphercule avatar

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.