Skip to content

Commit be846a1

Browse files
authored
update readme (#8)
1 parent fc6ca3f commit be846a1

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,29 @@ repo is educational, so the aim is to keep the code as legible as possible.
1919

2020
[x] Switch to uv
2121
[x] Make it easy to modify with a config file
22-
[] Make it into a package
22+
[] Extract the loss calculation from the model
23+
[] Rename main to train
2324
[] Create an easy to use interface
2425
[] Create or check tokenizer interface
26+
[] Make it into a package
2527
[] Apply SOTA optimizations
2628

2729
## Requirements
2830

2931
- Python 3.12+
30-
- Poetry for dependency management
32+
- `uv` for dependency management
3133

3234
## Installation
3335

3436
1. Clone the repository:
3537
```
36-
git clone https://github.com/yourusername/scratchgpt.git
38+
git clone https://github.com/LabStrangeLoop/scratchgpt.git
3739
cd scratchgpt
3840
```
3941

40-
2. Install dependencies using Poetry:
42+
2. Install dependencies using uv:
4143
```
42-
poetry install
44+
uv sync --all-groups
4345
```
4446

4547
## Usage
@@ -49,7 +51,7 @@ repo is educational, so the aim is to keep the code as legible as possible.
4951
To train the model on your custom dataset:
5052

5153
```
52-
poetry run train -t <path_to_training_data> -e <experiment_folder>
54+
uv run train -t <path_to_training_data> -e <experiment_folder>
5355
```
5456

5557
- `-t, --train_source`: Path to the training data file or folder
@@ -61,7 +63,7 @@ poetry run train -t <path_to_training_data> -e <experiment_folder>
6163
To generate text using a trained model:
6264

6365
```
64-
poetry run infer -e <experiment_folder> [-d <device>] [-m <max_tokens>]
66+
uv run infer -e <experiment_folder> [-d <device>] [-m <max_tokens>]
6567
```
6668

6769
- `-e, --experiment`: Path to the folder containing the trained model
@@ -73,7 +75,7 @@ poetry run infer -e <experiment_folder> [-d <device>] [-m <max_tokens>]
7375
To explore the TikToken tokenizer:
7476

7577
```
76-
poetry run tiktoken
78+
uv run tiktoken
7779
```
7880

7981
## Project Structure
@@ -87,20 +89,16 @@ poetry run tiktoken
8789

8890
This project uses various development tools:
8991

90-
- `black` for code formatting
91-
- `isort` for import sorting
92-
- `pylint` for linting
9392
- `mypy` for static type checking
93+
- `ruff` for formatting and standard adherence
9494
- `pytest` for testing
9595

9696
Run the following commands to ensure code quality:
9797

9898
```
99-
poetry run black .
100-
poetry run isort .
101-
poetry run pylint scratchgpt
102-
poetry run mypy scratchgpt
103-
poetry run pytest
99+
uv run ruff --fix .
100+
uv run mypy .
101+
uv run pytest
104102
```
105103

106104
## Contributing

0 commit comments

Comments
 (0)