Learn / Lessons

Getting a model: from Hugging Face to the app

How do you get an AI model, and see it in Server AI Hub? Let's start from nothing. We're at the block called where models come from.

Chapters

  1. 0:00Introduction
  2. 0:07Where this fits: The AI stack
  3. 0:10First: What is a model?
  4. 0:22Where from: Hugging Face
  5. 0:28The model card: Check four things
  6. 0:44If it's locked: Gated models
  7. 1:05In the app: The Download page
  8. 1:15The results: Download on DGX
  9. 1:23Before it starts: The check
  10. 1:29While it downloads: Watch it in Jobs
  11. 1:39When it's done: Cached Models
  12. 1:50Not running yet: The Launcher
  13. 2:07One address: The LiteLLM page
  14. 2:19Let apps use it: Add it to the gateway
  15. 2:29Wrap up
Read the transcript

Introduction

How do you get an AI model, and see it in Server AI Hub? Let's start from nothing.

Where this fits: The AI stack

We're at the block called where models come from.

First: What is a model?

A model is billions of learned numbers, called weights, plus small settings. A model server loads them, and then you can ask questions. The video Inside a model explains more.

Where from: Hugging Face

Most open models are published on Hugging Face, at huggingface.co.

The model card: Check four things

Each model has a page, called a model card. Its name is the maker, then the model. Read the licence: it says what you're allowed to do. Check the size under Files and versions. And see what it's for, and which model server can run it.

If it's locked: Gated models

Some models are gated. First, sign in on Hugging Face and accept the model's terms. Then your Spark has to sign in too. Open a Terminal on it, a window where you type commands, and type h f auth login. Follow its steps. It signs in through your browser, or with an access token: a long password. Keep it secret.

In the app: The Download page

In Server AI Hub, open Models, then the Hugging Face Hub tab, and choose Download. Type a model's name in the search box, and press Search.

The results: Download on DGX

Check the maker's name: here the first card is Qwen's own. On the model you want, press Download on DGX.

Before it starts: The check

The app first checks whether it will fit, and flags anything to be careful about.

While it downloads: Watch it in Jobs

Open Jobs to watch it come down. The model is saved on the DGX Spark, not on your Mac or phone. Check its free disk space first.

When it's done: Cached Models

Now open Cached Models. It lists what's saved on the Spark. Here, part of a name is typed in the filter. Each model shows its size on disk.

Not running yet: The Launcher

A downloaded model is not running yet. Open Models, then Launcher. Here we've searched for 0.8, to find a very small model, and picked a recipe. Choose the Spark it should run on, and check that it says the model fits. Read the command box before you confirm.

One address: The LiteLLM page

Once it has loaded, it appears on the Running tab. The LiteLLM tab lists the models your apps can ask for, both local and cloud ones, each with a Test button.

Let apps use it: Add it to the gateway

To add yours, press Add Model. Give it a name, the model, and your server's address, then press Add and Test. The app tells you whether it answers.

Wrap up

Choose it, download it, start it, then connect your apps.

Sources

More lessons