Skip to content

Conversation

@mengniwang95
Copy link
Collaborator

Revert monkey patch code and update deepseek modeling file

if is_prefill:
latent_vec_k = latent_vec_k.unflatten(0, (block_indices.size(0), -1))
#latent_vec_v = latent_vec_v.unflatten(0, (block_indices.size(0), -1))
# print("latent_vec", latent_vec.shape)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this comments?

latent_vec_k = latent_vec_k[..., self.kv_lora_rank:]
k_cache = self.latent_cache_k(latent_vec_k, kv_cache[0], block_indices,
if is_prefill:
if kv_cache is not None and len(kv_cache) == 2:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this condition can be checked first, above if is_prefill

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.

3 participants