e5 mistral 7b instruct
1.0.0
docker build -t pytorch . docker run --gpus=all --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 -it --rm -v $( pwd ) :/e5-mistral-7b-instruct/ pytorch bash运行prepare_dataset ,以创建一个与SNLI的Postive和负面对的相似性数据集。
python prepare_dataset.py设置模型缓存文件夹export TRANSFORMERS_CACHE=.cache/
首先,运行accelerate config --config_file ds_zero3_cpu.yaml
在此处查看单个GPU的示例文件
以下给定参数是从纸上取出的。调整对数据集和用户酶的重新调整。
accelerate launch
--config_file ds_zero3_cpu.yaml
peft_lora_embedding_semantic_search.py
--dataset_name similarity_dataset
--max_length 512
--model_name_or_path intfloat/e5-mistral-7b-instruct
--per_device_train_batch_size 1
--per_device_eval_batch_size 1
--learning_rate 0.0001
--weight_decay 0.01
--max_train_steps 1000
--gradient_accumulation_steps 2048
--lr_scheduler_type linear
--num_warmup_steps 100
--output_dir trained_model
--use_peft从这里复制损失函数 - > https://github.com/relbers/info-nce-pytorch