Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: Yu, Zhentao <[email protected]>
  • Loading branch information
zhentaoyu committed Mar 25, 2024
1 parent 804a556 commit a8f8cc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion neural_speed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def __call__(self, model_input, reinit=False, logits_all=False, **kwargs):
raw_logits[i] = np.vstack((padding_row * (-np.inf), raw_logits[i]))
else:
raw_logits[i] = np.vstack((raw_logits[i], padding_row * (-np.inf)))
return raw_logits
return np.array(raw_logits)
else:
print("Please input torch.Tensor")
return
Expand Down
2 changes: 1 addition & 1 deletion neural_speed/models/model_utils/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ bool Cont_batch_gen_worker::update_seqs(std::vector<sequence>* seqs, const int&
}
if (!m_ctx->beam_search) {
if (next_tokens.size() != n_input) {
fprintf(stderr, "%s: error: wrong next_tokens size %d, which should be %d.\n", __func__, next_tokens.size(),
fprintf(stderr, "%s: error: wrong next_tokens size %ld, which should be %d.\n", __func__, next_tokens.size(),
n_input);
return false;
}
Expand Down

0 comments on commit a8f8cc7

Please sign in to comment.