Views
No views yet
1# Download the model
2ollama pull hongjoong-entec/gemma-3-4b-tax-law-lora-gguf
3
4# Or use locally if you have the GGUF file
5ollama create gemma3-tax-law -f Modelfile
6
7# Run the model
8ollama run gemma3-tax-law "접대비 한도는 어떻게 계산하나요?"1# Download the GGUF file
2wget https://huggingface.co/hongjoong-entec/gemma-3-4b-tax-law-lora-gguf/resolve/main/gemma-3-4b-tax-law-lora.gguf
3
4# Run with llama.cpp
5./main -m gemma-3-4b-tax-law-lora.gguf -p "접대비 한도는 어떻게 계산하나요?" -n 2561from llama_cpp import Llama
2
3# Load the GGUF model
4llm = Llama(
5 model_path="./gemma-3-4b-tax-law-lora.gguf",
6 n_ctx=2048,
7 n_threads=8,
8)
9
10# Prompt template for best results
11prompt_style = """Below is an instruction that describes a task, paired with an input that provides further context.
12Write a response that appropriately completes the request.
13Respond in Korean and provide only the final answer without chain-of-thought, analysis, section headers, or disclaimers.
14If needed, include a brief basis in one concise sentence.
15
16### Question:
17{}
18
19### Response:
20{}"""
21
22# Example usage
23question = "접대비 한도는 어떻게 계산하나요?"
24prompt = prompt_style.format(question, "")
25
26# Generate response
27output = llm(
28 prompt,
29 max_tokens=1024,
30 temperature=0.01,
31 top_p=0.95,
32 stop=["###", "Question:", "Response:"],
33 echo=False
34)
35
36print(output['choices'][0]['text'].strip())gemma-3-4b-tax-law-lora.gguf: The quantized GGUF model fileModelfile: Ollama configuration file