Use high priority stream for forward pass

This commit is contained in:
turboderp
2024-07-27 16:05:12 +02:00
parent 2de443c4c6
commit 036506f273
15 changed files with 114 additions and 77 deletions

View File

@@ -590,6 +590,7 @@ if args.speed:
logits = model.forward(ids[:, -1:], cache)
sample = torch.argmax(logits[0, -1]).cpu().unsqueeze(0).unsqueeze(0)
sample.clamp_(0, tokenizer.get_vocab_size() - 1)
ids = torch.cat((ids, sample), dim=-1)
time_end = time.time()