Skip to content

Commit

Permalink
Fix documentation for generator, vector DB and reranker modules (#95)
Browse files Browse the repository at this point in the history
* include init.py file in root directory for correct package installation

* fix platform arg in OpenAI usage

* Update README.md

* update doc for GPU usage

* update doc for GPU usage

* Update README.md

* Update README.md

* formatting

* Update README.md

---------

Co-authored-by: Shuai Zhang <cheungdaven@gmail.com>
  • Loading branch information
shreyash2106 and cheungdaven authored Dec 18, 2024
1 parent 3d6f2b0 commit ff09ce3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/agrag/modules/generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ generator:
generator_model_platform_args: Additional platform-specific parameters to use when initializing the model, generating text, etc.
num_gpus: Number of GPUs to use for generating responses (default is 0).
num_gpus: Number of GPUs to use for generating responses. If no value is provided, the maximum available GPUs will be used. Otherwise, the minimum of the provided value and maximum available GPUs will be used.
generator_query_prefix: Prefix to add to each query that will be passed into the generator.
generator_query_prefix: Prefix to be added to each query that will be passed into the generator.
```

#### `generator_model_platform_args` structure
If you are using `huggingface` platform, the arguments must be structured as:
If you are using `openai` platform, the arguments must be structured as:
```python
generator_model_platform_args = {
"gpt_generate_params": {}, #Additional parameters to pass to the OpenAI GPT model's `create` method.
Expand Down
3 changes: 2 additions & 1 deletion src/agrag/modules/retriever/rerankers/reranker.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class Reranker:
batch_size : int
The size of the batch. If you have limited CUDA memory, decrease the size of the batch (default is 64).
num_gpus: int
Number of GPUs to use for reranking.
Number of GPUs to use for generating responses. If no value is provided, the maximum available GPUs will be used.
Otherwise, the minimum of the provided value and maximum available GPUs will be used.
top_k: int,
The top-k documents to use as context for generation (default is 10).
**kwargs : dict
Expand Down
2 changes: 1 addition & 1 deletion src/agrag/modules/vector_db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ vector_db:
metadata_index_load_path: The path to an existing, stored Metadata JSON file. This can be a local path or an S3 path.
Note that we do not support using an existing Milvus database
num_gpus: Number of GPUs to use when building the index
num_gpus: Number of GPUs to use for generating responses. If no value is provided, the maximum available GPUs will be used. Otherwise, the minimum of the provided value and maximum available GPUs will be used.
metadata: Metadata for each embedding stored in the database
Expand Down

0 comments on commit ff09ce3

Please sign in to comment.