rerank.feature 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. @llama.cpp
  2. @rerank
  3. Feature: llama.cpp server
  4. Background: Server startup
  5. Given a server listening on localhost:8080
  6. And a model url https://huggingface.co/ggml-org/models/resolve/main/jina-reranker-v1-tiny-en/ggml-model-f16.gguf
  7. And a model file jina-reranker-v1-tiny-en.gguf
  8. And a model alias jina-reranker-v1-tiny-en
  9. And 42 as server seed
  10. And 2 slots
  11. And 512 as batch size
  12. And 512 as ubatch size
  13. And 512 KV cache size
  14. And enable reranking endpoint
  15. Then the server is starting
  16. Then the server is healthy
  17. Scenario: Rerank
  18. Given a rerank query:
  19. """
  20. Machine learning is
  21. """
  22. And a rerank document:
  23. """
  24. A machine is a physical system that uses power to apply forces and control movement to perform an action. The term is commonly applied to artificial devices, such as those employing engines or motors, but also to natural biological macromolecules, such as molecular machines.
  25. """
  26. And a rerank document:
  27. """
  28. Learning is the process of acquiring new understanding, knowledge, behaviors, skills, values, attitudes, and preferences. The ability to learn is possessed by humans, non-human animals, and some machines; there is also evidence for some kind of learning in certain plants.
  29. """
  30. And a rerank document:
  31. """
  32. Machine learning is a field of study in artificial intelligence concerned with the development and study of statistical algorithms that can learn from data and generalize to unseen data, and thus perform tasks without explicit instructions.
  33. """
  34. And a rerank document:
  35. """
  36. Paris, capitale de la France, est une grande ville européenne et un centre mondial de l'art, de la mode, de la gastronomie et de la culture. Son paysage urbain du XIXe siècle est traversé par de larges boulevards et la Seine.
  37. """
  38. When reranking request
  39. Then reranking results are returned
  40. Then reranking highest score is index 2 and lowest score is index 3