Skip to content

Support for KV Cache #39

@ml-inory

Description

@ml-inory

In auto regressive models like transformers, kv cache outputs are reused in inputs. In this situation, we could speed up inference speed by directly memcpy kv cache outputs' virtual address to kv cache's inputs, rather than copying to numpy objects then copying to model inputs.

Similar ideas from genai

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions