parallel.feature 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. @llama.cpp
  2. @parallel
  3. Feature: Parallel
  4. Background: Server startup
  5. Given a server listening on localhost:8080
  6. And a model file tinyllamas/split/stories15M-00001-of-00003.gguf from HF repo ggml-org/models
  7. And a model file test-model-00001-of-00003.gguf
  8. And 42 as server seed
  9. And 128 as batch size
  10. And 256 KV cache size
  11. And 2 slots
  12. And continuous batching
  13. Then the server is starting
  14. Then the server is healthy
  15. Scenario Outline: Multi users completion
  16. Given a prompt:
  17. """
  18. Write a very long story about AI.
  19. """
  20. And a prompt:
  21. """
  22. Write another very long music lyrics.
  23. """
  24. And <n_predict> max tokens to predict
  25. Given concurrent completion requests
  26. Then the server is busy
  27. Then the server is idle
  28. And all slots are idle
  29. Then all prompts are predicted with <n_predict> tokens
  30. Examples:
  31. | n_predict |
  32. | 128 |
  33. Scenario Outline: Multi users OAI completions compatibility
  34. Given a system prompt You are a writer.
  35. And a model tinyllama-2
  36. Given a prompt:
  37. """
  38. Write a very long book.
  39. """
  40. And a prompt:
  41. """
  42. Write another a poem.
  43. """
  44. And <n_predict> max tokens to predict
  45. And streaming is <streaming>
  46. Given concurrent OAI completions requests
  47. Then the server is busy
  48. Then the server is idle
  49. Then all prompts are predicted with <n_predict> tokens
  50. Examples:
  51. | streaming | n_predict |
  52. | disabled | 128 |
  53. | enabled | 64 |
  54. Scenario Outline: Multi users OAI completions compatibility no v1
  55. Given a system prompt You are a writer.
  56. And a model tinyllama-2
  57. Given a prompt:
  58. """
  59. Write a very long book.
  60. """
  61. And a prompt:
  62. """
  63. Write another a poem.
  64. """
  65. And <n_predict> max tokens to predict
  66. And streaming is <streaming>
  67. Given concurrent OAI completions requests no v1
  68. Then the server is busy
  69. Then the server is idle
  70. Then all prompts are predicted with <n_predict> tokens
  71. Examples:
  72. | streaming | n_predict |
  73. | disabled | 128 |
  74. | enabled | 64 |
  75. Scenario Outline: Multi users with number of prompts exceeding number of slots
  76. Given a system prompt You are a writer.
  77. And a model tinyllama-2
  78. Given a prompt:
  79. """
  80. Write a very long book.
  81. """
  82. And a prompt:
  83. """
  84. Write another a poem.
  85. """
  86. And a prompt:
  87. """
  88. What is LLM?
  89. """
  90. And a prompt:
  91. """
  92. The sky is blue and I love it.
  93. """
  94. And <n_predict> max tokens to predict
  95. And streaming is <streaming>
  96. Given concurrent OAI completions requests
  97. Then the server is busy
  98. Then the server is idle
  99. Then all prompts are predicted with <n_predict> tokens
  100. Examples:
  101. | streaming | n_predict |
  102. | disabled | 128 |
  103. | enabled | 64 |
  104. Scenario: Multi users with total number of tokens to predict exceeds the KV Cache size #3969
  105. Given a prompt:
  106. """
  107. Write a very long story about AI.
  108. """
  109. And a prompt:
  110. """
  111. Write another very long music lyrics.
  112. """
  113. And a prompt:
  114. """
  115. Write a very long poem.
  116. """
  117. And a prompt:
  118. """
  119. Write a very long joke.
  120. """
  121. And 128 max tokens to predict
  122. Given concurrent completion requests
  123. Then the server is busy
  124. Then the server is idle
  125. Then all prompts are predicted