Github Models: Is this the end of Hugging Face Models?

Mervin Praison · Beginner ·🔧 Backend Engineering ·1y ago

Key Takeaways

The video demonstrates the capabilities of GitHub Models, a tool that allows users to access and test various AI models directly on GitHub, and explores its potential as an alternative to Hugging Face Models, using tools like Azure AI inference python package and Open AI SDK.

Full Transcript

one place to access many different models that is GitHub models having their own playground to test these models you are able to integrate that with your own application with their SDK you can use this in code space directly without any authentication is this an replacement to hugging face what are the models available in this how to use these models and integrate that in your own application and what is the pricing that's exactly what we're going to see today let's get started hi everyone I'm really excited to show you about GitHub models a new generation of AI Engineers building on GitHub enabling more than 100 million developers to become AI engineers and build with industry-leading AI models you can test and compare different models in the playground you can quickly prototype in code spaces I'm going to take you through step by step about the models playground how you can integrate this with your own application and also how you can use that in code space but before that I regularly create videos in regards to Artificial Intelligence on my YouTube channel so do subscribe and click the Bell icon to stay tuned make sure you click the like button so this video can be helpful for many others like you first we are going to see how you can use the playground so this is how the models Marketplace looks like and you can see the different models available here so when we see the models list you can see you got jamb instr different coair models llama 3.1 models myal models open AI models and 53 models so you can use any of these models quickly compare these models and prototype so let me take llama 3.1 and if I want to quickly ask a question I can just ask a question like this and it's going to respond accordingly you can change the maximum number of tokens the temperature the top p and other parameters here change this and see what works best in regard to your own use case there's easy option to integrate that with your own application just click get started there you got python implementation and it's using Azure AI inference python package you can also integrate that with cop JavaScript and rest for cop you got the instruction here for JavaScript you got the instruction here and for rest you got the instruction here rest is nothing but curl commands which means you can run these commands on your terminal so you just need to copy this as the first step you need to create a personal access token so go to personal access token there you can click generate new token and then generate new token here now I can set the expire date here how long you want to give access to this API token give a name to the APA token public repo and then generate token now copy the token and you need to export it like this in your terminal so coming to my terminal export GitHub token like this and then click enter now to test this you can directly use the curl command so we copied that ear earlier and we can just paste it here we can see we are using LL 3.1 and then click enter now we got the answer so the question we asked is what is the capital of frons and the capital of frons is Paris that's the response so this is a quick way to test using curl command now how you can integrate this with your application so there are different ways that you can integrate this with your own application just as a basic usage you can integrate tools that is function calling or tool call with this you are able to stream the response and also you are able to do multi-turn so I'm going to take you through all of this let's create a file called appp and inside the file import OS then from open AI import open AI then getting the GitHub token that will be our API key next setting the endpoint so this endpoint is same for all the models next setting the model name now we are using open AIS SDK with the base URL and APA key now we are using client chat completions create function to ask a question to the large language model so the question we we are going to ask is what is the capital of front we are providing the model name temperature max tokens and top P now after this we just printing the response that's it so it's just the basic open a SDK now I'm going to run this code in your terminal pip install open AI to install the open a package then python AB p and then click enter now we got the response the capital of France's Paris based on the question which we asked here next tool call or function calling so it's same as before but in this we are adding a parameter to call tools generally if you ask a lar language model what is the next flight from Seattle to Miami it's going to say I don't know because it doesn't know the real time data when we ask the same question it's going to use function calling method or tool call and call the function get the live information so this function is your own tool or own software and that is going to respond the accurate value and then it is sent to the large language model to respond like this in this way you are able to make a large language model respond in real time and you are able to integrate that with any of your tools or softwares same thing is happening here so we are assigning the tool to the large language model so that it can use the tool and answer the question flight from Seattle to Miami here we need to provide the tool definition so you can see the tool definition here get flight info is the function from and to they are required and get flight info function is here so this could be your own application or own software which is able to return the realtime flight information so once we call this function it'll trigger the tool call then we are going to pause the tool call then run the tool append The Returned result and send it to the large language model again to get the final response now I'm going to run this code in your terminal python tools. p and then click enter now you can see first is calling the tool that is function calling the origin City destination city then the function return this response the flight date time and the flight details then that is sent to the L language model and here is the final response the next flight from Seattle to Miami is operated by Delta Airlines and here are more information next we're going to see about streaming and multi-turn through code space so if you come to the playground click get started there you got run code space click on that and it'll bring up the code space like this so here you can see all the code here samples python code JavaScript and C command so in regards to python I'm going to try with myal AI multi-turn so instead of Mr small I'm going to change that to Mr Large and every SDK is pre-installed in this code space and you don't need to authenticate everything is taken care of behind the scenes so you can see the multi-turn which means first we are providing an example question and example answer then we are asking what about Spain that means based on the previous context we going to ask the capital of Spain now I'm going to run this code so in your terminal just type python samples python mral Ai and then multi-turn click enter and here is the response the capital of Spain is mrid now let's see how you can stream the response so it's same as before but we are using chat stream function and we are looping through the output so now I'm going to run this code so this is completely running in the browser python samples python Mr Ai and streaming so you can just copy the code and then test it for yourself you can just copy the code and test it for yourself you can you can see the response got generated so we've completed basic tools streaming and multi- turn next we are going to see about the pricing to use the playground there's a rate limit the number of requests per minute number of requests per day tokens per request and concurrent requests but when you go to production we need a Azure AI account and you need to get the personal token from Azure AI the pricing is listed in Azure AI so here you can see the pricing for Mr Lodge cair that's like 015 per th000 tokens then for open AI you can see the pricing here it's listed in Asher AI portal next finally we are going to see about how this can be run using CLI so here's the CLI command GH models run and then provide the model name and the question you want to ask probably this is in beta version so I was not able to run that locally on my computer similarly you are able to combine the GH models run with other commands let's say if you want to summarize the commit history that is the last 10 commit history you should be able to type the command like this and get a summary this is really good the final question is that is this a replacement to hugging face not yet because most of the models which we see here are close SCE and we don't have any open models weights available in this yet and it's all linking back to Azure AI overall this is a simple way to use Azure AI models using GitHub personal token apart from that it's similar to any other sdq provider I'm going to create more videos similar to this so stay tuned I hope you like this video do like share and subscribe and thanks for watching

Original Description

🔍 In this video, we dive deep into GitHub Models—a powerful tool that lets you access and test a variety of AI models directly on GitHub. We’ll guide you through the Models Playground where you can compare models like LLaMA 3.1, OpenAI models, and more. Learn how to integrate these models into your applications using Python, JavaScript, and REST APIs—all without needing to authenticate in Codespaces! We also cover tool calling, function calling, streaming, and multi-turn interactions. Plus, we discuss the pricing structure via Azure AI and explore whether GitHub Models can be a replacement for Hugging Face. 💡 🔗 Key Topics Covered: Overview of GitHub Models Playground Step-by-step model integration in your apps Using Codespaces for testing without authentication Pricing details through Azure AI Tool and function calling for real-time responses Streaming and multi-turn capabilities Comparison with Hugging Face 🔗 Links: Patreon: https://patreon.com/MervinPraison Ko-fi: https://ko-fi.com/mervinpraison Discord: https://discord.gg/nNZu5gGT59 Twitter / X : https://twitter.com/mervinpraison GPU for 50% of it's cost: https://bit.ly/mervin-praison Coupon: MervinPraison (A6000, A5000) Timestamps: 0:00 - Introduction to GitHub Models 1:13 - Exploring the Models Marketplace 2:28 - Integrating Models with Your Application 4:23 - Implementing Function Calling & Tool Usage 6:13 - Streaming & Multi-Turn Conversations in CodeSpace 7:36 - Pricing Overview & CLI Commands 8:36 - Is GitHub Models a Replacement for Hugging Face?
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Mervin Praison · Mervin Praison · 0 of 60

← Previous Next →
1 Build GCP Infra using Pulumi in YAML format
Build GCP Infra using Pulumi in YAML format
Mervin Praison
2 How to Convert a Pulumi YAML File to Python Format
How to Convert a Pulumi YAML File to Python Format
Mervin Praison
3 Speed Up AWS EKS: A Complete Guide to Performance Tuning & Debugging!
Speed Up AWS EKS: A Complete Guide to Performance Tuning & Debugging!
Mervin Praison
4 Learn GCP GKE to AWS EKS Migration in Just 5 Minutes: Quick Guide
Learn GCP GKE to AWS EKS Migration in Just 5 Minutes: Quick Guide
Mervin Praison
5 AWS & Kubernetes: The Definitive Guide to Data Persistence with PV and PVC
AWS & Kubernetes: The Definitive Guide to Data Persistence with PV and PVC
Mervin Praison
6 ChatGPT Voice Conversation RELEASED! It's AMAZING!! (Demo)
ChatGPT Voice Conversation RELEASED! It's AMAZING!! (Demo)
Mervin Praison
7 How to Install Mistral 7B in Minutes: Quick & Easy Guide! ✅
How to Install Mistral 7B in Minutes: Quick & Easy Guide! ✅
Mervin Praison
8 Code Llama Install Locally: 🐍💻 Elevate Your Python Skills!
Code Llama Install Locally: 🐍💻 Elevate Your Python Skills!
Mervin Praison
9 Orca Mini: Your Ultimate Guide to Install and Test on Mac & Linux 💻
Orca Mini: Your Ultimate Guide to Install and Test on Mac & Linux 💻
Mervin Praison
10 Quick & Easy Vicuna Setup on Mac and Linux 💻
Quick & Easy Vicuna Setup on Mac and Linux 💻
Mervin Praison
11 Quick Guide: Llama2 Local Installation and ChatGPT with pip! Python🛠️
Quick Guide: Llama2 Local Installation and ChatGPT with pip! Python🛠️
Mervin Praison
12 Query PDFs Like a Pro with Local GPT: Full Setup Guide! 📜
Query PDFs Like a Pro with Local GPT: Full Setup Guide! 📜
Mervin Praison
13 LM Studio: EASIEST way to Run Large Language Models Locally!
LM Studio: EASIEST way to Run Large Language Models Locally!
Mervin Praison
14 AMAZING ChatGPT Vision is OUT! 🤯 14+ Examples (Step-by-Step) FULL Tutorial
AMAZING ChatGPT Vision is OUT! 🤯 14+ Examples (Step-by-Step) FULL Tutorial
Mervin Praison
15 Unbelievable! Build ANY App Instantly with Smol AI! 😲🔥
Unbelievable! Build ANY App Instantly with Smol AI! 😲🔥
Mervin Praison
16 Amazing! AutoGen Made Easy: A Step-by-Step Beginners Guide 📚
Amazing! AutoGen Made Easy: A Step-by-Step Beginners Guide 📚
Mervin Praison
17 How to Set Up LoLLMS and Run LLMs Locally! 🚀 Step-by-Step Tutorial
How to Set Up LoLLMS and Run LLMs Locally! 🚀 Step-by-Step Tutorial
Mervin Praison
18 GPT4All: INSANE Way to Run Large Language Models Locally! 😲 Step-By-Step Tutorial
GPT4All: INSANE Way to Run Large Language Models Locally! 😲 Step-By-Step Tutorial
Mervin Praison
19 Incredible AI-Powered NPCs in Unity Game Engine: Step by Step Tutorial!🤯
Incredible AI-Powered NPCs in Unity Game Engine: Step by Step Tutorial!🤯
Mervin Praison
20 MemGPT 🧠 LLM as Operating System. It's INSANE! Step-by-Step Tutorial 🤯
MemGPT 🧠 LLM as Operating System. It's INSANE! Step-by-Step Tutorial 🤯
Mervin Praison
21 Text Generation Web UI: MIND-BLOWING Way to Run LLM Locally! 🤯
Text Generation Web UI: MIND-BLOWING Way to Run LLM Locally! 🤯
Mervin Praison
22 Unlock the INSANE Power of OpenAI GPT-4 with C#/.NET! 😲
Unlock the INSANE Power of OpenAI GPT-4 with C#/.NET! 😲
Mervin Praison
23 Integrate Langchain and Ollama for Local AI Power 🤯 Indeed POWERFUL!
Integrate Langchain and Ollama for Local AI Power 🤯 Indeed POWERFUL!
Mervin Praison
24 ChatDev: INSANE Virtual AI Agents! Future of Software Development 😲
ChatDev: INSANE Virtual AI Agents! Future of Software Development 😲
Mervin Praison
25 Query PDFs Using Mistral: Unlock INSANE Power! 🤯
Query PDFs Using Mistral: Unlock INSANE Power! 🤯
Mervin Praison
26 AutoGen + Open-Source LLMs: UNBELIEVABLE! Step-by-Step Tutorial You Can't Miss! 🤯
AutoGen + Open-Source LLMs: UNBELIEVABLE! Step-by-Step Tutorial You Can't Miss! 🤯
Mervin Praison
27 AutoGen + Text Generation WebUI: Unbelievable 100% Local Private Setup 🤯
AutoGen + Text Generation WebUI: Unbelievable 100% Local Private Setup 🤯
Mervin Praison
28 MemGPT: Amazing! External Context for LLM #ai #llm #memgpt  #generativeai #mem #gpt #openai #chatgpt
MemGPT: Amazing! External Context for LLM #ai #llm #memgpt #generativeai #mem #gpt #openai #chatgpt
Mervin Praison
29 GeniA: Kubernetes + AI for MIND-BLOWING Operational Efficiency! 🤯 FULL Tutorial
GeniA: Kubernetes + AI for MIND-BLOWING Operational Efficiency! 🤯 FULL Tutorial
Mervin Praison
30 VertexAI Meets LangChain for Mind-Blowing AI Conversations! 😲 Step by Step Tutorial
VertexAI Meets LangChain for Mind-Blowing AI Conversations! 😲 Step by Step Tutorial
Mervin Praison
31 Simplified ChatGPT API Setup on Node.js for Newbies! 😍 Step by Step Tutorial
Simplified ChatGPT API Setup on Node.js for Newbies! 😍 Step by Step Tutorial
Mervin Praison
32 Autogen: Ollama integration 🤯 Step by Step Tutorial. Mind-blowing!
Autogen: Ollama integration 🤯 Step by Step Tutorial. Mind-blowing!
Mervin Praison
33 LiteLLM: One-Function Call to ANY Large Language Model! 🤯 UNBELIEVABLE!
LiteLLM: One-Function Call to ANY Large Language Model! 🤯 UNBELIEVABLE!
Mervin Praison
34 ChatGPT Chatbot in Less Time Than You Think! 🚀😎 Step-by-Step Tutorial
ChatGPT Chatbot in Less Time Than You Think! 🚀😎 Step-by-Step Tutorial
Mervin Praison
35 LiteLLM Chatbot: Build Your Own in MINUTES! INSANE! 🤖🔥
LiteLLM Chatbot: Build Your Own in MINUTES! INSANE! 🤖🔥
Mervin Praison
36 Create Chatbot: Turn ANY Open-Source LLM into a Conversation Pro! 🤖
Create Chatbot: Turn ANY Open-Source LLM into a Conversation Pro! 🤖
Mervin Praison
37 Create Chatbot: Ollama Integration Made UNBELIEVABLY Easy! 🎉
Create Chatbot: Ollama Integration Made UNBELIEVABLY Easy! 🎉
Mervin Praison
38 LlamaIndex + ChatGPT: Ingest Data and Experience UNBELIEVABLE Query Results! 🌟
LlamaIndex + ChatGPT: Ingest Data and Experience UNBELIEVABLE Query Results! 🌟
Mervin Praison
39 INSANE! OpenAgents: Automated Data Analysis with Kaggle 🤯
INSANE! OpenAgents: Automated Data Analysis with Kaggle 🤯
Mervin Praison
40 React.js LLM Agent for Next-Gen Coding using ChatGPT 🚀 Mind-Blowing 🤯
React.js LLM Agent for Next-Gen Coding using ChatGPT 🚀 Mind-Blowing 🤯
Mervin Praison
41 MemGPT + Any LLM 🚀 100% Local & Private Integration Unveiled! Unlimited Memory
MemGPT + Any LLM 🚀 100% Local & Private Integration Unveiled! Unlimited Memory
Mervin Praison
42 MemGPT  + AutoGen 🧠🤖 Unlimited Memory & Autonomous AI Agents! INSANE🤯
MemGPT + AutoGen 🧠🤖 Unlimited Memory & Autonomous AI Agents! INSANE🤯
Mervin Praison
43 AutoGen + Google's Palm LLM & More! Revolutionary AI Integration 🚀
AutoGen + Google's Palm LLM & More! Revolutionary AI Integration 🚀
Mervin Praison
44 MemGPT & LM Studio Integration Revealed! 🔥 Next-Level AI
MemGPT & LM Studio Integration Revealed! 🔥 Next-Level AI
Mervin Praison
45 🚀 AutoLLM: Unlock the Power of 100+ Language Models! Step-by-Step Tutorial
🚀 AutoLLM: Unlock the Power of 100+ Language Models! Step-by-Step Tutorial
Mervin Praison
46 AutoLLM & Gradio Integration You Won't Believe! 🤯 Mind-Blowing
AutoLLM & Gradio Integration You Won't Believe! 🤯 Mind-Blowing
Mervin Praison
47 AutoLLM & FastAPI Tutorial: Query 100+ Language Models! 😱
AutoLLM & FastAPI Tutorial: Query 100+ Language Models! 😱
Mervin Praison
48 Quivr: LLM's Second Brain - Transforming Data Management & Advanced Query with AI! 🤯
Quivr: LLM's Second Brain - Transforming Data Management & Advanced Query with AI! 🤯
Mervin Praison
49 AutoGen & MemGPT with Local LLM: A Complete Setup Tutorial! 🧠 AMAZING 🤯
AutoGen & MemGPT with Local LLM: A Complete Setup Tutorial! 🧠 AMAZING 🤯
Mervin Praison
50 LocalAI: Free, Open Source OpenAI Alternative 🚀 INSANE 🤯 Step-by-Step Tutorial
LocalAI: Free, Open Source OpenAI Alternative 🚀 INSANE 🤯 Step-by-Step Tutorial
Mervin Praison
51 Yarn Mistral 7B 128k LARGE context window, Small size 🤯 INSANE 🚀 Setup Tutorial!
Yarn Mistral 7B 128k LARGE context window, Small size 🤯 INSANE 🚀 Setup Tutorial!
Mervin Praison
52 Zephyr-7B: The Small and Mighty LLM 🤯 Step by Step Tutorial! 📘
Zephyr-7B: The Small and Mighty LLM 🤯 Step by Step Tutorial! 📘
Mervin Praison
53 Promptfoo: How to Test Your LLM ? 🚀  VERY EASY!
Promptfoo: How to Test Your LLM ? 🚀 VERY EASY!
Mervin Praison
54 Pydantic: How to Validate LLM Responses? 🚀 Quality Response. VERY EASY!!!!
Pydantic: How to Validate LLM Responses? 🚀 Quality Response. VERY EASY!!!!
Mervin Praison
55 Pydantic: FORCE Your AI to Respond Back in UPPERCASE! 🤯 Step-by-Step Tutorial 🔥
Pydantic: FORCE Your AI to Respond Back in UPPERCASE! 🤯 Step-by-Step Tutorial 🔥
Mervin Praison
56 Pydantic: How to use LLM to convert unstructured data to structured data?
Pydantic: How to use LLM to convert unstructured data to structured data?
Mervin Praison
57 AutoGen Function Calling: INSANE 🚀 Custom Integrations! Step-by-Step Tutorial 🤯
AutoGen Function Calling: INSANE 🚀 Custom Integrations! Step-by-Step Tutorial 🤯
Mervin Praison
58 OpenAI Assistants API + Python 🤖 How to get started? (FULL Tutorial) 🤯 INSANE
OpenAI Assistants API + Python 🤖 How to get started? (FULL Tutorial) 🤯 INSANE
Mervin Praison
59 GPT-4 Vision API 🤯 INSANE Video Recognition Powers! Step-by-Step Tutorial 🚀
GPT-4 Vision API 🤯 INSANE Video Recognition Powers! Step-by-Step Tutorial 🚀
Mervin Praison
60 GPT-4 Vision API 🚀 The Future of Image Recognition! 🤯 Step-by-Step Tutorial
GPT-4 Vision API 🚀 The Future of Image Recognition! 🤯 Step-by-Step Tutorial
Mervin Praison

This video teaches viewers how to use GitHub Models to access and test various AI models, including LLaMA 3.1 and OpenAI models, and how to integrate these models into their own applications using SDKs and Code Spaces. Viewers will learn how to compare and prototype different models quickly in the Models Playground and how to use curl commands to test models directly.

Key Takeaways
  1. Create a personal access token
  2. Copy the token and export it in the terminal
  3. Use the curl command to test the model
  4. Create a file called app.py and import the necessary libraries
  5. Get the GitHub token and set it as the API key
  6. Install Open AI package using pip
  7. Set up Open AI SDK with API key and model name
  8. Use client chat completions create function to ask a question to the large language model
  9. Integrate function calling with Open AI SDK for real-time data retrieval
  10. Assign tool to large language model for real-time data retrieval
💡 GitHub Models provides a powerful tool for accessing and testing various AI models, but its limitations, such as the lack of open model weights, make it not a replacement for Hugging Face Models yet.

Related Reads

Chapters (7)

Introduction to GitHub Models
1:13 Exploring the Models Marketplace
2:28 Integrating Models with Your Application
4:23 Implementing Function Calling & Tool Usage
6:13 Streaming & Multi-Turn Conversations in CodeSpace
7:36 Pricing Overview & CLI Commands
8:36 Is GitHub Models a Replacement for Hugging Face?
Up next
I Analysed 10 Years of Google Maps Failures — This Is What's Killing Your Calls
Zanet Design
Watch →