RobbiePasquale
commited on
Commit
•
70782ac
1
Parent(s):
7f47926
Update README.md
Browse files
README.md
CHANGED
@@ -37,7 +37,62 @@ repo_path = snapshot_download("RobbiePasquale/lightbulb")
|
|
37 |
|
38 |
print(f"Repository downloaded to: {repo_path}")
|
39 |
```
|
|
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
### 1. Train a Web Search Agent
|
43 |
|
|
|
37 |
|
38 |
print(f"Repository downloaded to: {repo_path}")
|
39 |
```
|
40 |
+
### 0. Distill Large model into your own small model
|
41 |
|
42 |
+
## Minimal quick testing
|
43 |
+
|
44 |
+
```bash
|
45 |
+
python main_menu_new.py \
|
46 |
+
--task distill_full_model \
|
47 |
+
--teacher_model_name gpt2 \
|
48 |
+
--student_model_name distilgpt2 \
|
49 |
+
--dataset_name wikitext
|
50 |
+
```
|
51 |
+
|
52 |
+
## Full Distillation
|
53 |
+
|
54 |
+
```bash
|
55 |
+
python main_menu_new.py \
|
56 |
+
--task distill_full_model \
|
57 |
+
--teacher_model_name gpt2 \
|
58 |
+
--student_model_name distilgpt2 \
|
59 |
+
--dataset_name wikitext \
|
60 |
+
--config wikitext-2-raw-v1 \
|
61 |
+
--num_epochs 5 \
|
62 |
+
--batch_size 8 \
|
63 |
+
--max_length 256 \
|
64 |
+
--learning_rate 3e-5 \
|
65 |
+
--temperature 2.0 \
|
66 |
+
--save_path ./distilled_full_model \
|
67 |
+
--log_dir ./logs/full_distillation \
|
68 |
+
--checkpoint_dir ./checkpoints/full_distillation \
|
69 |
+
--early_stopping_patience 2
|
70 |
+
```
|
71 |
+
|
72 |
+
## Domain Specific Distillation
|
73 |
+
|
74 |
+
Use domain specific distillation to distill the part of the model relevant for you- if you like how llama 3.1 7B responds to healthcare prompts for example, you could use:
|
75 |
+
|
76 |
+
```bash
|
77 |
+
python main_menu_new.py \
|
78 |
+
--task distill_domain_specific \
|
79 |
+
--teacher_model_name gpt2 \
|
80 |
+
--student_model_name distilgpt2 \
|
81 |
+
--dataset_name wikitext \
|
82 |
+
--config wikitext-2-raw-v1 \
|
83 |
+
--query_terms healthcare medicine pharmacology \
|
84 |
+
--num_epochs 5 \
|
85 |
+
--batch_size 8 \
|
86 |
+
--max_length 256 \
|
87 |
+
--learning_rate 3e-5 \
|
88 |
+
--temperature 2.0 \
|
89 |
+
--save_path ./distilled_healthcare_model \
|
90 |
+
--log_dir ./logs/healthcare_distillation \
|
91 |
+
--checkpoint_dir ./checkpoints/healthcare_distillation \
|
92 |
+
--early_stopping_patience 2
|
93 |
+
|
94 |
+
|
95 |
+
```
|
96 |
|
97 |
### 1. Train a Web Search Agent
|
98 |
|