File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -738,12 +738,10 @@ int llama_context::encode(const llama_batch & batch_inp) {
738
738
739
739
const uint32_t n_tokens = batch.n_tokens ;
740
740
741
- const auto & hparams = model.hparams ;
742
-
743
741
GGML_ASSERT ((!batch.token && batch.embd ) || (batch.token && !batch.embd )); // NOLINT
744
742
745
743
// micro-batching is not possible for non-causal encoding, so we process the batch in a single shot
746
- GGML_ASSERT (cparams.n_ubatch >= ( uint32_t ) n_tokens && " encoder requires n_ubatch >= n_tokens" );
744
+ GGML_ASSERT (cparams.n_ubatch >= n_tokens && " encoder requires n_ubatch >= n_tokens" );
747
745
748
746
if (t_compute_start_us == 0 ) {
749
747
t_compute_start_us = ggml_time_us ();
@@ -754,6 +752,8 @@ int llama_context::encode(const llama_batch & batch_inp) {
754
752
755
753
n_queued_tokens += n_tokens;
756
754
755
+ const auto & hparams = model.hparams ;
756
+
757
757
const int64_t n_embd = hparams.n_embd ;
758
758
759
759
llama_sbatch sbatch = llama_sbatch (batch, n_embd, /* simple_split */ true );
You can’t perform that action at this time.
0 commit comments