chore: import upstream snapshot with attribution
Lint test / lint (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:34:58 +08:00
commit a203934033
1368 changed files with 175001 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
# 2 * 70GiB
# For inference code, refer to: examples/infer/demo_embedding.py
PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True' \
NPROC_PER_NODE=2 \
CUDA_VISIBLE_DEVICES=0,1 \
INFONCE_TEMPERATURE=0.1 \
megatron sft \
--model Qwen/Qwen3-Embedding-8B \
--task_type embedding \
--save_safetensors true \
--tuner_type full \
--dataset sentence-transformers/stsb:positive \
--load_from_cache_file true \
--split_dataset_ratio 0.02 \
--tensor_model_parallel_size 2 \
--sequence_parallel true \
--micro_batch_size 16 \
--global_batch_size 16 \
--recompute_granularity full \
--recompute_method uniform \
--recompute_num_layers 1 \
--finetune true \
--cross_entropy_loss_fusion true \
--lr 5e-6 \
--lr_warmup_fraction 0.05 \
--min_lr 1e-7 \
--num_train_epochs 5 \
--output_dir megatron_output/Qwen3-Embedding-8B \
--save_steps 200 \
--eval_steps 100 \
--max_length 8192 \
--loss_type infonce \
--dataloader_num_workers 4 \
--no_save_optim true \
--no_save_rng true \
--dataset_num_proc 4
@@ -0,0 +1,36 @@
# 2 * 80GiB
# For inference code, refer to: examples/infer/demo_embedding.py
PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True' \
NPROC_PER_NODE=2 \
CUDA_VISIBLE_DEVICES=0,1 \
INFONCE_TEMPERATURE=0.1 \
megatron sft \
--model Qwen/Qwen3-VL-Embedding-8B \
--task_type embedding \
--save_safetensors true \
--tuner_type full \
--dataset swift/TextCaps:emb \
--load_from_cache_file true \
--split_dataset_ratio 0.02 \
--tensor_model_parallel_size 2 \
--sequence_parallel true \
--micro_batch_size 16 \
--global_batch_size 16 \
--recompute_granularity full \
--recompute_method uniform \
--recompute_num_layers 1 \
--finetune true \
--cross_entropy_loss_fusion true \
--lr 5e-6 \
--lr_warmup_fraction 0.05 \
--min_lr 1e-7 \
--num_train_epochs 1 \
--output_dir megatron_output/Qwen3-VL-Embedding-8B \
--save_steps 200 \
--eval_steps 100 \
--max_length 8192 \
--loss_type infonce \
--dataloader_num_workers 4 \
--no_save_optim true \
--no_save_rng true \
--dataset_num_proc 4