Rerank model finetuning is the process of further training rerank model on a dataset for improving its capability on specific field.
- Deploy Rerank Model Finetuning Service
- Consume Rerank Model Finetuning Service
- Validated Configurations
Refer to the Xeon Guide for details.
Refer to the Gaudi Guide for details.
Download a toy example training file toy_finetune_data.jsonl
and upload it to the server with below command, this file can be downloaded in here:
# upload a training file
curl http://${your_ip}:8015/v1/files \
-X POST \
-H "Content-Type: multipart/form-data" \
-F "file=@./toy_finetune_data.jsonl" \
-F purpose="fine-tune"
After a training file toy_finetune_data.jsonl
is uploaded, use the following command to launch a finetuning job using BAAI/bge-reranker-large
as base model:
# create a finetuning job
curl http://${your_ip}:8015/v1/fine_tuning/jobs \
-X POST \
-H "Content-Type: application/json" \
-d '{
"training_file": "toy_finetune_data.jsonl",
"model": "BAAI/bge-reranker-large",
"General":{
"task":"rerank",
"lora_config":null
}
}'
Below commands show how to list finetuning jobs, retrieve a finetuning job, cancel a finetuning job and list checkpoints of a finetuning job.
# list finetuning jobs
curl http://${your_ip}:8015/v1/fine_tuning/jobs \
-X GET
# retrieve one finetuning job
curl http://${your_ip}:8015/v1/fine_tuning/jobs/retrieve \
-X POST \
-H "Content-Type: application/json" \
-d '{"fine_tuning_job_id": ${fine_tuning_job_id}}'
# cancel one finetuning job
curl http://${your_ip}:8015/v1/fine_tuning/jobs/cancel \
-X POST \
-H "Content-Type: application/json" \
-d '{"fine_tuning_job_id": ${fine_tuning_job_id}}'
# list checkpoints of a finetuning job
curl http://${your_ip}:8015/v1/finetune/list_checkpoints \
-X POST \
-H "Content-Type: application/json" \
-d '{"fine_tuning_job_id": ${fine_tuning_job_id}}'
Deploy Method | Hardware |
---|---|
Docker Compose | Intel Xeon |
Docker Compose | Intel Gaudi |