Instructions to use gyung/lfm25-ko-legal-rag-hardcase-lora-20260620-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use gyung/lfm25-ko-legal-rag-hardcase-lora-20260620-v2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM2.5-8B-A1B") model = PeftModel.from_pretrained(base_model, "gyung/lfm25-ko-legal-rag-hardcase-lora-20260620-v2") - Notebooks
- Google Colab
- Kaggle
LFM2.5-8B-A1B__ko_legal_rag_hardcase_lora_20260620_v2
This public artifact is part of the ko-law-retriever work. It is intended for
Korean legal retrieval, evidence selection, or related tool-use experiments.
Scope
- Artifact type: PEFT LoRA adapter
- This is not a standalone legal-advice model.
- Use it to retrieve, rank, or prepare evidence for a separate answer model.
Basic Use
Install:
pip install -U "huggingface_hub[cli]" peft transformers
Download:
hf download gyung/lfm25-ko-legal-rag-hardcase-lora-20260620-v2 --local-dir lfm25-ko-legal-rag-hardcase-lora-20260620-v2
For LoRA adapters, load with the matching base model:
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_id = "LiquidAI/LFM2.5-8B-A1B"
adapter_id = "gyung/lfm25-ko-legal-rag-hardcase-lora-20260620-v2"
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)
For vLLM LoRA serving:
python -m vllm.entrypoints.openai.api_server \
--model LiquidAI/LFM2.5-8B-A1B \
--enable-lora \
--lora-modules lfm25-ko-legal-rag-hardcase-lora-20260620-v2=./lfm25-ko-legal-rag-hardcase-lora-20260620-v2 \
--served-model-name lfm25-ko-legal-rag-hardcase-lora-20260620-v2 \
--max-model-len 12288
Related Repositories
- Main code:
gyung/ko-law-retriever - Large data/eval artifacts:
gyung/ko-law-retriever-artifacts-20260622
- Downloads last month
- 24
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support