We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5554b9 commit bd8fa82Copy full SHA for bd8fa82
examples/batched.swift/Sources/main.swift
@@ -80,7 +80,8 @@ batch.n_tokens = Int32(tokens.count)
80
for (i, token) in tokens.enumerated() {
81
batch.token[i] = token
82
batch.pos[i] = Int32(i)
83
- batch.seq_id[i] = 0
+ batch.n_seq_id[i] = 1
84
+ batch.seq_id[i][0] = 0
85
batch.logits[i] = 0
86
}
87
@@ -169,7 +170,8 @@ while n_cur <= n_len {
169
170
// push this new token for next evaluation
171
batch.token[Int(batch.n_tokens)] = new_token_id
172
batch.pos[Int(batch.n_tokens)] = n_cur
- batch.seq_id[Int(batch.n_tokens)] = Int32(i)
173
+ batch.n_seq_id[Int(batch.n_tokens)] = 1
174
+ batch.seq_id[Int(batch.n_tokens)][0] = Int32(i)
175
batch.logits[Int(batch.n_tokens)] = 1
176
177
i_batch[i] = batch.n_tokens
0 commit comments