Initialize v_cache to avoid NaNs (#12)

This commit is contained in:
Yang, Bo 2023-08-23 14:23:59 -07:00 committed by GitHub
parent 2fda8fe812
commit 072f267cc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -53,8 +53,9 @@ class CacheManager:
dtype=dtype,
device=device,
),
torch.empty(
torch.full(
(num_blocks, num_heads, head_size, self.block_size),
self.v_cache_initial_value,
dtype=dtype,
device=device,
),