Merge branch 'upstream' into concedo_experimental

# Conflicts:
#	.github/workflows/docker.yml
#	CMakeLists.txt
#	CONTRIBUTING.md
#	docs/android.md
#	docs/docker.md
#	examples/embedding/embedding.cpp
#	examples/imatrix/imatrix.cpp
#	examples/infill/infill.cpp
#	examples/llama-bench/llama-bench.cpp
#	examples/main/README.md
#	examples/parallel/parallel.cpp
#	examples/perplexity/perplexity.cpp
#	examples/quantize-stats/quantize-stats.cpp
#	examples/save-load-state/save-load-state.cpp
#	examples/server/README.md
#	examples/simple/CMakeLists.txt
#	examples/speculative/speculative.cpp
#	flake.lock
#	ggml/src/CMakeLists.txt
#	ggml/src/ggml-blas.cpp
#	pocs/vdot/q8dot.cpp
#	pocs/vdot/vdot.cpp
#	scripts/debug-test.sh
#	scripts/sync-ggml.last
#	src/llama.cpp
#	tests/test-backend-ops.cpp
#	tests/test-chat-template.cpp
#	tests/test-quantize-fns.cpp
#	tests/test-quantize-perf.cpp
#	tests/test-tokenizer-0.cpp
#	tests/test-tokenizer-1-bpe.cpp
#	tests/test-tokenizer-1-spm.cpp
This commit is contained in:
Concedo 2024-10-11 11:59:59 +08:00
commit e692a79aab
61 changed files with 2579 additions and 1949 deletions

View file

@ -168,7 +168,7 @@ static std::string FileFormatTokenizeID(int id, FileFormat file_format, bool ret
}
else if(file_format == FileFormat::GGUF_GENERIC)
{
return std::string(llama_token_to_piece(llama_ctx_v4, id, return_special));
return std::string(common_token_to_piece(llama_ctx_v4, id, return_special));
}
else
{
@ -194,7 +194,7 @@ static void TokenizeString(const std::string & str_to_tokenize, std::vector<int>
}
else
{
output_tokens = ::llama_tokenize(llama_ctx_v4, str_to_tokenize, add_bos, true);
output_tokens = ::common_tokenize(llama_ctx_v4, str_to_tokenize, add_bos, true);
if(add_bos)
{
llama_token bostoadd = llama_token_bos(&(llama_ctx_v4->model));