mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
docs for batch size (#1082)
This commit is contained in:
parent
5e10e19bfe
commit
971458c5de
@ -365,6 +365,20 @@
|
||||
"chain({\"input_documents\": docs, \"question\": query}, return_only_outputs=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d943c6c1",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Batch Size**\n",
|
||||
"\n",
|
||||
"When using the `map_reduce` chain, one thing to keep in mind is the batch size you are using during the map step. If this is too high, it could cause rate limiting errors. You can control this by setting the batch size on the LLM used. Note that this only applies for LLMs with this parameter. Below is an example of doing so:\n",
|
||||
"\n",
|
||||
"```python\n",
|
||||
"llm = OpenAI(batch_size=5, temperature=0)\n",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5bf0e1ab",
|
||||
|
@ -356,6 +356,20 @@
|
||||
"chain({\"input_documents\": docs, \"question\": query}, return_only_outputs=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6391b7ab",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Batch Size**\n",
|
||||
"\n",
|
||||
"When using the `map_reduce` chain, one thing to keep in mind is the batch size you are using during the map step. If this is too high, it could cause rate limiting errors. You can control this by setting the batch size on the LLM used. Note that this only applies for LLMs with this parameter. Below is an example of doing so:\n",
|
||||
"\n",
|
||||
"```python\n",
|
||||
"llm = OpenAI(batch_size=5, temperature=0)\n",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6ea50ad0",
|
||||
|
Loading…
Reference in New Issue
Block a user