It is trained for Korean legal retrieval tool use, not for legal answer generation. The model reads a legal query and emits JSON tool actions such as fan_out_search, review_docs, curate, verify, and end_search.
Do not use this adapter as a standalone legal advice model.
This is not a clean hidden benchmark because the source-rag data was used in repair training. Treat it as regression/post-hoc repair evidence.
1hf download gyung/lfm25-ko-legal-retriever-v10-source-repair-lora \
2 --local-dir lfm25-ko-legal-retriever-v10-source-repair-lora
1python -m vllm.entrypoints.openai.api_server \
2 --model LiquidAI/LFM2.5-8B-A1B \
3 --enable-lora \
4 --lora-modules lfm25-ko-legal-retriever-v10=./lfm25-ko-legal-retriever-v10-source-repair-lora \
5 --served-model-name lfm25-ko-legal-retriever-v10 \
6 --max-model-len 12288 \
7 --gpu-memory-utilization 0.92
1curl http://127.0.0.1:8000/v1/chat/completions \
2 -H 'Content-Type: application/json' \
3 -d '{
4 "model": "lfm25-ko-legal-retriever-v10",
5 "messages": [
6 {"role": "system", "content": "assistant 응답은 항상 JSON action 하나만 출력합니다. 허용 tool: fan_out_search, review_docs, curate, verify, end_search."},
7 {"role": "user", "content": "민법 제126조 표현대리와 관련 판례 근거 문서를 찾아라."}
8 ],
9 "temperature": 0.1,
10 "max_tokens": 192
11 }'
1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base_id = "LiquidAI/LFM2.5-8B-A1B"
5adapter_id = "gyung/lfm25-ko-legal-retriever-v10-source-repair-lora"
6
7tokenizer = AutoTokenizer.from_pretrained(base_id, trust_remote_code=True)
8model = AutoModelForCausalLM.from_pretrained(
9 base_id,
10 device_map="auto",
11 torch_dtype="auto",
12 trust_remote_code=True,
13)
14model = PeftModel.from_pretrained(model, adapter_id)
15
16messages = [
17 {
18 "role": "system",
19 "content": "assistant 응답은 항상 JSON action 하나만 출력합니다. 허용 tool: fan_out_search, review_docs, curate, verify, end_search.",
20 },
21 {"role": "user", "content": "민법 제126조 표현대리와 관련 판례 근거 문서를 찾아라."},
22]
23text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
24inputs = tokenizer(text, return_tensors="pt").to(model.device)
25outputs = model.generate(**inputs, max_new_tokens=192, do_sample=False)
26print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))