Coder Social home page Coder Social logo

how to use hf client about dspy HOT 9 CLOSED

stanfordnlp avatar stanfordnlp commented on July 22, 2024
how to use hf client

from dspy.

Comments (9)

okhat avatar okhat commented on July 22, 2024 1

You’re right about this. We are pushing a number of fixes for HF server and clients soon. We’re just starting to play with them — expect many rough edges for a couple of weeks, but then should become something stable

from dspy.

ColinS97 avatar ColinS97 commented on July 22, 2024

Update: I just figured out the reason it is not working was somehow related to my usage of ngrok, if I have the the server and client running on the same machine it works fine. I will try to get it running through ngrok as well now.

from dspy.

okhat avatar okhat commented on July 22, 2024

Thanks for looking into this! This HF side of DSP is not very mature right now, so let us know if you face any issues. The FLAN models may not be ideal here based on our initial testing

from dspy.

ColinS97 avatar ColinS97 commented on July 22, 2024

Why are the FLAN models not ideal? Just because they lack the "emergent abilities" to really make use of DSP programs or some technical reason? I wasn't planning on using FLAN for my experiments but Llama and Open Assistant type models. So I am wondering if there is anything i should watch out for.

from dspy.

okhat avatar okhat commented on July 22, 2024

Yeah, you may see better results with decoder-only models, like the ones you mentioned, especially if you use closed LLMs as the demonstrator. We’ll share more soon

from dspy.

ColinS97 avatar ColinS97 commented on July 22, 2024

Very nice, I am excited to see you further progress.
(I hope "compiling" LoRa adapters on consumer GPUs is somewhere on your roadmap, since that would be a really exciting feature for me)

In my fork of DSP I have now adapted the hf_client.py a little bit so that you can pass an ngrok url to the object and it will just work with the hf_server.py.

This is very useful for me since I am serving the models in a HPC cluster an then ngrok them out to the public internet so I can access my models from any device so I think this may be useful for others as well :)

from dspy.

okhat avatar okhat commented on July 22, 2024

Yup we already have these LoRAs — @paridhimaheshwari2708 maybe we should merge something soon?

from dspy.

ColinS97 avatar ColinS97 commented on July 22, 2024

I noticed that when using hf_client that my kwargs are not sent to the hf_server. This is a problem when trying the self-consistency use cases. Thus in hf_client in the generate function I changed:
From:
payload = {"prompt": prompt, **kwargs}
To:
payload = {"prompt": prompt, "kwargs": kwargs}

This seemed to fix the problem.
Can you tell me the reason why the ** operator was there initially?

from dspy.

okhat avatar okhat commented on July 22, 2024

By the way things are much more stable now with TGI client in DSPy. Feel free to let us know if you face problems in the new version of the framework.

from dspy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.