Facico / Chinese-Vicuna

Chinese-Vicuna: A Chinese Instruction-following LLaMA-based Model —— 一个中文低资源的llama+lora方案,结构参考alpaca
https://github.com/Facico/Chinese-Vicuna
Apache License 2.0
4.14k stars 422 forks source link

prompt的这些内容是否是多余的,占用了token空间? #179

Closed apachemycat closed 1 year ago

apachemycat commented 1 year ago

class prompt: def init(self, tokenizer, max_len, add_eos=True): self.tokenizer = tokenizer self.max_len = max_len self.add_eos=add_eos

class instruct_prompt(prompt): prompt = ( "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n" "### Instruction:\n{instruction}\n\n### Response:" ) prompt_input = ( "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n" "### Instruction:{instruction}\n\n### Input:{input}\n\n### Response:" )

个人感觉,这些英文的部分是多余的,其他训练的代码中,没有见到类似的内容?

Facico commented 1 year ago

不是多余的,这些内容非常必要,不管是哪个和instruction tuning有关的代码基本都有这些东西