代码拉取完成,页面将自动刷新
seed: 0
output_dir: './output' # path to save checkpoint/strategy
load_checkpoint: ''
src_strategy_path_or_dir: ''
auto_trans_ckpt: False # If true, auto transform load_checkpoint to load in distributed model
only_save_strategy: False
resume_training: False
run_mode: 'predict'
# trainer config
trainer:
type: CausalLanguageModelingTrainer
model_name: 'deepseek_coder_7b_1_5'
# if True, do evaluate during the training process. if false, do nothing.
# note that the task trainer should support _evaluate_in_training function.
do_eval: False
# runner config
runner_config:
batch_size: 1
sink_mode: True
sink_size: 2
# eval dataset
eval_dataset: &eval_dataset
data_loader:
type: MindDataset
dataset_dir: ""
shuffle: False
input_columns: [ "input_ids" ]
num_parallel_workers: 8
python_multiprocessing: False
drop_remainder: False
repeat: 1
numa_enable: False
prefetch_size: 1
eval_dataset_task:
type: CausalLanguageModelDataset
dataset_config: *eval_dataset
use_parallel: False
# parallel context config
parallel:
parallel_mode: 1 # 0-data parallel, 1-semi-auto parallel, 2-auto parallel, 3-hybrid parallel
gradients_mean: False
enable_alltoall: False
full_batch: True
search_mode: "sharding_propagation"
enable_parallel_optimizer: False
strategy_ckpt_save_file: "./ckpt_strategy.ckpt"
parallel_optimizer_config:
gradient_accumulation_shard: False
parallel_optimizer_threshold: 64
# default parallel of device num = 16 for Atlas 800T A2
parallel_config:
data_parallel: 1
model_parallel: 4
pipeline_stage: 1
use_seq_parallel: False
optimizer_shard: True
micro_batch_num: 16
vocab_emb_dp: True
gradient_aggregation_group: 4
# when model parallel is greater than 1, we can set micro_batch_interleave_num=2, that may accelerate the train process.
micro_batch_interleave_num: 1
# recompute config
recompute_config:
recompute: True
select_recompute: False
parallel_optimizer_comm_recompute: False
mp_comm_recompute: True
recompute_slice_activation: True
# callbacks
callbacks:
- type: MFLossMonitor
per_print_times: 1
- type: CheckpointMonitor
prefix: "deepseek_coder_7b_1_5"
save_checkpoint_steps: 500
integrated_save: False
async_save: False
- type: ObsMonitor
# mindspore context init config
context:
mode: 0 #0--Graph Mode; 1--Pynative Mode
device_target: "Ascend"
enable_graph_kernel: False
max_call_depth: 10000
max_device_memory: "58GB"
save_graphs: False
save_graphs_path: "./graph"
device_id: 0
# model config
model:
model_config:
type: LlamaConfig
batch_size: 32 # add for increase predict
seq_length: 4096
hidden_size: 4096
num_layers: 30
num_heads: 32
n_kv_heads: 32
vocab_size: 102400
multiple_of: 256
initializer_range: 0.02
intermediate_size: 11008
max_position_embedding: 4096
block_size: 128
num_block: 1024
rms_norm_eps: 1.0e-6
bos_token_id: 100000
eos_token_id: 100015
ignore_token_id: -100
compute_dtype: "bfloat16"
layernorm_compute_type: "float32"
is_dynamic: True
softmax_compute_type: "float16"
rotary_dtype: "bfloat16"
param_init_type: "bfloat16"
use_past: True
extend_method: "None" # support "None", "PI", "NTK"
theta: 10000.0
scaling_factor: 1
use_flash_attention: True
offset: 0
checkpoint_name_or_path: ""
repetition_penalty: 1
max_decode_length: 512
top_k: 3
top_p: 1
do_sample: False
arch:
type: LlamaForCausalLM
processor:
return_tensors: ms
tokenizer:
unk_token: None
bos_token: '<|begin▁of▁sentence|>'
eos_token: '<|EOT|>'
pad_token: '<|end▁of▁sentence|>'
vocab_file: None
tokenizer_file: '' # tokenizer.json
type: LlamaTokenizerFast
type: LlamaProcessor
# metric
metric:
type: PerplexityMetric
eval_callbacks:
- type: ObsMonitor
auto_tune: False
filepath_prefix: './autotune'
autotune_per_step: 10
profile: False
profile_start_step: 1
profile_stop_step: 10
init_start_profile: False
profile_communication: False
profile_memory: True
# aicc
remote_save_url: "Please input obs url on AICC platform."
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。