Processing longer-than-limit input #30470
fyy623
announced in
Ask Dosu (Archived)
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on an API that takes a long string to a
prompt | llm | output_parser
chain and generates content from it. The both the input and output are so long that I have to slice the input string into chunks, send them individually to the chain, and lastly merge them together. Since each chunk is independent and I do not need to worry about context retrieval, I am using a for loop to traverse the list, run the chain, and append the result of each round to my final answer one by one.This basically multiplies the execution time so I am trying to accelerate this process. I am aware that maybe multithread or patching processing is a feasible tactics but I'm not familiar to those and not sure if I fully understand them. It would be really helpful if you can provide me with some general guidelines on how to deal with this kind of issue and I am more than happy to do the rest of research myself: I just need a direction.
code's in Python btw
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions