File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 --max_passage_length 512 \
66 --batch_size 256 \
77 --fp16 \
8- --add_instruction False \
98 --pooling_method cls \
109 --normalize_embeddings True
1110"""
@@ -35,14 +34,6 @@ class ModelArgs:
3534 default = True ,
3635 metadata = {'help' : 'Use fp16 in inference?' }
3736 )
38- add_instruction : bool = field (
39- default = False ,
40- metadata = {'help' : 'Add instruction?' }
41- )
42- passage_instruction_for_retrieval : str = field (
43- default = None ,
44- metadata = {'help' : 'passage instruction for retrieval' }
45- )
4637 pooling_method : str = field (
4738 default = 'cls' ,
4839 metadata = {'help' : "Pooling method. Avaliable methods: 'cls', 'mean'" }
@@ -78,8 +69,6 @@ def get_model(model_args: ModelArgs):
7869 model_args .encoder ,
7970 pooling_method = model_args .pooling_method ,
8071 normalize_embeddings = model_args .normalize_embeddings ,
81- # query_instruction_for_retrieval=model_args.query_instruction_for_retrieval if model_args.add_instruction else None,
82- passage_instruction_for_retrieval = model_args .passage_instruction_for_retrieval if model_args .add_instruction else None ,
8372 use_fp16 = model_args .fp16
8473 )
8574 return model
Original file line number Diff line number Diff line change 66 --max_passage_length 8192 \
77 --batch_size 4 \
88 --fp16 \
9- --add_instruction False \
109 --pooling_method cls \
1110 --normalize_embeddings True
1211"""
@@ -30,14 +29,6 @@ class ModelArgs:
3029 default = True ,
3130 metadata = {'help' : 'Use fp16 in inference?' }
3231 )
33- add_instruction : bool = field (
34- default = False ,
35- metadata = {'help' : 'Add instruction?' }
36- )
37- passage_instruction_for_retrieval : str = field (
38- default = None ,
39- metadata = {'help' : 'passage instruction for retrieval' }
40- )
4132 pooling_method : str = field (
4233 default = 'cls' ,
4334 metadata = {'help' : "Pooling method. Avaliable methods: 'cls', 'mean'" }
@@ -78,8 +69,6 @@ def get_model(model_args: ModelArgs):
7869 model_args .encoder ,
7970 pooling_method = model_args .pooling_method ,
8071 normalize_embeddings = model_args .normalize_embeddings ,
81- # query_instruction_for_retrieval=model_args.query_instruction_for_retrieval if model_args.add_instruction else None,
82- passage_instruction_for_retrieval = model_args .passage_instruction_for_retrieval if model_args .add_instruction else None ,
8372 use_fp16 = model_args .fp16
8473 )
8574 return model
You can’t perform that action at this time.
0 commit comments