dspy icon indicating copy to clipboard operation
dspy copied to clipboard

Sub-module Compile With Different Settings

Open etwk opened this issue 6 months ago • 1 comments

Sub-modules might need different compile settings. For example, suppose we have a sub-module that summarizes a list of contexts, we may want to set max_bootstrapped_demos and max_labeled_demos of the main module higher to increase accuracy but not this sub-module, because the contexts might be very long and LLM has token limits.

I understand that we can set sub-module._compiled = True to exclude it from compiling completely. Yet compile might increase accuracy of the sub-module. We can move the sub-module out and compile it separately, but there will be more works including prepare training data.

Do we have a plan to add features to customize the compile settings of individual sub-modules?

Is it a good idea to move some sub-modules out and compile them separately?

Thanks.

etwk avatar Aug 22 '24 10:08 etwk