Views
No views yet
| Option | Based On | Total Params | Active/Token | Experts | Attention |
|---|---|---|---|---|---|
| A (Recommended) | GPT-OSS-20B | 21B | 3.6B | 32, top-4 | GQA + sliding/full |
| B | DeepSeek-V2-Lite | 15.7B | 2.4B | 64, top-6 | MLA + shared experts |
Phase 0: Data Preparation (2-4 weeks)
└─ Crawl internal repos → Generate synthetic data → Filter/dedup → Tokenize
Phase 1: Pre-Training with Megatron-LM (4-8 weeks)
├─ 1a: General pre-training (4K context, all data)
├─ 1b: Code-heavy annealing (increased code ratio)
└─ 1c: Long-context extension (→ 131K via YaRN)
Phase 2: SFT with TRL (2-3 days)
└─ Instruction-following on code, Slurm, reasoning tasks
Phase 3: GRPO RL (3-5 days)
└─ Code execution rewards + math verification + Slurm validation
Phase 4: Evaluation
└─ HumanEval, MBPP, GSM8K, MATH, MMLU + custom benchmarks├── configs/ # Model architecture configs
│ ├── model_gptoss_20b.yaml # GPT-OSS-20B style (recommended)
│ └── model_deepseek_v2lite.yaml # DeepSeek-V2-Lite style (alternative)
├── scripts/ # Training scripts
│ ├── pretrain_megatron.sh # Megatron-LM pre-training launcher
│ ├── convert_to_hf.py # Megatron → HuggingFace conversion
│ ├── sft_train.py # SFT with TRL
│ ├── rl_grpo_train.py # GRPO reinforcement learning
│ └── setup_environment.sh # Environment setup
├── data_curation/ # Data preparation pipeline
│ ├── crawl_internal_repos.py # Extract code from your repos
│ ├── generate_synthetic_data.py # LLM-powered data generation
│ ├── filter_and_dedup.py # Quality filtering + MinHash dedup
│ ├── prepare_slurm_data.py # Slurm/bash data curation
│ └── tokenize_for_megatron.py # Convert to Megatron binary format
├── slurm/ # Slurm job scripts
│ ├── pretrain.sbatch # Pre-training job (4 nodes)
│ ├── sft.sbatch # SFT job (1 node)
│ └── eval.sbatch # Evaluation job (1 node)
└── docs/ # Documentation
├── MASTER_PLAN.md # Complete training plan
├── ARCHITECTURE_GUIDE.md # MoE architecture deep-dive
└── DATA_GUIDE.md # Dataset and data curation guide1# 1. Set up environments
2bash scripts/setup_environment.sh
3
4# 2. Curate your internal data
5python data_curation/crawl_internal_repos.py --repos /path/to/your/repos --output data/internal.jsonl
6python data_curation/generate_synthetic_data.py --input data/internal.jsonl --output data/synthetic.jsonl
7python data_curation/filter_and_dedup.py --input data/internal.jsonl data/synthetic.jsonl --output data/filtered.jsonl
8python data_curation/tokenize_for_megatron.py --input data/filtered.jsonl --output-prefix data/tokenized/internal
9
10# 3. Launch pre-training
11sbatch slurm/pretrain.sbatch
12
13# 4. Convert checkpoint and run SFT
14python scripts/convert_to_hf.py --megatron-checkpoint checkpoints/iter_100000 --output-dir hf-model
15sbatch slurm/sft.sbatch
16
17# 5. Run RL
18torchrun --nproc_per_node=4 scripts/rl_grpo_train.py --model-path sft-model --output-dir rl-model