💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Documentation update
davidmezzetti944e2afe4959
diff --git a/docs/workflow/retrieve.md b/docs/workflow/retrieve.mdindex 36eaaef2..6241b84f 100644--- a/docs/workflow/retrieve.md+++ b/docs/workflow/retrieve.md@@ -8,3 +8,4 @@ workflow(["https://file.to.download", "/local/file/to/copy"])```::: txtai.workflow.RetrieveTask.__init__+::: txtai.workflow.RetrieveTask.registerdiff --git a/docs/workflow/service.md b/docs/workflow/service.mdindex 158c0fb6..09668784 100644--- a/docs/workflow/service.md+++ b/docs/workflow/service.md@@ -8,3 +8,4 @@ workflow(["parameter"])```::: txtai.workflow.ServiceTask.__init__+::: txtai.workflow.ServiceTask.registerdiff --git a/docs/workflow/task.md b/docs/workflow/task.mdindex c9e1b892..a6b7cab2 100644--- a/docs/workflow/task.md+++ b/docs/workflow/task.md@@ -30,6 +30,18 @@ list(workflow(["Very long text here"]))::: txtai.workflow.Task.__init__+## Multi-action task concurrency++The default processing mode is to run actions sequentially. Multiprocessing support is already built in at a number of levels. Any of the GPU models will maximize GPU utilization for example and even in CPU mode, concurrency is utilized. But there are still use cases for task action concurrency. For example, if the system has multiple GPUs, the task runs external sequential code, or the task has a large number of I/O tasks.++In addition to sequential processing, multi-action tasks can run either multithreaded or with multiple processes. The advantages of each approach are discussed below.++- *multithreading* - no overhead of creating separate processes or pickling data. But Python can only execute a single thread due the GIL, so this approach won't help with CPU bound actions. This method works well with I/O bound actions and GPU actions.++- *multiprocessing* - separate subprocesses are created and data is exchanged via pickling. This method can fully utilize all CPU cores since each process runs independently. This method works well with CPU bound actions.++More information on multiprocessing can be found in the [Python documentation](https://docs.python.org/3/library/multiprocessing.html).+## Multi-action task mergesMulti-action tasks will generate parallel outputs for the input data. The task output can be merged together in a couple different ways.