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
+4
View File
@@ -0,0 +1,4 @@
# Mixed usage
CUDA_VISIBLE_DEVICES=0 \
swift infer examples/yaml/deepspeed/infer.yaml \
--adapters output/vx-xxx/checkpoint-xxx
+4
View File
@@ -0,0 +1,4 @@
# generation args
max_new_tokens: 1024
temperature: 0
stream: true
+32
View File
@@ -0,0 +1,32 @@
{
"model": "Qwen/Qwen2.5-7B-Instruct",
"torch_dtype": "bfloat16",
"tuner_type": "lora",
"lora_rank": 8,
"lora_alpha": 32,
"target_modules": "all-linear",
"dataset": [
"AI-ModelScope/alpaca-gpt4-data-zh#500",
"AI-ModelScope/alpaca-gpt4-data-en#500",
"swift/self-cognition#500"
],
"split_dataset_ratio": 0.0,
"max_length": 2048,
"system": "You are a helpful assistant.",
"model_author": "swift",
"model_name": "swift-bot",
"num_train_epochs": 1,
"per_device_train_batch_size": 1,
"per_device_eval_batch_size": 1,
"learning_rate": 1e-4,
"gradient_accumulation_steps": 8,
"eval_steps": 50,
"save_steps": 50,
"save_total_limit": 2,
"logging_steps": 5,
"output_dir": "output",
"warmup_ratio": 0.05,
"dataloader_num_workers": 4,
"dataset_num_proc": 4,
"deepspeed": "zero2"
}
+7
View File
@@ -0,0 +1,7 @@
NPROC_PER_NODE=2 \
CUDA_VISIBLE_DEVICES=0,1 \
swift sft examples/yaml/deepspeed/sft.yaml
# NPROC_PER_NODE=2 \
# CUDA_VISIBLE_DEVICES=0,1 \
# swift sft examples/yaml/deepspeed/sft.json
+36
View File
@@ -0,0 +1,36 @@
# model args
model: Qwen/Qwen2.5-7B-Instruct
torch_dtype: bfloat16
tuner_type: lora
lora_rank: 8
lora_alpha: 32
target_modules: all-linear
# dataset args
dataset:
- 'AI-ModelScope/alpaca-gpt4-data-zh#500'
- 'AI-ModelScope/alpaca-gpt4-data-en#500'
- 'swift/self-cognition#500'
split_dataset_ratio: 0.0
max_length: 2048
system: 'You are a helpful assistant.'
model_author: swift
model_name: swift-bot
# training args
num_train_epochs: 1
per_device_train_batch_size: 1
per_device_eval_batch_size: 1
learning_rate: 1e-4
gradient_accumulation_steps: 8
eval_steps: 50
save_steps: 50
save_total_limit: 2
logging_steps: 5
output_dir: output
warmup_ratio: 0.05
dataloader_num_workers: 4
dataset_num_proc: 4
deepspeed: zero2
+4
View File
@@ -0,0 +1,4 @@
CUDA_VISIBLE_DEVICES=0,1,2,3 \
swift infer \
examples/yaml/megatron/infer.yaml \
--model megatron_output/Qwen3.5-35B-A3B/vx-xxx/checkpoint-xxx-merged \
+10
View File
@@ -0,0 +1,10 @@
ENV:
PYTORCH_CUDA_ALLOC_CONF: 'expandable_segments:True'
MAX_PIXELS: '1003520'
VIDEO_MAX_PIXELS: '50176'
FPS_MAX_FRAMES: '12'
stream: true
enable_thinking: false
max_new_tokens: 512
load_data_args: true
+4
View File
@@ -0,0 +1,4 @@
NPROC_PER_NODE=4 \
CUDA_VISIBLE_DEVICES=0,1,2,3 \
megatron sft \
examples/yaml/megatron/sft.yaml
+66
View File
@@ -0,0 +1,66 @@
ENV:
PYTORCH_CUDA_ALLOC_CONF: 'expandable_segments:True'
MAX_PIXELS: '1003520'
VIDEO_MAX_PIXELS: '50176'
FPS_MAX_FRAMES: '12'
# model args
model: "Qwen/Qwen3.5-35B-A3B"
tuner_type: lora
lora_rank: 8
lora_alpha: 32
target_modules: all-linear
# dataset args
dataset:
- 'AI-ModelScope/alpaca-gpt4-data-zh#500'
- 'AI-ModelScope/alpaca-gpt4-data-en#500'
- 'swift/self-cognition#500'
- 'AI-ModelScope/LaTeX_OCR:human_handwrite#2000'
load_from_cache_file: true
split_dataset_ratio: 0.01
max_length: 2048
dataloader_num_workers: 4
dataset_num_proc: 4
model_author: swift
model_name: swift-bot
padding_free: true
packing: true
# template args
loss_scale: ignore_empty_think
add_non_thinking_prefix: true
# training args
save_safetensors: true
merge_lora: true
micro_batch_size: 1
global_batch_size: 4
num_train_epochs: 1
finetune: true
lr: 1e-4
lr_warmup_fraction: 0.05
min_lr: 1e-5
output_dir: megatron_output/Qwen3.5-35B-A3B
eval_steps: 200
save_steps: 200
no_save_optim: true
no_save_rng: true
freeze_llm: false
freeze_vit: true
freeze_aligner: true
expert_model_parallel_size: 4
sequence_parallel: true
moe_permute_fusion: true
moe_grouped_gemm: true
moe_shared_expert_overlap: true
moe_aux_loss_coeff: 1e-6
recompute_granularity: full
recompute_method: uniform
recompute_num_layers: 1
cross_entropy_loss_fusion: true
attention_backend: flash