Release v0.1.6

Former-commit-id: 43c8b3c3c8bfb2e32d17fb3e8b194938e37d54bd
This commit is contained in:
hiyouga
2023-08-11 23:25:57 +08:00
parent 2144bb0e27
commit d5f1b99ac4
18 changed files with 127 additions and 41 deletions

View File

@@ -178,7 +178,7 @@ def register_template(
stop_words: List[str],
use_history: bool
) -> None:
template_class = Llama2Template if name == "llama2" else Template
template_class = Llama2Template if "llama2" in name else Template
templates[name] = template_class(
prefix=prefix,
prompt=prompt,
@@ -272,6 +272,23 @@ register_template(
)
r"""
Supports: https://github.com/ymcui/Chinese-LLaMA-Alpaca-2
"""
register_template(
name="llama2_zh",
prefix=[
"<<SYS>>\nYou are a helpful assistant. 你是一个乐于助人的助手。\n<</SYS>>\n\n"
],
prompt=[
"[INST] {{query}} [/INST] "
],
sep=[],
stop_words=[],
use_history=True
)
r"""
Supports: https://huggingface.co/tatsu-lab/alpaca-7b-wdiff
https://github.com/ymcui/Chinese-LLaMA-Alpaca