From 6d04decab459f9879e843c332be601871d294fe0 Mon Sep 17 00:00:00 2001 From: Xu Song Date: Wed, 21 Feb 2024 11:19:24 +0800 Subject: [PATCH] [Fix] Fix moss template config (#897) --- configs/models/moss/hf_moss_moon_003_sft.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configs/models/moss/hf_moss_moon_003_sft.py b/configs/models/moss/hf_moss_moon_003_sft.py index ef5110df6..b0248df03 100644 --- a/configs/models/moss/hf_moss_moon_003_sft.py +++ b/configs/models/moss/hf_moss_moon_003_sft.py @@ -1,5 +1,11 @@ from opencompass.models import HuggingFaceCausalLM +_meta_template = dict( + round=[ + dict(role='HUMAN', begin='<|Human|>: ', end='\n'), + dict(role='BOT', begin='<|MOSS|>: ', end='\n', generate=True), + ], +) models = [ dict( @@ -12,6 +18,7 @@ truncation_side='left', trust_remote_code=True, ), + meta_template=_meta_template, max_out_len=100, max_seq_len=2048, batch_size=8,