镜像自地址
https://github.com/SCIR-HI/Huatuo-Llama-Med-Chinese.git
已同步 2025-12-06 06:26:48 +00:00
init code
这个提交包含在:
11
scripts/finetune.sh
普通文件
11
scripts/finetune.sh
普通文件
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
exp_tag="e1"
|
||||
python finetune.py \
|
||||
--base_model 'decapoda-research/llama-7b-hf' \
|
||||
--data_path './data/llama_data.json' \
|
||||
--output_dir './lora-llama-med-'$exp_tag \
|
||||
--prompt_template_name 'med_template' \
|
||||
--micro_batch_size 128 \
|
||||
--batch_size 128 \
|
||||
--wandb_run_name $exp_tag
|
||||
12
scripts/infer.sh
普通文件
12
scripts/infer.sh
普通文件
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# If inferring with the llama model, set 'use_lora' to 'False' and 'prompt_template' to 'ori_template'.
|
||||
# If inferring with the default alpaca model, set 'use_lora' to 'True', 'lora_weights' to 'tloen/alpaca-lora-7b', and 'prompt_template' to 'alpaca'.
|
||||
# If inferring with the llama-med model, download the LORA weights and set 'lora_weights' to './lora-llama-med' (or the exact directory of LORA weights) and 'prompt_template' to 'med_template'.
|
||||
|
||||
python infer.py \
|
||||
--base_model 'decapoda-research/llama-7b-hf' \
|
||||
--lora_weights './lora-llama-med' \
|
||||
--use_lora True \
|
||||
--instruct_dir './data/infer.json' \
|
||||
--prompt_template 'med_template'
|
||||
在新工单中引用
屏蔽一个用户