### 0
mkdir -p /root/models /root/datasets

### 1
hf download jdopensource/JoyAI-LLM-Flash
  --local-dir /root/models/JoyAI-LLM-Flash

### 2
hf download
  --repo-type dataset zhuzilin/dapo-math-17k
  --local-dir /root/datasets/dapo-math-17k

### 3
hf download
  --repo-type dataset zhuzilin/aime-2024
  --local-dir /root/datasets/aime-2024

### 4
PYTHONPATH=<REPO_ROOT>:/root/Megatron-LM:/frozen/pythonpath torchrun
  --nproc-per-node 4 <REPO_ROOT>/tools/convert_hf_to_torch_dist.py
  --disable-bias-linear
  --num-layers 40
  --hidden-size 2048
  --ffn-hidden-size 7168
  --num-attention-heads 32
  --kv-channels 128
  --normalization RMSNorm
  --position-embedding-type rope
  --rope-type rope
  --norm-epsilon 1e-6
  --swiglu
  --untie-embeddings-and-output-weights
  --vocab-size 129280
  --multi-latent-attention
  --q-lora-rank 1536
  --kv-lora-rank 512
  --qk-head-dim 128
  --qk-pos-emb-head-dim 64
  --v-head-dim 128
  --qk-layernorm
  --rotary-base 32000000
  --mscale 1.0
  --mscale-all-dim 1.0
  --attention-softmax-in-fp32
  --no-rope-fusion
  --num-experts 256
  --moe-layer-freq '[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]'
  --moe-ffn-hidden-size 768
  --moe-router-topk 8
  --moe-shared-expert-intermediate-size 768
  --moe-router-pre-softmax
  --moe-router-score-function sigmoid
  --moe-router-enable-expert-bias
  --moe-router-load-balancing-type seq_aux_loss
  --moe-token-dispatcher-type alltoall
  --moe-aux-loss-coeff 0
  --moe-router-bias-update-rate 0
  --moe-router-group-topk 1
  --moe-router-num-groups 1
  --moe-grouped-gemm
  --moe-router-topk-scaling-factor 2.5
  --moe-router-dtype fp32
  --moe-permute-fusion
  --hf-checkpoint /root/models/JoyAI-LLM-Flash
  --save /root/models/JoyAI-LLM-Flash_torch_dist 
