Skip to content

Commit 9decfea

Browse files
committed
reworked for 2025
1 parent 0c7135c commit 9decfea

File tree

1 file changed

+5
-27
lines changed

1 file changed

+5
-27
lines changed

_pages/dat450/assignment4.md

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In this assignment, you will perform supervised fine-tuning (SFT) of a small ope
1919

2020
### Requirements
2121

22-
Please submit your solution in Canvas. Submission deadline: December `SPECIFY HERE`.
22+
Please submit your solution [in Canvas](https://canvas.chalmers.se/courses/36909/assignments/117618). **Submission deadline: December 1**.
2323

2424
Submit Python files containing your solution to the programming tasks described below. In addition, to save time for the people who grade your submission, please submit a text file containing the outputs printed out by your Python program; read the instructions carefully so that the right outputs are included. (Most important outputs already designed for the code)
2525

@@ -34,39 +34,17 @@ This assignment is adapted from a previous version by Marco Kuhlmann and updated
3434
## Step 0: Preliminaries
3535

3636
### Libraries
37-
We use the following libraries from the HF ecosystem:
37+
38+
As in the previous assignment, you can use the pre-set environment `source /data/courses/2025_dat450_dit247/venvs/dat450_venv/bin/activate`.
39+
40+
Alternatively, if you are working on your own machine or some cloud-based service, install the following libraries with a package manager such as `pip` or `uv`:
3841
- [Torch](https://docs.pytorch.org/docs/stable/index.html)
3942
- [Transformers](https://huggingface.co/docs/transformers/index)
4043
- [Datasets](https://huggingface.co/docs/datasets/index)
4144
- [Evaluate](https://huggingface.co/docs/evaluate/en/index)
4245
- [NLTK](https://www.nltk.org/api/nltk.html)
4346

4447

45-
As in the previous assignment, you can still use the pre-set environment `source /data/courses/2025_dat450_dit247/venvs/dat450_venv/bin/activate`, or you can try something popular nowadays called **`uv`**. **`uv`** is a super-fast Python package manager and environment tool—kind of like `pip`, but much faster and cleaner. So, bear with me in the following paragraph if you want to start working with it.
46-
47-
First, we need to install it on Mierva (or later on your operating system, which you can do by following this [documentation](https://docs.astral.sh/uv/getting-started/installation/)). The easiest way:
48-
49-
```bash
50-
curl -LsSf https://astral.sh/uv/install.sh | sh
51-
```
52-
53-
After installation, restart your terminal or reload your shell:
54-
```bash
55-
source ~/.bashrc
56-
```
57-
Check that it works:
58-
```bash
59-
uv --version
60-
```
61-
That's it, you're ready to dive into the task. Then you can start to sync your environmnet using:
62-
63-
```bash
64-
uv python install 3.12
65-
uv venv --python 3.12
66-
uv sync
67-
```
68-
69-
7048
### Getting the files
7149

7250
The dataset [Alpaca](https://huggingface.co/datasets/tatsu-lab/alpaca) is a collection of 52k instruction-response pairs designed for SFT of LLM for instruction following (JSON format). For easy use we already downloaed this dataset that you can load using the HF datasets as:

0 commit comments

Comments
 (0)