mirror of
				https://github.com/hiyouga/LLaMA-Factory.git
				synced 2025-11-04 18:02:19 +08:00 
			
		
		
		
	Merge pull request #5372 from LDLINGLINGLING/main
增加了对minicpm3.0的适配' Former-commit-id: 2e3c221d9c87bd59f48648be8878b7b50347280f
This commit is contained in:
		
						commit
						d6ce902d80
					
				@ -559,6 +559,15 @@ _register_template(
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
_register_template(
 | 
			
		||||
    name="cpm3",
 | 
			
		||||
    format_user=StringFormatter(slots=["<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n"]),
 | 
			
		||||
    format_prefix=EmptyFormatter(slots=[{"bos_token"}]),
 | 
			
		||||
    format_system=StringFormatter(slots=["<|im_start|>system\n{{content}}<|im_end|>\n"]),
 | 
			
		||||
    stop_words=["<|im_end|>"],
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
_register_template(
 | 
			
		||||
    name="dbrx",
 | 
			
		||||
    format_user=StringFormatter(slots=["<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n"]),
 | 
			
		||||
 | 
			
		||||
@ -809,6 +809,17 @@ register_model_group(
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
register_model_group(
 | 
			
		||||
    models={
 | 
			
		||||
        "MiniCPM3-4B": {
 | 
			
		||||
            DownloadSource.DEFAULT: "openbmb/MiniCPM3-4B",
 | 
			
		||||
            DownloadSource.MODELSCOPE: "OpenBMB/MiniCPM3-4B",
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
    template="cpm3",
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
register_model_group(
 | 
			
		||||
    models={
 | 
			
		||||
        "Mistral-7B-v0.1": {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user