llama.cpp/src
Daniel Bevenius c80a7759da
vocab : add special infill tokens for CodeLlama (#11850)
* vocab : add special infill tokens for CodeLlama

The commit adds the following special tokens for CodeLlama infill:
- `▁<PRE>`
- `▁<SUF>`
- `▁<MID>`

The motivation for this is that currently the infill example uses
CodeLlama as a suggested model. But when using this model the following
error is generated:
```console
/llama.cpp-debug/examples/infill/infill.cpp:165: GGML_ASSERT(llama_vocab_fim_pre(vocab) >= 0) failed

Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No stack.
The program is not being run.
305251 Aborted                 (core dumped)
./build/bin/llama-infill -t 10 -ngl 0 -m models/codellama-13b.Q5_K_S.gguf \
  -c 4096 --temp 0.7 --repeat_penalty 1.1 -n 20 \
  --in-prefix "def helloworld():\n    print(\"hell" \
  --in-suffix "\n   print(\"goodbye world\")\n    "
```

* squash! vocab : add special infill tokens for CodeLlama

Add _<EOT> as well.
2025-03-31 18:40:56 +02:00
..
CMakeLists.txt llama : refactor llama_context, llama_kv_cache, llm_build_context (#12181) 2025-03-13 12:35:44 +02:00
llama-adapter.cpp llama : make loras compatible with repacking (#12593) 2025-03-27 08:24:10 +02:00
llama-adapter.h llama : refactor llama_context, llama_kv_cache, llm_build_context (#12181) 2025-03-13 12:35:44 +02:00
llama-arch.cpp llama : support BailingMoE (Ling) (#12634) 2025-03-30 22:21:03 +02:00
llama-arch.h llama : support BailingMoE (Ling) (#12634) 2025-03-30 22:21:03 +02:00
llama-batch.cpp llama : refactor `src/llama.cpp` (#10902) 2025-01-03 10:18:53 +02:00
llama-batch.h llama : refactor llama_context, llama_kv_cache, llm_build_context (#12181) 2025-03-13 12:35:44 +02:00
llama-chat.cpp llama : support BailingMoE (Ling) (#12634) 2025-03-30 22:21:03 +02:00
llama-chat.h llama : support BailingMoE (Ling) (#12634) 2025-03-30 22:21:03 +02:00
llama-context.cpp llama : fix non-causal mask for gemma 3 (#12615) 2025-03-30 00:07:37 +01:00
llama-context.h Load all MoE experts during warmup (#11571) 2025-03-14 13:47:05 +01:00
llama-cparams.cpp llama : refactor `src/llama.cpp` (#10902) 2025-01-03 10:18:53 +02:00
llama-cparams.h Load all MoE experts during warmup (#11571) 2025-03-14 13:47:05 +01:00
llama-grammar.cpp `tool-call`: fix Qwen 2.5 Coder support, add micro benchmarks, support trigger patterns for lazy grammars (#12034) 2025-03-05 13:05:13 +00:00
llama-grammar.h `tool-call`: fix Qwen 2.5 Coder support, add micro benchmarks, support trigger patterns for lazy grammars (#12034) 2025-03-05 13:05:13 +00:00
llama-graph.cpp llama : fix non-causal mask for gemma 3 (#12615) 2025-03-30 00:07:37 +01:00
llama-graph.h graph : normalize Q, K, V shapes + sync cross attention (#12449) 2025-03-18 21:35:19 +02:00
llama-hparams.cpp hparams : add SWA rope parameters (#12374) 2025-03-14 09:03:24 +02:00
llama-hparams.h llama: Add support for RWKV v7 architecture (#12412) 2025-03-18 07:27:50 +08:00
llama-impl.cpp GGUF: C++ refactor, backend support, misc fixes (#11030) 2025-01-07 18:01:58 +01:00
llama-impl.h cleanup: fix compile warnings associated with gnu_printf (#11811) 2025-02-12 10:06:53 -04:00
llama-io.cpp llama : refactor llama_context, llama_kv_cache, llm_build_context (#12181) 2025-03-13 12:35:44 +02:00
llama-io.h llama : refactor llama_context, llama_kv_cache, llm_build_context (#12181) 2025-03-13 12:35:44 +02:00
llama-kv-cache.cpp llama : refactor llama_context, llama_kv_cache, llm_build_context (#12181) 2025-03-13 12:35:44 +02:00
llama-kv-cache.h llama : refactor llama_context, llama_kv_cache, llm_build_context (#12181) 2025-03-13 12:35:44 +02:00
llama-memory.cpp llama : refactor llama_context, llama_kv_cache, llm_build_context (#12181) 2025-03-13 12:35:44 +02:00
llama-memory.h llama : refactor llama_context, llama_kv_cache, llm_build_context (#12181) 2025-03-13 12:35:44 +02:00
llama-mmap.cpp mmap : skip resource limit checks on AIX (#12541) 2025-03-24 12:17:10 +02:00
llama-mmap.h llama-mmap: fix missing include (#11796) 2025-02-10 20:58:18 +02:00
llama-model-loader.cpp llama : minor fixes for up llama load model speed (#11448) 2025-01-27 14:42:09 +01:00
llama-model-loader.h llama : add `llama_model_load_from_splits` (#11255) 2025-01-16 13:54:08 +01:00
llama-model.cpp llama : support BailingMoE (Ling) (#12634) 2025-03-30 22:21:03 +02:00
llama-model.h llama : support BailingMoE (Ling) (#12634) 2025-03-30 22:21:03 +02:00
llama-quant.cpp llama: Add support for RWKV v7 architecture (#12412) 2025-03-18 07:27:50 +08:00
llama-quant.h llama : refactor `src/llama.cpp` (#10902) 2025-01-03 10:18:53 +02:00
llama-sampling.cpp llama: fix error on bad grammar (#12628) 2025-03-28 18:08:52 +01:00
llama-sampling.h llama : add `llama_vocab`, functions -> methods, naming (#11110) 2025-01-12 11:32:42 +02:00
llama-vocab.cpp vocab : add special infill tokens for CodeLlama (#11850) 2025-03-31 18:40:56 +02:00
llama-vocab.h llama : remove notion of CLS token (#11064) 2025-01-12 12:15:53 +02:00
llama.cpp llama : refactor llama_context, llama_kv_cache, llm_build_context (#12181) 2025-03-13 12:35:44 +02:00
unicode-data.cpp server : better security control for public deployments (#9776) 2024-10-08 13:27:04 +02:00
unicode-data.h llama : reduce compile time and binary size (#9712) 2024-10-02 15:49:55 +02:00
unicode.cpp repo : update links to new url (#11886) 2025-02-15 16:40:57 +02:00
unicode.h unicode : improve naming style (#10838) 2024-12-16 12:31:45 +02:00