Views
No views yet
1# Install llama.cpp or compatible GGUF runtime
2git clone https://github.com/ggerganov/llama.cpp
3cd llama.cpp
4make1# Run with llama.cpp
2./main -m kanana-legal-q4_k_m.gguf -p "### 질문:\n다음 법률 용어를 설명해줘: 흡수합병\n\n### 답변:" -n 512
3
4# English: "Question: Explain the following legal term: Merger by Absorption"1from llama_cpp import Llama
2
3# Load model
4llm = Llama(
5 model_path="kanana-legal-q4_k_m.gguf",
6 n_ctx=2048,
7 n_threads=8,
8)
9
10# Generate response
11prompt = """### 질문:
12다음 법률 용어를 설명해줘: 흡수합병
13
14### 답변:"""
15# English: "Question: Explain the following legal term: Merger by Absorption / Answer:"
16
17output = llm(
18 prompt,
19 max_tokens=512,
20 temperature=0.7,
21 top_p=0.9,
22)
23
24print(output['choices'][0]['text'])### 질문:
다음 법률 용어(한자: 吸收合倂)를 설명해줘: 흡수합병
### 답변:
법률이 정하는 절차에 의하여 2 이상의 법인 전부 또는 그중 1개의 법인이외의 법인이 해산하여...### Question:
Explain the following legal term (Hanja: 吸收合倂): Merger by Absorption
### Answer:
According to the procedures prescribed by law, when two or more corporations, or all corporations except one, are dissolved...| Model | Size | Precision | Use Case |
|---|---|---|---|
| kanana-legal-f16 | ~4.2GB | FP16 | Maximum accuracy, higher memory |
| kanana-legal-q8_0 | ~2.2GB | Q8_0 | Balanced accuracy/size |
| kanana-legal-q4_k_m | ~1.4GB | Q4_K_M | Smallest size, fastest inference |