Skip to content

Official Codebase of 3DCodeVerse

Python

mm: the three-way ablation says a reference image adds nothing over the caption

gaoypengf7858fa7fe17
diff --git a/finetune/configs/lf/export_mm_img.yaml b/finetune/configs/lf/export_mm_img.yaml
new file mode 100644
index 00000000..99fe5dff
--- /dev/null
+++ b/finetune/configs/lf/export_mm_img.yaml
@@ -0,0 +1,12 @@
+### Merge a LoRA adapter into the base model (LLaMA-Factory): llamafactory-cli export <this file>
+model_name_or_path: /wekafs/ict/hx_624/models/Qwen3.5-9B
+adapter_name_or_path: /wekafs/ict/hx_624/llm-ft/runs/lf_qwen35_9b_mm_img
+template: qwen3_5
+enable_thinking: false
+trust_remote_code: true
+finetuning_type: lora
+
+export_dir: /wekafs/ict/hx_624/llm-ft/runs/lf_qwen35_9b_mm_img/merged
+export_size: 5
+export_device: cpu
+export_legacy_format: false
diff --git a/finetune/configs/lf/export_mm_text.yaml b/finetune/configs/lf/export_mm_text.yaml
new file mode 100644
index 00000000..cd14ea17
--- /dev/null
+++ b/finetune/configs/lf/export_mm_text.yaml
@@ -0,0 +1,12 @@
+### Merge a LoRA adapter into the base model (LLaMA-Factory): llamafactory-cli export <this file>
+model_name_or_path: /wekafs/ict/hx_624/models/Qwen3.5-9B
+adapter_name_or_path: /wekafs/ict/hx_624/llm-ft/runs/lf_qwen35_9b_mm_text
+template: qwen3_5
+enable_thinking: false
+trust_remote_code: true
+finetuning_type: lora
+
+export_dir: /wekafs/ict/hx_624/llm-ft/runs/lf_qwen35_9b_mm_text/merged
+export_size: 5
+export_device: cpu
+export_legacy_format: false
diff --git a/finetune/configs/lf/lora_27b_mm_img_text.yaml b/finetune/configs/lf/lora_27b_mm_img_text.yaml
index 034da312..4e51f1db 100644
--- a/finetune/configs/lf/lora_27b_mm_img_text.yaml
+++ b/finetune/configs/lf/lora_27b_mm_img_text.yaml
@@ -9,18 +9,19 @@ lora_alpha: 128
lora_dropout: 0.05
lora_target: all
freeze_vision_tower: true
+image_max_pixels: 200704
freeze_multi_modal_projector: true
dataset_dir: /wekafs/ict/hx_624/llm-ft/data/mm1
dataset: 3dcv_mm_img_text_train
eval_dataset: 3dcv_mm_img_text_val
template: qwen3_5
enable_thinking: false
-cutoff_len: 6144
+cutoff_len: 4096
preprocessing_num_workers: 16
dataloader_num_workers: 4
neat_packing: false
packing: false
-tokenized_path: /wekafs/ict/hx_624/llm-ft/data/lf/tok_mm1_27b_img_text
+tokenized_path: /wekafs/ict/hx_624/llm-ft/data/lf/tok_mm1_27b_img_text_len4096_px448
output_dir: /wekafs/ict/hx_624/llm-ft/runs/lf_qwen38_27b_mm_img_text
logging_steps: 5
save_steps: 300
diff --git a/finetune/scripts/run_9b_mmmix2.sh b/finetune/scripts/run_9b_mmmix2.sh
index ad2c5e69..fcc82eff 100755
--- a/finetune/scripts/run_9b_mmmix2.sh
+++ b/finetune/scripts/run_9b_mmmix2.sh
@@ -2,7 +2,7 @@
# Image-conditioned pilot: render -> code. The qwen3_5 template already carries the qwen3_vl multimodal plugin,
# so this is the first run in the project that feeds the model what a caption cannot express — the target's shape.
set -uo pipefail; cd /wekafs/ict/hx_624/llm-ft
-G=$(scripts/free_gpus.sh); N=$(echo "$G" | awk -F, '{print NF}')
+G=${GPUS:-$(scripts/free_gpus.sh)}; N=$(echo "$G" | awk -F, '{print NF}')
echo "[9bmmmix2] $(date) smoke on GPUs $G"
GPUS=$G scripts/lf_train.sh configs/lf/lora_9b_mmmix2.yaml max_steps=6 save_steps=100000 eval_steps=100000 \
output_dir=/wekafs/ict/hx_624/llm-ft/runs/_smoke_mmmix24 > logs/smoke_mmmix2.log 2>&1
diff --git a/finetune/scripts/run_9b_mmvis.sh b/finetune/scripts/run_9b_mmvis.sh
index 642ee235..0a63522a 100755
--- a/finetune/scripts/run_9b_mmvis.sh
+++ b/finetune/scripts/run_9b_mmvis.sh
@@ -2,7 +2,7 @@
# Image-conditioned pilot: render -> code. The qwen3_5 template already carries the qwen3_vl multimodal plugin,
# so this is the first run in the project that feeds the model what a caption cannot express — the target's shape.
set -uo pipefail; cd /wekafs/ict/hx_624/llm-ft
-G=$(scripts/free_gpus.sh); N=$(echo "$G" | awk -F, '{print NF}')
+G=${GPUS:-$(scripts/free_gpus.sh)}; N=$(echo "$G" | awk -F, '{print NF}')
echo "[9bmmvis] $(date) smoke on GPUs $G"
GPUS=$G scripts/lf_train.sh configs/lf/lora_9b_mmvis.yaml max_steps=6 save_steps=100000 eval_steps=100000 \
output_dir=/wekafs/ict/hx_624/llm-ft/runs/_smoke_mmvis4 > logs/smoke_mmvis.log 2>&1