mirror of
https://github.com/zenlm/zen-embedding.git
synced 2026-10-30 14:58:05 +00:00
Squashed from upstream Qwen3-Embedding with Zen LM branding. Evaluation data with broken LFS pointers excluded.
35 lines
767 B
Bash
Executable File
35 lines
767 B
Bash
Executable File
#!/bin/bash
|
|
# Training script for MODEL_NAME using Zen Gym
|
|
|
|
set -e
|
|
|
|
# Configuration
|
|
MODEL_NAME="MODEL_NAME"
|
|
DATASET="your/dataset"
|
|
OUTPUT_DIR="./output"
|
|
EPOCHS=3
|
|
BATCH_SIZE=4
|
|
LEARNING_RATE=2e-5
|
|
|
|
# Ensure Zen Gym is available
|
|
if [ ! -d "../../gym" ]; then
|
|
echo "Error: Zen Gym not found. Clone from https://github.com/zenlm/gym"
|
|
exit 1
|
|
fi
|
|
|
|
cd ../../gym
|
|
|
|
# Run training
|
|
llamafactory-cli train \
|
|
--model_name_or_path "zenlm/${MODEL_NAME}" \
|
|
--dataset "${DATASET}" \
|
|
--output_dir "${OUTPUT_DIR}" \
|
|
--num_train_epochs "${EPOCHS}" \
|
|
--per_device_train_batch_size "${BATCH_SIZE}" \
|
|
--learning_rate "${LEARNING_RATE}" \
|
|
--logging_steps 10 \
|
|
--save_steps 100 \
|
|
--do_train
|
|
|
|
echo "✅ Training complete! Model saved to ${OUTPUT_DIR}"
|