NGC5793 commited on
Commit
fdff38b
Β·
verified Β·
1 Parent(s): 2f58084

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -73
README.md CHANGED
@@ -1,76 +1,4 @@
1
  # HW4 - Efficient Training and Inference
2
 
3
- ## Setting up
4
 
5
- ### AWS
6
- This assignment is best completed on AWS. See our documentation here:
7
- https://cmu.app.box.com/file/1999311311551?s=mhbn89gtmlgqo8eg5qgb35exlds6dslj
8
-
9
- ### Python environment
10
- 1. Install conda by entering these commands into your command line and following the instructions:
11
- ```bash
12
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
13
- bash Miniconda3-latest-Linux-x86_64.sh
14
- source ~/.bashrc
15
- ```
16
-
17
- 2. Create conda environment:
18
- If you run into error like `UnavailableInvalidChannel: HTTP 403 FORBIDDEN for channel <some channel>` on your EC2 instance, you can solve it by running `conda config --remove channels <some channel>`, and make sure you have the default channel by running `conda config --add channels defaults`.
19
- ```bash
20
- conda create -n cmu-llms-hw4 python=3.11
21
- conda activate cmu-llms-hw4
22
- conda install pytorch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 -c pytorch
23
- pip install -r requirements.txt
24
- pip install flash-attn
25
- pip install wandb
26
- pip install matplotlib
27
- pip install seaborn
28
- pip install vllm
29
- # Note: huggingface CLI is already installed via requirements.txt
30
- ```
31
- 3. Run `wandb login` to finish setting up weights & biases for experiment tracking (you will need to have a [weights & biases account](https://wandb.ai/login)).
32
-
33
- 4. Run `huggingface-cli login` to allow downloading and uploading to Huggingface hub.
34
-
35
- Note: We pin `huggingface_hub[cli]==0.25.2` in `requirements.txt` for compatibility with `transformers==4.45.0`. Avoid upgrading `huggingface-hub` to 1.x, which is incompatible with this version of Transformers and can cause dependency conflicts or a missing `huggingface-cli`.
36
-
37
- 5. Run `./get_initial_model.sh` to download the model starting point.
38
-
39
- ## Contents
40
-
41
- This repo contains a simple huggingface-based pre-training script, supporting two datasets:
42
-
43
- - two splits of wikitext, with 50M tokens each. Both splits are pre-tokenized for your convinience, one set with sequences of 512 tokens, and the other 2048.
44
- - minipile, with 1.4B tokens, pre-tokenized with sequences of 2048 tokens.
45
-
46
- ## Pre-training
47
-
48
- The folder ```scripts``` contains access points to the pre-training code. All scripts under there can be called as follows:
49
-
50
- ```./scripts/launch_<name>.sh <path_to_config>```, where ```<path_to_config>``` points to a model configuration under ```configs```.
51
-
52
- ## Pushing your model to HuggingFace Hub
53
-
54
- One question asks you to push your model to the huggingface hub. Steps:
55
-
56
- 1- Create an account. In your account, create a **public** repo for your model. It's handle will be your_username/model_name.
57
-
58
- 2- cd to the model directory you want to push
59
-
60
- 3- run ```huggingface-cli upload your_username/model_name .```
61
-
62
- ## Submission Checklist and Instructions
63
-
64
- Run `bash create_submission.sh` then follow the instructions.
65
-
66
- Add and finalize all your files in the `submissions/` folder.
67
-
68
- Run `bash zip_submission.sh` and upload the relevant zip file to AutoGrader. Your submission folder should look like:
69
-
70
- ```
71
- submission/
72
- β”œβ”€β”€ configs/
73
- β”œβ”€β”€ model.txt
74
- β”œβ”€β”€ lm_inference.py
75
- └── report.pdf
76
- ```
 
1
  # HW4 - Efficient Training and Inference
2
 
3
+ ## Author: Mira Xiao(minxiao)
4