-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Saibo-creator/dev
fix issues reported from Berkay
- Loading branch information
Showing
43 changed files
with
286 additions
and
1,665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,4 @@ defaults: | |
|
||
linearization_class_id: ${datamodule.linearization_class_id} | ||
|
||
|
||
_target_: src.models.IE_model.IEHFModelPL |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
project="${1:-gcd}" # Use "llama" if no argument is provided | ||
tag="${2:-latest}" # Use "latest" if no tag argument is provided | ||
user="${3:-geng}" | ||
|
||
docker build -f docker/Dockerfile --build-arg USER_NAME=${user} --build-arg PROJECT_NAME=${project} -t ic-registry.epfl.ch/dlab/"${user}"/"${project}":"${tag}" --secret id=dot_env,src=docker/.env . | ||
|
||
#docker push ic-registry.epfl.ch/dlab/"${user}"/"${project}":"${tag}" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
git+https://github.com/huggingface/transformers | ||
wandb~=0.13.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Run experiments | ||
|
||
## requirements | ||
|
||
Check the env variable is set correctly | ||
```shell | ||
echo $HF_MODELS_DIR | ||
``` | ||
|
||
Check the data and grammar objects are downloaded correctly | ||
```shell | ||
ls data assets/grammar_objects | ||
# -> CP ED IE | ||
``` | ||
|
||
Check the pre-trained models are downloaded correctly | ||
```shell | ||
ls assets/pgf | ||
# -> CP ED IE | ||
``` | ||
|
||
If anything is missing, check the [docs/download_data.md](docs/download_data.md) for instructions on how to set it. | ||
|
||
|
||
## Run the experiments | ||
|
||
### Quick start | ||
|
||
Suppose you have already `LLAMA-7B` in `$HF_MODELS_DIR`, run the following commands: | ||
|
||
```shell | ||
# run the experiments for the CP task | ||
bash run_CP.sh LLAMA-7B | ||
|
||
# run the experiments for the IE task | ||
bash run_IE.sh LLAMA-7B | ||
|
||
# run the experiments for the ED task | ||
bash run_ED.sh LLAMA-7B | ||
``` | ||
|
||
The above scripts will run the experiments for the CP, IE and ED tasks respectively with a few data samples. | ||
To run the experiments with the full dataset, please remove the `datamodule.debug_k=2` option in the scripts. | ||
|
||
## Results | ||
|
||
The generated prediction sequences will be logged to [Weights and Biases](https://wandb.ai/site). | ||
|
||
## Dry run | ||
|
||
If you don't have the model yet, you can run the experiments with a dummy model. | ||
```shell | ||
# run the experiments for the CP task | ||
bash run_CP.sh saibo/llama-1B | ||
``` | ||
|
||
`saibo/llama-1B` is a dummy model that has the same tokenizer as `LLAMA-7B` but with random weights. | ||
It only has two layers so it's much smaller. | ||
But as the model is randomly initialized, the results will be meaningless. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Run experiments without constraints | ||
|
||
You can check the results of the experiments without constraints by removing the constraints flags in the scripts. | ||
|
||
For example, remove `+constraint/gf_constraint_module/[email protected]_constraint_module="$gf_constraint_module_option"` in `run_CP.sh` will run the experiments without constraints. | ||
|
||
|
Oops, something went wrong.