Downloads · 30 days
6
19% of all-time downloads
gyung/lfm25-ko-legal-retriever-v11-strict-action-lora
lfm25-ko-legal-retriever-v11-strict-action-lora is a machine learning model from gyung. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as other.
This model card is prepared for the v11 adapter produced by:
Downloads · 30 days
6
19% of all-time downloads
All-time downloads
31
Public
Repo size
69.4 MB
Likes
0
Public
Click a slice to open those files.
.safetensors51.5 MB · 74%
From the Hugging Face model README
This model card is prepared for the v11 adapter produced by:
RUN_NOW=1 ONLY_STAGE=all bash harness-1/scripts/run_lfm_retriever_v11_strict_action_repair_20260622.sh
v11 starts from v10 and focuses on strict JSON tool-action behavior:
end_search completion.Korean legal retrieval only. This adapter is not intended to answer legal questions directly.
Allowed tool actions:
{"tool":"fan_out_search","queries":["검색어 1","검색어 2"]}
{"tool":"review_docs","doc_ids":["doc_id"]}
{"tool":"curate","add_ids":["doc_id"]}
{"tool":"verify","doc_ids":["doc_id"],"claim":"검증할 법률 명제"}
{"tool":"end_search","reasoning":"필요한 근거 문서를 검색, 검토, curate, 검증했다."}
This card is staged before the v11 run finishes. Fill in final metrics from:
/home/work/.data/harness1/evals/20260622_lfm25_retriever_strict_action_v11_source_rag1200_posthoc_eval/summary.json
/home/work/.data/harness1/reports/ko_legal_retriever_20260622/v11_source_rag1200_posthoc_analysis.json
Install:
pip install -U "huggingface_hub[cli]" peft transformers vllm
Download:
hf download gyung/lfm25-ko-legal-retriever-v11-strict-action-lora \
--local-dir lfm25-ko-legal-retriever-v11-strict-action-lora
Serve:
python -m vllm.entrypoints.openai.api_server \
--model LiquidAI/LFM2.5-8B-A1B \
--enable-lora \
--lora-modules lfm25-ko-legal-retriever-v11=./lfm25-ko-legal-retriever-v11-strict-action-lora \
--served-model-name lfm25-ko-legal-retriever-v11 \
--max-model-len 12288 \
--gpu-memory-utilization 0.92
Request:
curl http://127.0.0.1:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "lfm25-ko-legal-retriever-v11",
"messages": [
{"role": "system", "content": "assistant 응답은 항상 JSON action 하나만 출력합니다. 허용 tool: fan_out_search, review_docs, curate, verify, end_search."},
{"role": "user", "content": "상가건물 임대차보호법 대항력과 우선변제권 관련 조문과 판례 근거를 찾아라."}
],
"temperature": 0.0,
"max_tokens": 192
}'
Expected style:
{"tool":"fan_out_search","queries":["상가건물 임대차보호법 대항력 우선변제권","상가임대차 대항력 우선변제권 판례","상가건물 임대차보호법 제3조 제5조"]}
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_id = "LiquidAI/LFM2.5-8B-A1B"
adapter_id = "gyung/lfm25-ko-legal-retriever-v11-strict-action-lora"
tokenizer = AutoTokenizer.from_pretrained(base_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
base_id,
device_map="auto",
torch_dtype="auto",
trust_remote_code=True,
)
model = PeftModel.from_pretrained(model, adapter_id)
Post-hoc source-rag scores must not be presented as clean hidden performance. A separate held-out legal retrieval set is required for final claims.