https://github.com/huggingface/smol-course
A course on aligning smol models.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.8%) to scientific vocabulary
Repository
A course on aligning smol models.
Basic Info
- Host: GitHub
- Owner: huggingface
- License: apache-2.0
- Language: Jupyter Notebook
- Default Branch: main
- Size: 10.7 MB
Statistics
- Stars: 6,441
- Watchers: 45
- Forks: 2,288
- Open Issues: 74
- Releases: 0
Metadata Files
README.md

a smol course
This is a practical course on aligning language models for your specific use case. It's a handy way to get started with aligning language models, because everything runs on most local machines. There are minimal GPU requirements and no paid services. The course is built around the SmolLM3 and SmolVLM2 models, but the skills you'll learn can be applied to larger models or other small LLMs/VLMs as well.
smol course v2 is live!
This course is open and peer reviewed. To get involved with the course open a pull request and submit your work for review. Here are the steps:
- Follow the Hugging Face Hub org
- Read the material, make changes, do the exercises, add your own examples.
- Submit a model to the leaderboard
- Climb the leaderboard
This should help you learn and to build a community-driven course that is always improving.
Future of this course
This course will soon be re-released on Hugging Face Learn! Stay tuned for updates.
Course Outline
This course provides a practical, hands-on approach to working with small language models, from initial training through to production deployment.
| # | Topic | Description | Released | | - | ----- | ----------- | -------- | | 1 | Instruction Tuning | Supervised fine-tuning, chat templates, instruction following | ✅ | | 2 | Evaluation | Benchmarks and custom domain evaluation | ✅ | | 3 | Preference Alignment | Aligning models to human preferences with algorithms like DPO. | ✅ | | 4 | Vision Language Models | Adapt and use multimodal models | ✅ | | 5 | Reinforcement Learning | Optimizing models with based on reinforcement policies. | October 2025 | | 6 | Synthetic Data | Generate synthetic datasets for custom domains | November 2025 | | 7 | Award Ceremony | Showcase projects and celebrate | December 2025 |
Why Small Language Models?
While large language models have shown impressive capabilities, they often require significant computational resources and can be overkill for focused applications. Small language models offer several advantages for domain-specific applications:
- Efficiency: Require significantly less computational resources to train and deploy
- Customization: Easier to fine-tune and adapt to specific domains
- Control: Better understanding and control of model behavior
- Cost: Lower operational costs for training and inference
- Privacy: Can be run locally without sending data to external APIs
- Green Technology: Advocates efficient usage of resources with reduced carbon footprint
- Easier Academic Research Development: Provides an easy starter for academic research with cutting-edge LLMs with less logistical constraints
Prerequisites
Before starting, ensure you have the following:
- Basic understanding of machine learning and natural language processing.
- Familiarity with Python, PyTorch, and the transformers library.
- Access to a pre-trained language model and a labeled dataset.
v1 of the course
The first version of the course used GithHub markdown and Jupyter notebooks. You can find it in the v1 directory.
Owner
- Name: Hugging Face
- Login: huggingface
- Kind: organization
- Location: NYC + Paris
- Website: https://huggingface.co/
- Twitter: huggingface
- Repositories: 355
- Profile: https://github.com/huggingface
The AI community building the future.
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 45
- Total pull requests: 180
- Average time to close issues: 1 day
- Average time to close pull requests: 2 days
- Total issue authors: 32
- Total pull request authors: 88
- Average comments per issue: 0.4
- Average comments per pull request: 0.68
- Merged pull requests: 80
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 45
- Pull requests: 180
- Average time to close issues: 1 day
- Average time to close pull requests: 2 days
- Issue authors: 32
- Pull request authors: 88
- Average comments per issue: 0.4
- Average comments per pull request: 0.68
- Merged pull requests: 80
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- fairydreaming (5)
- burtenshaw (5)
- TzurV (2)
- Josh-Weston (2)
- kevkid (2)
- mdagost (2)
- ArlindKadra (2)
- dailydaniel (1)
- alvarobartt (1)
- tifa365 (1)
- binhere (1)
- r4hul77 (1)
- usametov (1)
- charliezjw (1)
- Rajjeshwar (1)
Pull Request Authors
- burtenshaw (28)
- sergiopaniego (11)
- duydl (9)
- mcdaqc (5)
- GangGreenTemperTatum (4)
- 1sarthakbhardwaj (4)
- bhautik-pithadiya (3)
- thliang01 (3)
- ViniFBN (3)
- vksx (3)
- ash-01xor (3)
- mmeendez8 (3)
- Knight7561 (3)
- kolmogorov-quyet (3)
- hahuyhoang411 (3)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- accelerate ==1.1.1
- aiohappyeyeballs ==2.4.4
- aiohttp ==3.11.8
- aiosignal ==1.3.1
- appnope ==0.1.4
- asttokens ==3.0.0
- attrs ==24.2.0
- certifi ==2024.8.30
- cffi ==1.17.1
- charset-normalizer ==3.4.0
- colorama ==0.4.6
- comm ==0.2.2
- datasets ==3.1.0
- debugpy ==1.8.9
- decorator ==5.1.1
- dill ==0.3.8
- executing ==2.1.0
- filelock ==3.16.1
- frozenlist ==1.5.0
- fsspec ==2024.9.0
- huggingface-hub ==0.26.3
- idna ==3.10
- ipykernel ==6.29.5
- ipython ==8.30.0
- jedi ==0.19.2
- jinja2 ==3.1.4
- jupyter-client ==8.6.3
- jupyter-core ==5.7.2
- markdown-it-py ==3.0.0
- markupsafe ==3.0.2
- matplotlib-inline ==0.1.7
- mdurl ==0.1.2
- mpmath ==1.3.0
- multidict ==6.1.0
- multiprocess ==0.70.16
- nest-asyncio ==1.6.0
- networkx ==3.4.2
- numpy ==2.1.3
- nvidia-cublas-cu12 ==12.4.5.8
- nvidia-cuda-cupti-cu12 ==12.4.127
- nvidia-cuda-nvrtc-cu12 ==12.4.127
- nvidia-cuda-runtime-cu12 ==12.4.127
- nvidia-cudnn-cu12 ==9.1.0.70
- nvidia-cufft-cu12 ==11.2.1.3
- nvidia-curand-cu12 ==10.3.5.147
- nvidia-cusolver-cu12 ==11.6.1.9
- nvidia-cusparse-cu12 ==12.3.1.170
- nvidia-nccl-cu12 ==2.21.5
- nvidia-nvjitlink-cu12 ==12.4.127
- nvidia-nvtx-cu12 ==12.4.127
- packaging ==24.2
- pandas ==2.2.3
- parso ==0.8.4
- peft ==0.13.2
- pexpect ==4.9.0
- pillow ==11.0.0
- platformdirs ==4.3.6
- prompt-toolkit ==3.0.48
- propcache ==0.2.0
- psutil ==6.1.0
- ptyprocess ==0.7.0
- pure-eval ==0.2.3
- pyarrow ==18.1.0
- pycparser ==2.22
- pygments ==2.18.0
- python-dateutil ==2.9.0.post0
- pytz ==2024.2
- pywin32 ==308
- pyyaml ==6.0.2
- pyzmq ==26.2.0
- regex ==2024.11.6
- requests ==2.32.3
- rich ==13.9.4
- safetensors ==0.4.5
- sentencepiece ==0.2.0
- setuptools ==75.6.0
- six ==1.16.0
- stack-data ==0.6.3
- sympy ==1.13.1
- tokenizers ==0.20.3
- torch ==2.5.1
- torchaudio ==2.5.1
- torchvision ==0.20.1
- tornado ==6.4.2
- tqdm ==4.67.1
- traitlets ==5.14.3
- transformers ==4.46.3
- triton ==3.1.0
- trl ==0.12.1
- typing-extensions ==4.12.2
- tzdata ==2024.2
- urllib3 ==2.2.3
- wcwidth ==0.2.13
- xxhash ==3.5.0
- yarl ==1.18.0
- bitsandbytes >=0.45.0
- datasets >=3.1.0
- huggingface-hub >=0.26.3
- ipywidgets >=8.1.5
- lighteval >=0.6.2
- transformers >=4.46.3
- trl >=0.12.1