dspy icon indicating copy to clipboard operation
dspy copied to clipboard

Save kwargs for huggingface TGI model

Open GuyAglionby opened this issue 9 months ago • 2 comments

Previously, using HFClientTGI with BootstrapFewShot didn't work for max_rounds > 1. The culprit was:

File "<snip>/lib/python3.10/site-packages/dsp/modules/lm.py", line 84, in copy
    model = kwargs.pop('model')
KeyError: 'model'

This PR makes sure the relevant kwargs are saved (all are necessary)

Thanks!

GuyAglionby avatar Oct 17 '23 17:10 GuyAglionby

@okhat if this PR could be reviewed and merged would be amazing :)

darinkishore avatar Nov 05 '23 17:11 darinkishore

Same issue for OllamaLocal(LM), but just saving it to kwargs messes with the copy function of the LM class.

janpf avatar Feb 04 '24 14:02 janpf

Thanks @GuyAglionby ! just following up on old PRs :)

arnavsinghvi11 avatar Apr 13 '24 02:04 arnavsinghvi11