Repository for the course with all material.
The slides contain additional background and theroretical information.
If possible, work with uv. Clone the repository and run uv sync.
However, there are some challenges:
- Most of the notebooks work with
pyproject.toml. - Currently, the lastest
transformersis not compatible with bothSGLangandunsloth. I recommend using different kernels for that. - Some notebooks are specifically suited for MacOS using the
mlx-lmpackage. It is only useful to install that with a Mac.
Create an venv or conda environment and install the following packages for the normal notebooks:
- accelerate
- causal-conv1d
- datasets
- flash-linear-attention
- ipython
- jupyter
- kernels
- liger-kernel
- math-verify
- openai
- openrouter
- peft
- torch
- triton
- trl
For unsloth you just need to install unsloth and vllm.
For SGLang, you just have to install sglang or use uvx run sglang.
For MacOS notebooks, the following packages are recommended:
- jupyter
- mlx-lm
- mlx-vlm
- mlx-optiq
- openai
- openrouter
I have not provided a requirements.txt as dependencies tend to get outdated faster that I can update.
You can also use runpod. uv is already preinstalled there. Of course, the MacOS notebooks won't work there.
You can either try to run the notebooks directly or try to follow how I run them and use it as a documentation (or run it later).
- 21-gemma-4-12b-qat-cuda-sglang.ipynb:
SGLangas an external server for CUDA - 22-gemma-4-12b-qat-mlx-serve.ipynb:
optiqas an external server on Macs
- 41-finetune-numinamath-grpo-trl-qwen.ipynb: Finetune a small Qwen model with Hugging Face trainer
- 41-finetune-numinamath-grpo-trl-qwen-complete.ipynb: same as above, but with output
- 42-unsloth-qwen3-4-base.ipynb: Train a larger Qwen3 base model with
unsloth - 42-unsloth-qwen3-4-base-complete.ipynb: same as above, but with output