Update llama.py

This commit is contained in:
Daniel Han 2025-02-02 03:57:24 -08:00
commit 6364232757

View file

@ -937,7 +937,7 @@ def LlamaModel_fast_forward_inference(
next_decoder_cache = []
residual = torch.empty_like(X)
print(bsz, q_len, hd)
_XX = torch.empty((2, bsz, q_len, hd), dtype = torch.float32)
_XX = torch.empty((2, bsz, q_len, hd), dtype = torch.float32, device = "cuda:0")
XX, XX2 = _XX[0], _XX[1]
variance = torch.empty((bsz, q_len, 1), dtype = torch.float32, device = "cuda:0")
temp_mlp = torch.empty((2, bsz, 1, mlp_size), dtype = X.dtype, device = "cuda:0")