Skip to content

preallocate kv cache - #1

Open
Ben-Salmon wants to merge 1 commit into
mainfrom
lv_cache_fix
Open

preallocate kv cache#1
Ben-Salmon wants to merge 1 commit into
mainfrom
lv_cache_fix

Conversation

@Ben-Salmon

Copy link
Copy Markdown

The key and value cache was being allocated in a way that caused a memory fragmentation problem. Memory would accumulate after each reverse pass call.

Now that KV cache is preallocated as one big tensor at the start of each reverse pass. This means memory is properly freed up after at the end of a reverse pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant