#!/bin/bash

export INFONCE_TEMPERATURE=0.01
export INFONCE_USE_BATCH=1
export INFONCE_HARD_NEGATIVES=0
export INFONCE_MASK_FAKE_NEGATIVE=0

nproc_per_node=1 
NPROC_PER_NODE=$nproc_per_node \
swift sft \
    --model /root/autodl-tmp/models/Qwen3-Embedding-0.6B \
    --task_type embedding \
    --model_type qwen3_emb \
    --train_type full \
    --dataset sentence-transformers/stsb:all \
    --split_dataset_ratio 0.05 \
    --eval_strategy steps \
    --output_dir output \
    --eval_steps 200 \
    --num_train_epochs 5 \
    --save_steps 200 \
    --per_device_train_batch_size 16 \
    --per_device_eval_batch_size 4 \
    --gradient_accumulation_steps 2 \
    --learning_rate 6e-6 \
    --loss_type infonce  \
    --label_names labels \
    --dataloader_drop_last true \
    --deepspeed zero3
