Follow The Progress
 

How to Publish a Model on Hugging Face

A model is useful to other people when they can download it, run it with one command, and trust its numbers. That last part is the hard one. When I first published theOG’s scores, Reddit took them apart over contamination, and they weren’t completely wrong. Lesson learned: every number you publish needs a source someone else can check. This part is a checklist, plus one exercise: writing your own model card.

Mars Ultor character by Drunkk Toys, illustrating publishing a model on Hugging Face

1. A model card people can check

The README of a Hugging Face model repo is its model card. It should say what the model does and where it stops, for example Python function tasks with 2048 tokens of context. Every score should come with its source: the results file from part 7 and the settings, file, mode, temperature, top-k, plus a known baseline on the same harness so readers can compare. Add how to run it, the ollama run command and the sampling settings. List the training data and its licences. And add the sha256 the export printed, so people can check their download.

theOG’s card is the worked example: huggingface.co/DrunkkToys/theOG-50M.

2. Upload

uv run --with "huggingface_hub[cli]" hf auth login
uv run --with "huggingface_hub[cli]" hf upload <your-name>/<model-name> release/ .

Ollama can run a GGUF straight from Hugging Face with ollama run hf.co/<your-name>/<model-name>:Q8_0. It reads the prompt template and sampling settings from the template and params files at the root of the repo. theOG’s repo has both, so copy them and adapt.

3. Licences are not decoration

Your model was trained on other people’s data, and their licences come with it. nvidia/OpenCodeInstruct is CC BY 4.0, so credit the source. OpenCoder-LLM/opc-sft-stage2 is MIT, so keep the copyright notice. Name both in your card, with links, and check the licence of anything you add.

4. Before you hit publish

  • The repo holds no tokens, keys or private data. Search the files. Actually search them.
  • The contamination check from part 2 ran on the exact data you trained on, not on last week’s version.
  • Every score in the card comes from a results file you can point to.
  • ollama run works on a clean machine with only the published files.

That’s the whole course. You started with a tokenizer and ended with a model anyone can run with one line. Not bad for 50 million parameters.

The full lesson, with the code and the tests, is free on GitHub: DrunkkInference, lesson 9.

Would you publish your scores knowing the internet will try to tear them apart? You should. That’s how they get better.

Quick answers

What should a model card include?
What the model does and its limits, sourced scores with a baseline, how to run it, training data with licences, and file hashes.

Can Ollama run a model straight from Hugging Face?
Yes, for GGUF files: ollama run hf.co/name/model:tag.

Do dataset licences apply to my trained model?
The datasets’ licences come with it: CC BY 4.0 asks for credit, MIT asks you to keep the copyright notice.

And if you have a task you think a small model could take over, tell me about it.

Follow The Progress
 
Robot art toys with is pilot

Get microModels updates

New theOG versions, benchmark results and what custom nodes can do. A short email when there is something worth knowing.

You have Successfully Subscribed!