]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
llama : add reranking support (#9510)
authorGeorgi Gerganov <redacted>
Sat, 28 Sep 2024 14:42:03 +0000 (17:42 +0300)
committerGitHub <redacted>
Sat, 28 Sep 2024 14:42:03 +0000 (17:42 +0300)
commitf4d2b8846a6b34419ff9e9491aee6cd95e444bfc
tree78f4539b86914c3ba7f569051659df514e67a821
parent1b2f992cd2cff0b69e5abe78bb8888d51ed19d67
llama : add reranking support (#9510)

* py : add XLMRobertaForSequenceClassification [no ci]

* py : fix scalar-tensor conversion [no ci]

* py : fix position embeddings chop [no ci]

* llama : read new cls tensors [no ci]

* llama : add classigication head (wip) [no ci]

* llama : add "rank" pooling type

ggml-ci

* server : add rerank endpoint

ggml-ci

* llama : aboud ggml_repeat during classification

* rerank : cleanup + comments

* server : accept /rerank endpoint in addition to /v1/rerank [no ci]

* embedding : parse special tokens

* jina : support v1 reranker

* vocab : minor style

ggml-ci

* server : initiate tests for later

ggml-ci

* server : add docs

* llama : add comment [no ci]

* llama : fix uninitialized tensors

* ci : add rerank tests

ggml-ci

* add reranking test

* change test data

* Update examples/server/server.cpp

Co-authored-by: Xuan Son Nguyen <redacted>
* add `--reranking` argument

* update server docs

* llama : fix comment [no ci]

ggml-ci

---------

Co-authored-by: Xuan Son Nguyen <redacted>
Co-authored-by: Xuan Son Nguyen <redacted>
18 files changed:
ci/run.sh
common/arg.cpp
common/common.cpp
common/common.h
convert_hf_to_gguf.py
convert_hf_to_gguf_update.py
examples/embedding/embedding.cpp
examples/server/README.md
examples/server/server.cpp
examples/server/tests/features/embeddings.feature
examples/server/tests/features/rerank.feature [new file with mode: 0644]
examples/server/tests/features/steps/steps.py
examples/server/utils.hpp
gguf-py/gguf/constants.py
gguf-py/gguf/tensor_mapping.py
include/llama.h
src/llama-vocab.cpp
src/llama.cpp