SolsticeAI commited on
Commit
4d784ba
·
verified ·
1 Parent(s): 28d1228

feat: update apply_template.py for Protium-1.0

Browse files
Files changed (1) hide show
  1. apply_template.py +4 -4
apply_template.py CHANGED
@@ -1,6 +1,6 @@
1
  #!/usr/bin/env python3
2
  """
3
- HyperSynapse-SAS Chat Template Applier
4
  Usage:
5
  python apply_template.py --template universal --local-dir ./path/to/model
6
  python apply_template.py --template deepseek --model-id Solstice-AI/my-model --push
@@ -70,20 +70,20 @@ def apply_hub(model_id, template_name, push=False, token=None):
70
  path_or_fileobj=json.dumps(tc, indent=2, ensure_ascii=False).encode("utf-8"),
71
  path_in_repo="tokenizer_config.json",
72
  repo_id=model_id,
73
- commit_message=f"feat: apply HyperSynapse-SAS {template_name} chat template"
74
  )
75
  api.upload_file(
76
  path_or_fileobj=template_code.encode("utf-8"),
77
  path_in_repo="chat_template.jinja",
78
  repo_id=model_id,
79
- commit_message=f"feat: add HyperSynapse-SAS {template_name} chat_template.jinja"
80
  )
81
  print(f" Successfully pushed to {model_id}!")
82
  else:
83
  print("Dry run completed. Pass --push to commit changes to Hugging Face Hub.")
84
 
85
  def main():
86
- parser = argparse.ArgumentParser(description="Apply HyperSynapse-SAS Chat Templates")
87
  parser.add_argument("--template", "-t", required=True, choices=list(TEMPLATES.keys()), help="Template family to apply")
88
  parser.add_argument("--local-dir", "-l", help="Path to local model directory")
89
  parser.add_argument("--model-id", "-m", help="Hugging Face Model ID (e.g. org/model)")
 
1
  #!/usr/bin/env python3
2
  """
3
+ Protium-1.0 Chat Template Applier
4
  Usage:
5
  python apply_template.py --template universal --local-dir ./path/to/model
6
  python apply_template.py --template deepseek --model-id Solstice-AI/my-model --push
 
70
  path_or_fileobj=json.dumps(tc, indent=2, ensure_ascii=False).encode("utf-8"),
71
  path_in_repo="tokenizer_config.json",
72
  repo_id=model_id,
73
+ commit_message=f"feat: apply Protium-1.0 {template_name} chat template"
74
  )
75
  api.upload_file(
76
  path_or_fileobj=template_code.encode("utf-8"),
77
  path_in_repo="chat_template.jinja",
78
  repo_id=model_id,
79
+ commit_message=f"feat: add Protium-1.0 {template_name} chat_template.jinja"
80
  )
81
  print(f" Successfully pushed to {model_id}!")
82
  else:
83
  print("Dry run completed. Pass --push to commit changes to Hugging Face Hub.")
84
 
85
  def main():
86
+ parser = argparse.ArgumentParser(description="Apply Protium-1.0 Chat Templates")
87
  parser.add_argument("--template", "-t", required=True, choices=list(TEMPLATES.keys()), help="Template family to apply")
88
  parser.add_argument("--local-dir", "-l", help="Path to local model directory")
89
  parser.add_argument("--model-id", "-m", help="Hugging Face Model ID (e.g. org/model)")