distilabel icon indicating copy to clipboard operation
distilabel copied to clipboard

[FEATURE] Single request caching

Open bjoernpl opened this issue 10 months ago • 0 comments

Is your feature request related to a problem? Please describe. Currently, the caching system only works for full batches and doesn't seem to work across code changes. I think it would be very valuable to have the option of caching individual LLM requests (with Redis or something similar) so that repeated experiments don't require repeated execution and one can easily resume if something failed along the way even if code changes were necessary but the prompt/params didn't change.

Describe the solution you'd like With some flag for the LLM such as cache_requests I would like individual requests to be cached.

Additional context Litellm for example has a caching feature that I couldn't get to work with this library even when using the LiteLLM LLM wrapper. This can serve as reference though. I think it would be great to have this available on all LLM providers.

bjoernpl avatar Apr 25 '24 21:04 bjoernpl