davidberenstein1957 HF staff commited on
Commit
3b90025
1 Parent(s): cfdc9ea

add support for passing custom pre-query-template

Browse files
src/synthetic_dataset_generator/constants.py CHANGED
@@ -43,9 +43,7 @@ if os.getenv("MAGPIE_PRE_QUERY_TEMPLATE"):
43
  elif passed_pre_query_template.lower() in qwen_options:
44
  MAGPIE_PRE_QUERY_TEMPLATE = "qwen2"
45
  else:
46
- raise ValueError(
47
- f"MAGPIE_PRE_QUERY_TEMPLATE must be either {llama_options} or {qwen_options}."
48
- )
49
  elif MODEL.lower() in llama_options or any(
50
  option in MODEL.lower() for option in llama_options
51
  ):
 
43
  elif passed_pre_query_template.lower() in qwen_options:
44
  MAGPIE_PRE_QUERY_TEMPLATE = "qwen2"
45
  else:
46
+ MAGPIE_PRE_QUERY_TEMPLATE = passed_pre_query_template
 
 
47
  elif MODEL.lower() in llama_options or any(
48
  option in MODEL.lower() for option in llama_options
49
  ):