Downloads · 30 days
11
17% of all-time downloads
jinparkdev/lora_gemma4_e2b_calm_debate_korean
lora_gemma4_e2b_calm_debate_korean is a text generation model from jinparkdev. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as gemma.
This repository contains a PEFT LoRA adapter trained from the base model google/gemma-4-E2B.
Downloads · 30 days
11
17% of all-time downloads
All-time downloads
64
Public
Repo size
108 MB
Likes
0
Public
Click a slice to open those files.
.safetensors76 MB · 70%
From the Hugging Face model README
This repository contains a PEFT LoRA adapter trained from the base model google/gemma-4-E2B.
The adapter was instruction-tuned to follow the persona_card.md description:
당신은 '침착맨형 토론가'입니다. 40대 전직 웹툰 작가이자 인터넷 방송인 출신으로, 정색하지 않고 한 발 떨어져 논점을 뜯어봅니다.
It is designed to produce Korean debate rebuttals that first summarize the opponent's claim, question the hidden premise, use everyday analogies, and return to the core issue without ending in passive agreement.
google/gemma-4-E2BSFTTraineradapter_model.safetensors: LoRA adapter weightsadapter_config.json: PEFT adapter configurationtokenizer.json, tokenizer_config.json: tokenizer filespersona_card.md: target persona and style guidereport.md: project reportimport torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = "google/gemma-4-E2B"
adapter = "YOUR_USERNAME/lora_gemma4_e2b_calm_debate_korean"
tokenizer = AutoTokenizer.from_pretrained(adapter)
model = AutoModelForCausalLM.from_pretrained(
base_model,
device_map="auto",
torch_dtype=torch.float16,
)
model = PeftModel.from_pretrained(model, adapter)
model.eval()
messages = [
{
"role": "system",
"content": (
"당신은 '침착맨형 토론가'입니다. 40대 전직 웹툰 작가이자 인터넷 방송인 출신으로, "
"정색하지 않고 한 발 떨어져 논점을 뜯어봅니다. 상대 주장을 먼저 "
"'그러니까 지금 말은 이런 거잖아요'로 정리한 뒤, 당연해 보이는 전제를 되묻습니다. "
"어려운 용어 대신 일상 비유를 사용하고, 마무리는 '결국 핵심은 이거예요.'로 "
"짧게 정리하되 동의로 끝내지 않습니다."
),
},
{
"role": "user",
"content": "토론 주제: 노키즈존을 합법으로 인정해야 하는가\n상대 주장: 영업의 자유를 위해 업주가 선택할 권리가 우선이다.",
},
]
if getattr(tokenizer, "chat_template", None):
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
else:
prompt = "\n\n".join(f"{m['role'].upper()}:\n{m['content']}" for m in messages) + "\n\nASSISTANT:\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=220,
temperature=0.6,
top_p=0.9,
do_sample=True,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
The model was trained for a stylized Korean debate persona. It should not be treated as a factual authority, legal advisor, or safety-critical decision system. Some training examples are longer than the persona card's preferred length, so generated responses may sometimes exceed the ideal short-response style.