llama : simplify causal mask condition
ggml-ci
This commit is contained in:
parent
fc9af156ff
commit
c23c554744
1 changed files with 1 additions and 2 deletions
|
@ -8045,8 +8045,7 @@ static void llama_set_inputs(llama_context & lctx, const llama_batch & batch) {
|
|||
|
||||
for (int i = 0; i < n_kv; ++i) {
|
||||
float f;
|
||||
if (!lctx.kv_self.cells[i].has_seq_id(seq_id) ||
|
||||
(hparams.causal_attn && lctx.kv_self.cells[i].pos > pos)) {
|
||||
if (!lctx.kv_self.cells[i].has_seq_id(seq_id) || lctx.kv_self.cells[i].pos > pos) {
|
||||
f = -INFINITY;
|
||||
} else {
|
||||
f = 0.0f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue