Topic 4 of 5 · 4 min read
Trying models in Hugging Face Spaces
Goal: Use a Space to compare two models and say what a public demo can and cannot tell you.
A Space is a small app hosted on the Hub, usually a demo of a model: good for a quick feel, poor as evidence about the model you would run yourself.
Check yourself · 1 of 3
You want to test how a model summarises real customer emails. Where is it safe to paste them?
Why it matters
Before you spend an evening downloading 15 GB, a Space lets you try a model in a browser. It is also the fastest way to compare two models side by side. But what you see is the owner's setup, running on the owner's server.
How to use it
- Find the Space from the model page (the Spaces that use the model are listed there), or search Spaces by task.
- Compare on identical prompts. Write five to ten prompts from your real work and send the same text to both models. Save the answers in a table. Change one thing at a time.
- Check what the demo hides. Read the Space's files: the app source shows the system prompt, sampling settings, the quantization and sometimes a different model version than the name suggests. A demo can add retries, filters or a retrieval step that your local setup will not have.
- Duplicate when you need control. The menu on the Space page offers a duplicate into your own account. Choose private visibility, set your own secrets and pick hardware. GPU hardware is billed by the hour while it runs, so pause it when you finish.
- Mind the data. Text you type goes to the Space owner's server. A public demo may log inputs, and the owner can read them.
Before and after
Weak: pasting a real customer email into a stranger's demo to "see how it summarises".
Better:
Prompt set: 8 invented tickets, same wording in both Spaces.
Model A: ok on 6, wrong order id on 2.
Model B: ok on 5, invents a refund policy on 1, truncates 2.
Caveat: both Spaces cap output length and may use quantized weights.
Next: run the two finalists locally on our own tickets.
What goes wrong
- Pasting private data. Customer details, code with keys or contracts end up on someone else's machine.
- Generalising from one demo. Hidden prompts and settings mean the same model can behave differently on your hardware.
- Leaving paid hardware running. A duplicated GPU Space keeps billing until you pause or delete it.
- Trusting a Space as the model's official behaviour. Anyone can publish a Space named after a model.
Examples
Two-model shortlist
You have two 8B candidates. Write eight invented support tickets, paste each into both Spaces and record the replies in a table with a column for errors. Note that both demos limit output to 512 tokens, so judge length behaviour locally.
Duplicating a Space for private testing
You want to try an internal prompt style. Duplicate the Space, set visibility to private, add your own token as a secret, choose the smallest GPU that fits, and pause the Space after the session. Your prompts now reach only your copy.
Key points
- A Space is the owner's app on the owner's server, so it shows their setup rather than the raw model.
- Compare models with the same short prompt set and save the answers side by side.
- Read the Space's source to see the system prompt, sampling settings and any extra steps.
- Duplicate a Space to your own account, set it to private and add your own secrets when you need control.
- Never paste private or customer data into a Space you do not own, because the owner can see inputs.
Common mistakes
- Pasting real customer data, source code or keys into someone else's public demo.
- Concluding a model is weak from one Space without checking its prompt and settings.
- Leaving a duplicated GPU Space running after the test.
- Assuming a Space named after a model is made or run by that model's authors.
Check yourself · 2 of 3
You tried a model in a Space and its answers seem worse than the model card suggests. What should you check before blaming the model?
Check yourself · 3 of 3
You duplicate a GPU Space to test privately. Which action avoids a surprise bill?
Practice items, not counted towards your mastery.
Start here
- Hugging Face Hub documentation (opens in a new tab)DocsFree
The entry point to repositories, model and dataset pages, Spaces and the security notes.
- Hub: downloading files (opens in a new tab)DocsFree
Download a file, a pinned revision or a whole repository, and how the local cache is laid out.
- Model Cards (Hugging Face Hub docs) (opens in a new tab)DocsFree
What a model card is meant to contain, including licence, intended use and evaluation results.
More for this topic
- Hub: Spaces overview (opens in a new tab)DocsFree
How Spaces run, what hardware they use, how to duplicate one and how secrets are stored.