init🎉:
This commit is contained in:
		
							
								
								
									
										0
									
								
								train/configs/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								train/configs/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										11
									
								
								train/configs/finetune_arguments.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								train/configs/finetune_arguments.py
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| from dataclasses import dataclass, field | ||||
|  | ||||
|  | ||||
| ### 定义一些配置信息 | ||||
| @dataclass | ||||
| class FinetuneArguments: | ||||
|     model_name: str = field() | ||||
|     data_path: str = field() | ||||
|     train_size: int = field(default=-1) | ||||
|     test_size: int = field(default=100) | ||||
|     max_len: int = field(default=1024) | ||||
							
								
								
									
										4
									
								
								train/configs/fsdp/internlm_fsdp_config.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								train/configs/fsdp/internlm_fsdp_config.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| { | ||||
|     "fsdp_transformer_layer_cls_to_wrap": ["InternLMDecoderLayer"], | ||||
|     "limit_all_gathers": true | ||||
| } | ||||
							
								
								
									
										4
									
								
								train/configs/fsdp/llama2_fsdp_config.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								train/configs/fsdp/llama2_fsdp_config.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| { | ||||
|     "fsdp_transformer_layer_cls_to_wrap": ["LlamaDecoderLayer"], | ||||
|     "limit_all_gathers": true | ||||
| } | ||||
							
								
								
									
										4
									
								
								train/configs/fsdp/qwen_fsdp_config.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								train/configs/fsdp/qwen_fsdp_config.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| { | ||||
|     "fsdp_transformer_layer_cls_to_wrap": ["QWenBlock"], | ||||
|     "limit_all_gathers": true | ||||
| } | ||||
							
								
								
									
										26
									
								
								train/configs/logger_config.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								train/configs/logger_config.py
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,26 @@ | ||||
| logger_config = { | ||||
|     'version': 1, | ||||
|     'formatters': { | ||||
|         'simple': { | ||||
|             'format': f"%(asctime)s %(name)s %(levelname)s: %(message)s", | ||||
|             'datefmt': '%Y-%m-%d %H:%M:%S', | ||||
|         }, | ||||
|         # 其他的 formatter | ||||
|     }, | ||||
|     'handlers': { | ||||
|         'console': { | ||||
|             'class': 'logging.StreamHandler', | ||||
|             'level': 'DEBUG', | ||||
|             'formatter': 'simple', | ||||
|         }, | ||||
|         # 其他的 handler | ||||
|     }, | ||||
|     'loggers':{ | ||||
|         # 仅输出到控制台,使用 StreamLogger | ||||
|         'StreamLogger': { | ||||
|             'handlers': ['console'], | ||||
|             'level': 'DEBUG', | ||||
|         }, | ||||
|         # 其他的 Logger | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user