]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
llama : refactor sampling v2 (#9294)
authorGeorgi Gerganov <redacted>
Sat, 7 Sep 2024 12:16:19 +0000 (15:16 +0300)
committerGitHub <redacted>
Sat, 7 Sep 2024 12:16:19 +0000 (15:16 +0300)
commitdf270ef74596da8f1178f08991f4c51f18c9ee82
tree98a30cd09b30d1c059e6bacf3f0de11debc61032
parent947538acb8617756a092042ff7e58db18dde05ec
llama : refactor sampling v2 (#9294)

- Add `struct llama_sampler` and `struct llama_sampler_i`
- Add `llama_sampler_` API
- Add `llama_sampler_chain_` API for chaining multiple samplers
- Remove `LLAMA_API_INTERNAL`
- Add `llama_perf_` API and remove old `llama_print_timings` and `llama_reset_timings`
48 files changed:
Makefile
common/CMakeLists.txt
common/common.cpp
common/common.h
common/grammar-parser.cpp [deleted file]
common/grammar-parser.h [deleted file]
common/sampling.cpp
common/sampling.h
examples/batched-bench/batched-bench.cpp
examples/batched.swift/Sources/main.swift
examples/batched/batched.cpp
examples/embedding/embedding.cpp
examples/eval-callback/eval-callback.cpp
examples/gbnf-validator/gbnf-validator.cpp
examples/gritlm/gritlm.cpp
examples/imatrix/imatrix.cpp
examples/infill/infill.cpp
examples/llama-bench/llama-bench.cpp
examples/llama.android/llama/src/main/cpp/llama-android.cpp
examples/llama.swiftui/llama.cpp.swift/LibLlama.swift
examples/llava/llava-cli.cpp
examples/llava/minicpmv-cli.cpp
examples/lookahead/lookahead.cpp
examples/lookup/lookup.cpp
examples/main/main.cpp
examples/parallel/parallel.cpp
examples/passkey/passkey.cpp
examples/perplexity/perplexity.cpp
examples/quantize-stats/quantize-stats.cpp
examples/retrieval/retrieval.cpp
examples/save-load-state/save-load-state.cpp
examples/server/README.md
examples/server/server.cpp
examples/simple/simple.cpp
examples/speculative/speculative.cpp
include/llama.h
src/llama-grammar.cpp
src/llama-grammar.h
src/llama-impl.h
src/llama-sampling.cpp
src/llama-sampling.h
src/llama-vocab.h
src/llama.cpp
tests/test-grammar-integration.cpp
tests/test-grammar-parser.cpp
tests/test-json-schema-to-grammar.cpp
tests/test-llama-grammar.cpp
tests/test-sampling.cpp