Skip to content

Commit

Permalink
docs: remove code snippet from llama-3-2-vision.md
Browse files Browse the repository at this point in the history
  • Loading branch information
danbev committed Jan 22, 2025
1 parent 453a487 commit 51f45d1
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions notes/llama.cpp/llama-3-2-vision.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,6 @@ This causes problems as there is a tensor that depend on the vocab size being
The image token needs to be in our models vocab, in `vocab.id_to_token` that is,
so that it is resolved correctly and the correct token id passed to the model.

For example, in `llama_decode_impl`:
```c++
if (n_outputs_new) {
GGML_ASSERT( n_outputs_prev + n_outputs_new <= n_outputs);
GGML_ASSERT((n_outputs_prev + n_outputs_new)*n_vocab <= (int64_t) lctx.logits_size);
ggml_backend_tensor_get_async(backend_res, res, logits_out, 0, n_outputs_new*(n_vocab)*sizeof(float));
}
```
So as far as I can tell we need to have the additional image token in the
actual vocab list, `id_to_token` in llama.cpp. The vocabulary size is determined
by calling:
Expand Down

0 comments on commit 51f45d1

Please sign in to comment.