forked from FlagOpen/FlagEmbedding
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
974ce9a
commit a08f352
Showing
9 changed files
with
139 additions
and
97 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
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
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
35 changes: 21 additions & 14 deletions
35
FlagEmbedding/finetune/reranker/decoder_only/layerwise/__main__.py
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 |
---|---|---|
@@ -1,23 +1,30 @@ | ||
from transformers import HfArgumentParser | ||
|
||
from FlagEmbedding.abc.finetune.reranker import ( | ||
AbsRerankerModelArguments, | ||
AbsRerankerDataArguments, | ||
AbsRerankerTrainingArguments | ||
) | ||
|
||
from FlagEmbedding.finetune.reranker.decoder_only.layerwise.runner import DecoderOnlyRerankerRunner | ||
from FlagEmbedding.finetune.reranker.decoder_only.layerwise.arguments import RerankerModelArguments | ||
from FlagEmbedding.finetune.reranker.decoder_only.layerwise import ( | ||
DecoderOnlyRerankerRunner, | ||
RerankerModelArguments | ||
) | ||
|
||
parser = HfArgumentParser((RerankerModelArguments, AbsRerankerDataArguments, AbsRerankerTrainingArguments)) | ||
model_args, data_args, training_args = parser.parse_args_into_dataclasses() | ||
model_args: RerankerModelArguments | ||
data_args: AbsRerankerDataArguments | ||
training_args: AbsRerankerTrainingArguments | ||
|
||
runner = DecoderOnlyRerankerRunner( | ||
model_args=model_args, | ||
data_args=data_args, | ||
training_args=training_args | ||
) | ||
runner.run() | ||
def main(): | ||
parser = HfArgumentParser((RerankerModelArguments, AbsRerankerDataArguments, AbsRerankerTrainingArguments)) | ||
model_args, data_args, training_args = parser.parse_args_into_dataclasses() | ||
model_args: RerankerModelArguments | ||
data_args: AbsRerankerDataArguments | ||
training_args: AbsRerankerTrainingArguments | ||
|
||
runner = DecoderOnlyRerankerRunner( | ||
model_args=model_args, | ||
data_args=data_args, | ||
training_args=training_args | ||
) | ||
runner.run() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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