NEW Hugging Face Agents - First Look

Ғылым және технология

Hugging Face has announced its take on Large Language Model (LLM) Agents. Similar to what we see in LangChain agents, Haystack agents, and ChatGPT plugins - but incredibly easy to get started with and with access to Hugging Face's huge hub of NLP models (taking inspiration from HuggingGPT).
These agents look great, with the integration into the HF hub, multi-modality, and an easy-to-use implementation, and I'm looking forward to doing more on HF agents in the near future.
🔗 Link to notebook:
github.com/aurelio-labs/cookb...
👋🏼 NLP + LLM Consulting:
aurelio.ai
🎙️ Support me on Patreon:
/ jamesbriggs
🤖 70% Discount on the NLP With Transformers in Python course:
bit.ly/3DFvvY5
👾 Discord:
/ discord
👋🏼 Socials:
Twitter: / jamescalam
LinkedIn: / jamescalam
Instagram: / jamescalam
00:00 Hugging Face Agents
00:38 Agents and Tools Explained
02:15 Current Agents Landscape
04:35 Taking Inspiration from HuggingGPT
05:45 Getting Started with Hugging Face Agents
08:28 Querying the Agents
10:58 Agent Prompt Template
11:46 Conversational Chatbot Agent in Hugging Face
16:44 Community Tools in Hugging Face
#artificialintelligence #nlp #openai #huggingface #generativeai

Пікірлер: 75

  • @alivecoding4995
    @alivecoding4995 Жыл бұрын

    I am so grateful for having the chance to follow you along. Really appreciate and love your content and the way you present it.

  • @lutune
    @lutune Жыл бұрын

    Awesome content as always!

  • @KevinKreger
    @KevinKreger Жыл бұрын

    Nice work. Great pace. Instantly useful

  • @xspydazx

    @xspydazx

    3 күн бұрын

    yes but obody is using it ? agents which use llms as tools ? and llms which use rags as tools ? so the llm should be using the rag to save data and extract data .. ie manage its own memeory !

  • @aliin_daglicht
    @aliin_daglicht Жыл бұрын

    With a specific url, it can access to webpage and do ocr text recognition on that page that's amazing

  • @ylazerson
    @ylazerson Жыл бұрын

    fantastic - great video!

  • @dikshyakasaju7541
    @dikshyakasaju7541 Жыл бұрын

    Great video, James! 👍🏻

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    Thanks!

  • @billykotsos4642
    @billykotsos4642 Жыл бұрын

    This LLM craze is on another level !

  • @azzeddine1
    @azzeddine1 Жыл бұрын

    How can the ready-made projects on the platform be linked to Blogger blogs? I have long days searching to no avail

  • @ahmimo2918
    @ahmimo2918 Жыл бұрын

    Appreciate the effort you put into making this video -- thank you! :) HF also mention in their documentation that the default tools can be customised -- say you're not happy with the result you're getting from the diffusion model they use, well, you can replace it with another tool/model from within HF. However, I'm not sure how exactly to do that! Is it possible to do a tutorial on this? -- Thank you!

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    Yes definitely, have already been working on it - their custom tools approach is great and will talk about it soon

  • @KevinKreger

    @KevinKreger

    Жыл бұрын

    @@jamesbriggs outstanding

  • @ahmimo2918

    @ahmimo2918

    Жыл бұрын

    @@jamesbriggs Looking forward! Thank you! :)

  • @temiwale88
    @temiwale88 Жыл бұрын

    James - can you please create an LLM course? I'll pay for it ❤

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    I’m doing it for free :) kzread.info/head/PLIUOU7oqGTLieV9uTIFMm6_4PXg-hlN6F

  • @KING-zz6qt

    @KING-zz6qt

    Жыл бұрын

    @@jamesbriggs thank you!

  • @temiwale88

    @temiwale88

    Жыл бұрын

    Gracias!

  • @brando2818

    @brando2818

    Жыл бұрын

    ​@@jamesbriggs common open source W

  • @breakitdown4700

    @breakitdown4700

    Жыл бұрын

    ​@@jamesbriggs you are the best❤

  • @nikhilgjog
    @nikhilgjog Жыл бұрын

    great info James. Could you share how to finetune a LLM on our own data? thanks!

  • @jstello
    @jstello Жыл бұрын

    Love the Viz of those huge neutral networks! Where can we get similar things?

  • @laozi6334
    @laozi6334 Жыл бұрын

    Really well done and executed, I am wondering whether LLM and Agents can interact with private Knowledge Base (Graphs) to optimize output results?. Thank you for your support and dedication to the community, really appreciated

  • @JonWillis9

    @JonWillis9

    Жыл бұрын

    of course they can!

  • @Sundarampandey
    @Sundarampandey Жыл бұрын

    how different itt is from the "Pipeline" feature that was available before, you were just telling a work it in pipeline, it was finding a ddefault model and gave the output So how is this different from that

  • @EliSpizzichino
    @EliSpizzichino Жыл бұрын

    Very cool! Wondering why OopenAI agent pulls from huggingface models, I thought that it would use their plugins. How does it works? It's really impressive how lean the API is

  • @dmitrijskass6760
    @dmitrijskass6760 Жыл бұрын

    Thanks for your great work! 👏 Do you plan to make a video on using NVIDIA NeMo Guardrails with LangChain?

  • @sanesanyo
    @sanesanyo Жыл бұрын

    Hi James, another cool video. I wanted to buy your Udemy Course but the 70% discount mentioned is not there anymore. I guess it was only for few hours.

  • @christophersheppard3249
    @christophersheppard3249 Жыл бұрын

    How did he get that background for hugging face

  • @kofiwang7329
    @kofiwang7329 Жыл бұрын

    does the agent decide which model to download and use or will it use the model you import?

  • @steve_wk
    @steve_wk Жыл бұрын

    I'm pretty sure this is a dumb question, but how does openai's GPT know which HF tools to use? GPT training stopped well before these tools were available, right? What am I missing? Thank you for making this video!

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    it's in the prompt, they insert the tool name and a short description of the tool and when to use it :)

  • @IamalwaysOK
    @IamalwaysOK Жыл бұрын

    Hello James, First of all, I want to say that your video was great, as always. However, I have a couple of questions regarding the setup you demonstrated. I noticed that you only added the OpenAI key, but I didn't see you adding a Hugging Face key. Could you please clarify how the system is working without the Hugging Face key? Additionally, I'm curious about the source of the inference. Could you please explain where the inference is coming from and who is hosting these models? Is HuggingFace hosting it for free? Thank you for your time and clarification.

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    hey, so no need to include a hugging face key because we're not using their inference service here, we're actually running MPT-7B locally - so when we run Hugging Face transformers locally no API keys are needed

  • @TheRev0
    @TheRev0 Жыл бұрын

    The agent generates the code, then magic? It's not clear to me how to reuse the agent's code outside of a notebook.

  • @RobertTheCoder

    @RobertTheCoder

    Жыл бұрын

    AFAIK You wouldn't directly use the code it is generating, the agent appears to be using that on it's own, it isn't really for you. What you would do is develop a UI for the agent, for example maybe hook it up to Slack, or a JS chat window, or just within a notebook. You would then ask it to do things, and it will automatically download the appropriate model(s) to complete that task, and provide you with the output. The code that you see is really just for helping you as a developer understand what it is doing under the hood. For end-user use you wouldn't show that code, although you might log that info for troubleshooting issues reported by the users.

  • @RobertTheCoder
    @RobertTheCoder Жыл бұрын

    My only concern (I think) is that if the LLM is generating python code, it might be possible to get it to generate malicious code. The framework would need to make sure that any generated code is very limited in scope, to maybe only downloading models and reading/writing files within a sandboxes directory. It's pretty cool though.

  • @thedoctor5478

    @thedoctor5478

    Жыл бұрын

    It already is sandboxed.

  • @MAHmOuD_AI600
    @MAHmOuD_AI600 Жыл бұрын

    so do you think it is better than langchain? also I want to know how did they manged to make an llm to use tools how can I make that to for example if want to make llama model to learn how to use photoshop how can I make this I really want to know?

  • @kevinscales

    @kevinscales

    Жыл бұрын

    In the prompt template you have something like "You have the following tools at your disposal [insert table of tool names and descriptions] here are examples of how to use them [insert examples] when appropriate use tools to complete the users request. Here is the request [insert user prompt here]" You can do better than this, I've not messed around with prompting but you probably want it to reason about what tools would be most appropriate before selecting and using a tool. Replace the various parts of the template with info from your tools file and the user prompt when the user prompts the system. Whenever the output contains the use of a tool you stop the LLM output and send the command(s) to the tool and include a description of the result of that back into the conversation with a specific way for the LLM to refer back to this result (for follow up requests). Have the LLM continue until the task is done or has been determined to be beyond the LLM + tools capabilities. Obviously there is more to it than this. You want to display results, deal with follow up requests properly, create all the descriptions/examples and write the code that turns the LLMs request to use a tool into actual commands the tool can process, deal with results and errors etc, but this is the basic idea. You can do this with LangChain, but this is already set up as an agent and is already set up to work with all the models on Huggingface. If you understand how to interact with Photoshop using text commands then you can teach an LLM how to do it using a prompt. I'm sure you could modify the tools file to make it output commands for photoshop, but you would probably have to implement a way for it to send those to photoshop (and return results) yourself (or just wait until someone else does it) but I don't know because I've not even look at this yet.

  • @MAHmOuD_AI600

    @MAHmOuD_AI600

    Жыл бұрын

    @@kevinscales can we speak private ?

  • @dinkusstinkus4396
    @dinkusstinkus4396 Жыл бұрын

    Glad about OSNAP already being a thing

  • @satishlokkoju6844
    @satishlokkoju6844 Жыл бұрын

    I love that the notebook name is Untitled17.ipynb. Btw awesome tutorials.

  • @MajorMutage
    @MajorMutage Жыл бұрын

    Simple and impressive library! Maybe gife is some representation between elephant and giraffe. Or maybe it's just nonsense...

  • @megamehdi89
    @megamehdi89 Жыл бұрын

    How to get access to these example notebooks ?

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    added here! github.com/aurelio-labs/cookbook/blob/main/gen-ai/agents/hf-agents/hf-agents-intro.ipynb

  • @megamehdi89

    @megamehdi89

    Жыл бұрын

    Really appreciate your tutorials/videos. Learning a ton and implementing them in one or two projects 🙂

  • @whoami6821
    @whoami6821 Жыл бұрын

    Can you share that colab notebook? Thanks❤

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    just uploaded, here it is github.com/aurelio-labs/cookbook/blob/main/gen-ai/agents/hf-agents/hf-agents-intro.ipynb

  • @bibinkunjumon
    @bibinkunjumon Жыл бұрын

    Try sharing ur notebook links too

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    uploaded now! github.com/aurelio-labs/cookbook/blob/main/gen-ai/agents/hf-agents/hf-agents-intro.ipynb

  • @blarvinius
    @blarvinius Жыл бұрын

    So... When I tell a robot it has a hammer, won't everything look like a nail?

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    haven't tested it enough to know how this implementation functions, but in langchain we can modify the descriptions to specify when exactly to use the tool and that works well

  • @blarvinius

    @blarvinius

    Жыл бұрын

    @@jamesbriggs Yeah, that sounds OK...I'm still at the stage of running prefab chains with LangChain... But what seems needed is for an agent, even just a "chat" process, to request disambiguation or more guidance from the original prompt. I.e. ask follow -up questions. I'm sure there must be a "tool" for that. It's the major flaw with AutoGPT concepts as well. Hard to keep up with all the new stuff!

  • @billykotsos4642
    @billykotsos4642 Жыл бұрын

    theres no slowing down in this space.... hopefully I will still have a job in 2 years... (Im an ML engineer )

  • @Michael-Humphrey

    @Michael-Humphrey

    Жыл бұрын

    Everyday there’s something new it crazy

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    build agents to do the job for you, just don't tell your boss

  • @michavk
    @michavk Жыл бұрын

    I think the animal turned gold because you used "lazer" instead of "laser"?

  • @xspydazx
    @xspydazx3 күн бұрын

    pretty sad this was not captialized on more : as the concept of Agents Running LLMS is better than LLM Running Agents !!! LLM and transformers ad diffusers etc as tools ! ... once the model is in your environment : this is a good way to acess them : even i feel everything is backwards !!! should we be hitting the rag ? or should the rag be a tool also ? if the rag was Given to the model it would be better than all the agents querying the rag then passing it to the model ! ?? crazy !!

  • @alivecoding4995
    @alivecoding4995 Жыл бұрын

    Isn’t huggingface actually a company?

  • @rhydderc127
    @rhydderc127 Жыл бұрын

    Maybe that one step failed because you misspelled laser 😊

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    Oops 😅

  • @pranavmarla
    @pranavmarla Жыл бұрын

    From my experience the system is far from functional. The prompt templates used by HF are too limited, and mostly only the prompts that they display in their official notebook work well. Straying from these prompt templates leads to errors in the tools. Many things to be fixed here.

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    yeah I do agree, plenty of work to be done but I also wouldn't expect anything more from the first version - I think it's very promising

  • @researchforumonline
    @researchforumonline Жыл бұрын

    wow cool cheap api? openai a little expensive.

  • @bobtarmac1828
    @bobtarmac1828 Жыл бұрын

    Losing your job to ai agents is unacceptable. Ai Jobloss is here. So are Ai as weapons. Can we please find a way to Cease Ai / GPT? Or begin Pausing Ai before it’s too late?

  • @jamesbriggs

    @jamesbriggs

    Жыл бұрын

    They’re not that good, actually the more you use these things the more you’ll realize how limited they are - maybe better models that do cause job loss are coming but I don’t think todays models will

  • @sgramstrup

    @sgramstrup

    Жыл бұрын

    Perhaps it is our society that needs to change ? In this society, everything is a weapon..

  • @dinoscheidt
    @dinoscheidt11 ай бұрын

    9:28 Fort a traditional software engineer, this is a scary none-deterministic form of meta programming that is impossible to end to end test 😂 “I’m going to use the following tool: ‘hack_my_computer’”

Келесі