Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: pub@towardsai.net
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab VeloxTrend Ultrarix Capital Partners Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Our 15 AI experts built the most comprehensive, practical, 90+ lesson courses to master AI Engineering - we have pathways for any experience at Towards AI Academy. Cohorts still open - use COHORT10 for 10% off.

Publication

Want to Build with AI But Don’t Know Where to Start? Try Hugging Face
Artificial Intelligence   Data Science   Latest   Machine Learning

Want to Build with AI But Don’t Know Where to Start? Try Hugging Face

Author(s): Prisca Ekhaeyemhe

Originally published on Towards AI.

Want to Build with AI But Don’t Know Where to Start? Try Hugging Face
Image edited by author — using DALE

If you’ve been curious about artificial intelligence but feel overwhelmed by the jargon, complex math, or massive models, then you’re not alone, and you’re not too late. There’s a beginner-friendly platform that makes exploring AI surprisingly approachable: it’s called Hugging Face. Whether you want to generate text, classify images, translate languages, or build an actual AI app, Hugging Face has tools that make it possible, even if you’re just starting out. In this article, we’ll walk through what Hugging Face is, the libraries and platforms it offers, and how you can get started building your first AI project.

💡 What is Hugging Face?

Hugging Face is an open-source platform and community built around making AI more accessible and easier to use. Think of it as a one-stop shop for downloading powerful models, playing with datasets, and building intelligent applications using just a few lines of code.

Their tools help you work with models based on the transformer architecture (the magic behind models like ChatGPT, BERT, LLaMA, and more), and their ecosystem is welcoming to beginners and pros alike.

To access all its resources, we have to log in to the Hugging Face Hub.

It’s quick and easy:

  1. Create a free account at huggingface.co
  2. Go to Settings → Access Tokens and click “New token”.
  3. Give it a name and select the “WRITE” permissions tab.

And save this token, we will need it.

🧰 Hugging Face Libraries: Your GenAI Toolkit

Here’s a gentle breakdown of the essential libraries you’ll encounter as you explore Hugging Face:

1. Hub

A central place to download or upload models and datasets. The Hugging Face Hub is like GitHub, but for AI. You can browse thousands of models for text, image, audio, and even video tasks.

2. Datasets

A massive collection of ready-to-use datasets for training and evaluation. You don’t need to search the internet or manually clean CSV files, it’s all neatly packaged and shareable.

3. Transformers

This is the heart of Hugging Face. It wraps around deep learning models built on PyTorch or TensorFlow. With the Transformers library, you can run a neural network for tasks like summarization, translation, and text generation without needing to train or deploy models from scratch.

4. PEFT (Parameter-Efficient Fine-Tuning)

Training a massive LLM can be super expensive and resource-intensive. PEFT methods like LoRA (Low-Rank Adaptation) allow you to fine-tune models without touching all those billions of parameters. It’s like customizing a suit by just adjusting the sleeves, which is much faster and cheaper.

5. TRL (Transformer Reinforcement Learning)

Want to align models with human feedback? Use TRL to perform reward modeling, supervised fine-tuning (SFT), and Proximal Policy Optimization (PPO). This is especially useful for building chatbots or assistants that behave desirably.

6. Accelerate

Need to train or run models across GPUs, TPUs, or multiple devices? Accelerate takes care of the heavy lifting. Whether you’re using one laptop or a cluster of GPUs, this library helps you scale easily.

🌐 Hugging Face Platforms

Hugging Face isn’t just about code, it’s also a collaborative platform where people can share, explore, and build together. Once you log in to the site, you’ll notice three key sections right at the top menu bar:
Models, Datasets, and Spaces. Each one opens the door to a different part of the AI ecosystem

1. Models

Thousands of open-source models for every task imaginable, from sentiment analysis to text-to-audio generation.

2. Datasets

Easily searchable and shareable collections of data for training or experimentation.

3. Spaces

A fun and interactive place to play with demo apps. Most Spaces are built using Gradio, a Python library that makes it super easy to build and share machine learning apps in minutes.

🧠 Hugging Face APIs

Hugging Face offers two levels of APIs, depending on how hands-on you want to be:

🔹 High-Level APIs: Pipelines

Pipelines are the easiest way to use a model. With just a few lines of code, you can load a model and start generating output for tasks like:

🔸 Low-Level APIs: Tokenizers & Models

If you want more control, the low-level APIs let you work directly with tokenizers and model objects.

Some key points on tokenizers:

Tokenizers turn text into numbers (tokens) and back.

Every LLM (e.g., LLaMA, Qwen, Starcoder2) has its own tokenizer, trained to match the way the model was built.

Tokenizers include vocabularies and special tokens (e.g., beginning of a prompt).

You’ll often see functions like .encode() and .decode() used to switch between text and tokens.

On average, 1 token ≈ 4 characters. So, 61 characters ≈ 15 tokens.

🌱 Ready to Build Something Cool?

Thanks so much for reading this beginner’s introduction to Hugging Face! I hope it’s demystified some of the concepts and sparked your curiosity. Over the next few weeks, we’ll dive into hands-on, beginner-friendly projects using Hugging Face from building a text summarizer to creating your own chatbot.

👉 Follow me to stay updated, and let’s explore GenAI together — one small step at a time. 💫

Got questions or ideas? Drop them in the comments — I’d love to hear from you. 💬

Further Reading:

  1. Hugging Face Transformers Library: https://huggingface.co/docs/transformers
    Comprehensive docs on how to use Transformers for NLP and beyond.
  2. Hugging Face Datasets Library: https://huggingface.co/docs/datasets
    Learn how to load, process, and share datasets.

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

Published via Towards AI


Take our 90+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Towards AI has published Building LLMs for Production—our 470+ page guide to mastering LLMs with practical projects and expert insights!


Discover Your Dream AI Career at Towards AI Jobs

Towards AI has built a jobs board tailored specifically to Machine Learning and Data Science Jobs and Skills. Our software searches for live AI jobs each hour, labels and categorises them and makes them easily searchable. Explore over 40,000 live jobs today with Towards AI Jobs!

Note: Content contains the views of the contributing authors and not Towards AI.