dev-resources.site
for different kinds of informations.
How to run any LLM model with Hugging-Face 🤗
Published at
5/17/2024
Categories
ai
huggingface
llm
genai
Author
rswijesena
Author
10 person written this
rswijesena
open
Hugging-face 🤗 is a repository to host all the LLM models available in the world. https://huggingface.co/
If you go to the models sections of the repo, you would see thousands of models available to download or use as it is.
Let's get an example to use google/flan-t5-large to generate text2text prompts
- Install below python libs
!pip install huggingface_hub
!pip install transformers
!pip install accelerate
!pip install bitsandbytes
!pip install langchain
Get a huggingface API Key - https://huggingface.co/settings/tokens
You can run below python code now with your Key
from langchain import PromptTemplate, HuggingFaceHub, LLMChain
import os
os.environ["HUGGINGFACEHUB_API_TOKEN"] = "<HUGGINGFACEKEY>"
prompt = PromptTemplate(
input_variables=["product"],
template="What is the good name for a company that makes {product}",
)
chain = LLMChain(prompt=prompt, llm=HuggingFaceHub(repo_id="google/flan-t5-large",model_kwargs={"temperature":0.1, "max_length":64}))
chain.run("fruits")
Results from Model = Fruits is a footballer from the United States.
huggingface Article's
30 articles in total
HuggingFace login on Google Colab
read article
Machine learning for web developers
read article
How to Run stable-diffusion-3.5-large-turbo on Google Colab
read article
Hugging Face: The AI Revolution You Can't Ignore!
read article
Seamless Integration of Hugging Face AI Models via API for Any Application
read article
Using Hugging Face Models in Google Colab: A Beginner's Guide
read article
Build a Text Extractor App with Python Code Under 30 Lines Using Gradio and Hugging Face
read article
Exploring NVIDIA’s Llama 3.1 Nemotron 70B Instruct Model: A Breakthrough in AI Language Models
read article
Fine-Tuning LLMs Using HuggingFace!
read article
🤗 How to create spaces in Hugging Face?🤗
read article
Parler-TTS: Text-to-Speech Technology — An AI Engineer’s Perspective
read article
Hugging Face: Interacting with Roberta and Hugging Face for the first time
read article
Hugging Face Zero GPU Spaces: ShieldGemma Application
read article
Exploring Hugging Face: The GitHub for the Machine Learning Community
read article
📚 Announcing My New Book: Building an LLMOps Pipeline Using Hugging Face📚
read article
End to end LLMOps Pipeline - Part 1 - Hugging Face
read article
huggingface fix: you either need to activate Developer Mode or to run Python as an administrator
read article
Part 1: Basic Implementation of Phi-3-Vision in MLX
read article
How to add memory to LLM Bot using DynamoDB
read article
Generating replies using Huggingface interference and Mistral in NestJS
read article
Mastering AutoModelForCausalLM: A Handbook for Novices
read article
Deploying Llama3 with Inference Endpoints and AWS Inferentia2
read article
Here's how I achieved faster code runs for running Docker Containers in Jetson Nano L4T
read article
How to run LLM modal locally with Hugging-Face 🤗
read article
How to run any LLM model with Hugging-Face 🤗
currently reading
Migrating from OpenAI models to Hugging Face models
read article
Beginner's guide to code with Generative AI and LLM
read article
Fine tune your pre-trained model using this notebook
read article
Top 10 LLM Models on Hugging Face
read article
Videos: Deploying Hugging Face models on Google Cloud
read article
Featured ones: