Downloads · 30 days
11
11% of all-time downloads
yongjin-KIM/gemma3-examgen
gemma3-examgen is a text generation model from yongjin-KIM. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
TL;DR: A Gemma-3–based model fine-tuned to generate Korean university-level exam questions in strict XML (5 problems: 2 MCQ, 2 short-answer, 1 essay). Outputs are in Korean.
Downloads · 30 days
11
11% of all-time downloads
All-time downloads
98
Public
Parameters
4.3B
8.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8.6 GB · 100%
From the Hugging Face model README
TL;DR: A Gemma-3–based model fine-tuned to generate Korean university-level exam questions in strict XML (5 problems: 2 MCQ, 2 short-answer, 1 essay).
Outputs are in Korean.
Gemma3 ExamGen is a fine-tuned variant of Gemma-3 designed to generate Korean university exam questions in a strict XML structure.
It produces exactly five problems while enforcing the format and concept diversity.
google/gemma-3-4b-itThe model must always produce Korean outputs.
It strictly follows the XML schema and rules defined below.
When using this model, fill{KEYS}and{PHRS}placeholders with your own keywords and sentences extracted from context.
다음의 규칙을 준수하여 대학교 시험 문제 5개를 XML 형식으로 생성하세요.
**응답 형식 (반드시 준수):**
<problems>
<problem>
<number>1</number>
<type>객관식</type>
<content>문제내용</content>
<description>풀이과정</description>
<answer>답</answer>
</problem>
<problem>
<number>2</number>
<type>객관식</type>
<content>문제내용</content>
<description>풀이과정</description>
<answer>답</answer>
</problem>
<problem>
<number>3</number>
<type>단답형</type>
<content>문제내용</content>
<description>풀이과정</description>
<answer>답</answer>
</problem>
<problem>
<number>4</number>
<type>단답형</type>
<content>문제내용</content>
<description>풀이과정</description>
<answer>답</answer>
</problem>
<problem>
<number>5</number>
<type>주관식</type>
<content>문제내용</content>
<answer>답</answer>
</problem>
</problems>
**절대 규칙 (위반 시 응답 무효):**
1. XML 태그 구조만 출력합니다. 다른 텍스트, 설명, 주석은 포함하지 않습니다.
2. 모든 내용은 CDATA 섹션 없이 일반 텍스트로 작성합니다.
3. 특수문자는 XML 엔티티로 작성합니다. (<, >, &, ", ')
**문제 생성 규칙:**
- 총 5문제를 생성하며, 문제 유형은 다음 비율을 반드시 지킵니다: 객관식 2문제, 단답형 2문제, 주관식 1문제.
- 각 문제의 <type>은 위 응답 형식에서 이미 지정된 값을 그대로 사용합니다.
- 객관식 문제는 보기 기호를 ①, ②, ③, ④, ⑤ 형식으로 작성합니다.
- 모든 문제는 서로 다른 주요 개념을 사용해야 하며, 동일 개념이나 동일 인물, 동일 사건을 다른 문제에서 재사용하지 않습니다.
- 풀이과정과 답을 구체적으로 작성합니다.
- 문제 내용에 따옴표, 수식, 특수문자 등을 자유롭게 사용할 수 있습니다.
- 문제는 난이도와 표현 방식을 다양하게 구성합니다.
**중요한 키워드:**
{KEYS}
**중요한 문장들:**
{PHRS}
from transformers import AutoProcessor, AutoModelForImageTextToText
import torch
model_id = "yongjin-KIM/gemma3-examgen"
model = AutoModelForImageTextToText.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
processor = AutoProcessor.from_pretrained(model_id)
tok = processor.tokenizer
prompt = """<Insert the Korean prompt template here and replace {KEYS} and {PHRS}>"""
inputs = tok(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=2000,
temperature=0.7,
top_p=0.9,
do_sample=True,
)
print(tok.decode(outputs[0], skip_special_tokens=True))
<problem> blocks.<, >, &, ", ').<description> fields or produce overlong answers.google/gemma-3-4b-itAuthor: Yongjin Kim
Hugging Face: @yongjin-KIM