第一輪 LoRA 微調,使用 traffic_law_round1(初版小規模資料集)對
yentinglin/Llama-3-Taiwan-8B-Instruct-rc2
進行微調,主要用於驗證 LLaMA-Factory 訓練流程。後續 Round 2 的兩個模型
(round2-sonnet46-lora / round2-gpt4o-baseline-lora)已取代本模型作為正式比較對象。
yentinglin/Llama-3-Taiwan-8B-Instruct-rc2traffic_law_round1lora_target=all, rank=16, alpha=32, dropout=0.05from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "yentinglin/Llama-3-Taiwan-8B-Instruct-rc2"
adapter_id = "traffic-legal-lm/round1-lora"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(base_model_id, torch_dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(model, adapter_id)
更完整的處理流程、資料集與評估說明請見專案 repo: Traffic_Legal_LM
第一輪 LoRA 微調,使用 traffic_law_round1(初版小規模資料集)對
yentinglin/Llama-3-Taiwan-8B-Instruct-rc2
進行微調,主要用於驗證 LLaMA-Factory 訓練流程。後續 Round 2 的兩個模型
(round2-sonnet46-lora / round2-gpt4o-baseline-lora)已取代本模型作為正式比較對象。
yentinglin/Llama-3-Taiwan-8B-Instruct-rc2traffic_law_round1lora_target=all, rank=16, alpha=32, dropout=0.05from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "yentinglin/Llama-3-Taiwan-8B-Instruct-rc2"
adapter_id = "traffic-legal-lm/round1-lora"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(base_model_id, torch_dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(model, adapter_id)
更完整的處理流程、資料集與評估說明請見專案 repo: Traffic_Legal_LM