Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

values.yaml 4.6KB

Feat: make document parsing and embedding batch sizes configurable via environment variables (#8266) ### Description This PR introduces two new environment variables, ‎`DOC_BULK_SIZE` and ‎`EMBEDDING_BATCH_SIZE`, to allow flexible tuning of batch sizes for document parsing and embedding vectorization in RAGFlow. By making these parameters configurable, users can optimize performance and resource usage according to their hardware capabilities and workload requirements. ### What problem does this PR solve? Previously, the batch sizes for document parsing and embedding were hardcoded, limiting the ability to adjust throughput and memory consumption. This PR enables users to set these values via environment variables (in ‎`.env`, Helm chart, or directly in the deployment environment), improving flexibility and scalability for both small and large deployments. - ‎`DOC_BULK_SIZE`: Controls how many document chunks are processed in a single batch during document parsing (default: 4). - ‎`EMBEDDING_BATCH_SIZE`: Controls how many text chunks are processed in a single batch during embedding vectorization (default: 16). This change updates the codebase, documentation, and configuration files to reflect the new options. ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [x] Documentation Update - [ ] Refactoring - [x] Performance Improvement - [ ] Other (please describe): ### Additional context - Updated ‎`.env`, ‎`helm/values.yaml`, and documentation to describe the new variables. - Modified relevant code paths to use the environment variables instead of hardcoded values. - Users can now tune these parameters to achieve better throughput or reduce memory usage as needed. Before: Default value: <img width="643" alt="image" src="https://github.com/user-attachments/assets/086e1173-18f3-419d-a0f5-68394f63866a" /> After: 10x: <img width="777" alt="image" src="https://github.com/user-attachments/assets/5722bbc0-0bcb-4536-b928-077031e550f1" />
4 meses atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. # Based on docker compose .env file
  2. env:
  3. # The type of doc engine to use.
  4. # Available options:
  5. # - `elasticsearch` (default)
  6. # - `infinity` (https://github.com/infiniflow/infinity)
  7. # DOC_ENGINE: elasticsearch
  8. DOC_ENGINE: infinity
  9. # The version of Elasticsearch.
  10. STACK_VERSION: "8.11.3"
  11. # The password for Elasticsearch
  12. ELASTIC_PASSWORD: infini_rag_flow_helm
  13. # The password for MySQL
  14. MYSQL_PASSWORD: infini_rag_flow_helm
  15. # The database of the MySQL service to use
  16. MYSQL_DBNAME: rag_flow
  17. # The username for MinIO.
  18. MINIO_ROOT_USER: rag_flow
  19. # The password for MinIO
  20. MINIO_PASSWORD: infini_rag_flow_helm
  21. # The password for Redis
  22. REDIS_PASSWORD: infini_rag_flow_helm
  23. # The RAGFlow Docker image to download.
  24. # Defaults to the v0.19.1-slim edition, which is the RAGFlow Docker image without embedding models.
  25. RAGFLOW_IMAGE: infiniflow/ragflow:v0.19.1-slim
  26. #
  27. # To download the RAGFlow Docker image with embedding models, uncomment the following line instead:
  28. # RAGFLOW_IMAGE: infiniflow/ragflow:v0.19.1
  29. #
  30. # The Docker image of the v0.19.1 edition includes:
  31. # - Built-in embedding models:
  32. # - BAAI/bge-large-zh-v1.5
  33. # - BAAI/bge-reranker-v2-m3
  34. # - maidalun1020/bce-embedding-base_v1
  35. # - maidalun1020/bce-reranker-base_v1
  36. # - Embedding models that will be downloaded once you select them in the RAGFlow UI:
  37. # - BAAI/bge-base-en-v1.5
  38. # - BAAI/bge-large-en-v1.5
  39. # - BAAI/bge-small-en-v1.5
  40. # - BAAI/bge-small-zh-v1.5
  41. # - jinaai/jina-embeddings-v2-base-en
  42. # - jinaai/jina-embeddings-v2-small-en
  43. # - nomic-ai/nomic-embed-text-v1.5
  44. # - sentence-transformers/all-MiniLM-L6-v2
  45. #
  46. #
  47. # The local time zone.
  48. TIMEZONE: "Asia/Shanghai"
  49. # Uncomment the following line if you have limited access to huggingface.co:
  50. # HF_ENDPOINT: https://hf-mirror.com
  51. # The maximum file size for each uploaded file, in bytes.
  52. # You can uncomment this line and update the value if you wish to change 128M file size limit
  53. # MAX_CONTENT_LENGTH: "134217728"
  54. # After making the change, ensure you update `client_max_body_size` in nginx/nginx.conf correspondingly.
  55. # The number of document chunks processed in a single batch during document parsing.
  56. DOC_BULK_SIZE: 4
  57. # The number of text chunks processed in a single batch during embedding vectorization.
  58. EMBEDDING_BATCH_SIZE: 16
  59. ragflow:
  60. # Optional service configuration overrides
  61. # to be written to local.service_conf.yaml
  62. # inside the RAGFlow container
  63. # https://ragflow.io/docs/dev/configurations#service-configuration
  64. service_conf:
  65. # Optional yaml formatted override for the
  66. # llm_factories.json file inside the RAGFlow
  67. # container.
  68. llm_factories:
  69. # factory_llm_infos:
  70. # - name: OpenAI-API-Compatible
  71. # logo: ""
  72. # tags: "LLM,TEXT EMBEDDING,SPEECH2TEXT,MODERATION"
  73. # status: "1"
  74. # llm:
  75. # - llm_name: my-custom-llm
  76. # tags: "LLM,CHAT,"
  77. # max_tokens: 100000
  78. # model_type: chat
  79. # is_tools: false
  80. # Kubernetes configuration
  81. deployment:
  82. strategy:
  83. resources:
  84. service:
  85. # Use LoadBalancer to expose the web interface externally
  86. type: ClusterIP
  87. api:
  88. service:
  89. enabled: true
  90. type: ClusterIP
  91. infinity:
  92. image:
  93. repository: infiniflow/infinity
  94. tag: v0.6.0-dev3
  95. storage:
  96. className:
  97. capacity: 5Gi
  98. deployment:
  99. strategy:
  100. resources:
  101. service:
  102. type: ClusterIP
  103. elasticsearch:
  104. storage:
  105. className:
  106. capacity: 20Gi
  107. deployment:
  108. strategy:
  109. resources:
  110. requests:
  111. cpu: "4"
  112. memory: "16Gi"
  113. service:
  114. type: ClusterIP
  115. minio:
  116. image:
  117. repository: quay.io/minio/minio
  118. tag: RELEASE.2023-12-20T01-00-02Z
  119. storage:
  120. className:
  121. capacity: 5Gi
  122. deployment:
  123. strategy:
  124. resources:
  125. service:
  126. type: ClusterIP
  127. mysql:
  128. image:
  129. repository: mysql
  130. tag: 8.0.39
  131. storage:
  132. className:
  133. capacity: 5Gi
  134. deployment:
  135. strategy:
  136. resources:
  137. service:
  138. type: ClusterIP
  139. redis:
  140. image:
  141. repository: valkey/valkey
  142. tag: 8
  143. storage:
  144. className:
  145. capacity: 5Gi
  146. persistence:
  147. enabled: true
  148. deployment:
  149. strategy:
  150. resources:
  151. service:
  152. type: ClusterIP
  153. # This block is for setting up web service ingress. For more information, see:
  154. # https://kubernetes.io/docs/concepts/services-networking/ingress/
  155. ingress:
  156. enabled: false
  157. className: ""
  158. annotations: {}
  159. # kubernetes.io/ingress.class: nginx
  160. # kubernetes.io/tls-acme: "true"
  161. hosts:
  162. - host: chart-example.local
  163. paths:
  164. - path: /
  165. pathType: ImplementationSpecific
  166. tls: []
  167. # - secretName: chart-example-tls
  168. # hosts:
  169. # - chart-example.local