Update README.md
Browse files
README.md
CHANGED
@@ -70,22 +70,6 @@ def apply_skill(model, skill_tree):
|
|
70 |
|
71 |
model = apply_skill(model, skill_tree)
|
72 |
|
73 |
-
# Change eos_token
|
74 |
-
tokenizer.eos_token = "<|endoftext|>"
|
75 |
-
|
76 |
-
# Add Chat Template
|
77 |
-
tokenizer.chat_template = """
|
78 |
-
{% for message in messages %}
|
79 |
-
{% if message['role'] == 'system' %}
|
80 |
-
{{ bos_token + '<|system|>\\n' + message['content'].strip() + '\\n' }}
|
81 |
-
{% elif message['role'] == 'user' %}
|
82 |
-
{{ '<|user|>\\n' + message['content'].strip() + '\\n' }}
|
83 |
-
{% elif message['role'] == 'assistant' %}
|
84 |
-
{{ '<|assistant|>\\n' + message['content'] + '\\n' + eos_token }}
|
85 |
-
{% endif %}
|
86 |
-
{% endfor %}
|
87 |
-
"""
|
88 |
-
|
89 |
# Push to hub
|
90 |
model_name = "HachiML/Swallow-MS-7b-v0.1-ChatSkill-LAB"
|
91 |
tokenizer.save_pretrained(f"./models/{model_name}", repo_id=model_name, push_to_hub=True)
|
|
|
70 |
|
71 |
model = apply_skill(model, skill_tree)
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
# Push to hub
|
74 |
model_name = "HachiML/Swallow-MS-7b-v0.1-ChatSkill-LAB"
|
75 |
tokenizer.save_pretrained(f"./models/{model_name}", repo_id=model_name, push_to_hub=True)
|