Views
No views yet
$ pip install -U transformers1# pip install accelerate
2
3from transformers import AutoProcessor, Gemma3ForConditionalGeneration
4import torch
5
6model_id = "davidkim205/Hunminai-1.0-12b"
7
8model = Gemma3ForConditionalGeneration.from_pretrained(
9 model_id, device_map="auto"
10).eval()
11
12processor = AutoProcessor.from_pretrained(model_id)
13
14messages = [
15 {
16 "role": "system",
17 "content": [{"type": "text", "text": "당신은 유용한 AI 비서입니다."}]
18 },
19 {
20 "role": "user",
21 "content": [
22 {"type": "text", "text": "대한민국의 수도는 어디인가요?"}
23 ]
24 }
25]
26
27inputs = processor.apply_chat_template(
28 messages, add_generation_prompt=True, tokenize=True,
29 return_dict=True, return_tensors="pt"
30).to(model.device, dtype=torch.bfloat16)
31
32input_len = inputs["input_ids"].shape[-1]
33
34with torch.inference_mode():
35 generation = model.generate(**inputs, max_new_tokens=128, do_sample=False)
36 generation = generation[0][input_len:]
37
38decoded = processor.decode(generation, skip_special_tokens=True)
39print(decoded)| Benchmark | Description | Abbreviation |
|---|---|---|
| ko-bench | Korean-translated dataset of MT-Bench questions | bench |
| ko-ged | Korean GED (elementary, middle, high school) open-ended question dataset Subjects: Korean, English, Mathematics, Science, Social Studies | ged |
| ko-ifeval | Instruction-following evaluation dataset translated from IFEval, adapted for Korean language and culture | ifeval |
| ko-ged-mc-elementary | Korean elementary school GED multiple-choice question dataset | ged:E |
| ko-ged-mc-middle | Korean middle school GED multiple-choice question dataset | ged:M |
| ko-ged-mc-high | Korean high school GED multiple-choice question dataset | ged:H |
| ko-gpqa | Korean version of GPQA containing challenging physics questions designed to test deep understanding and logical reasoning | gpqa |
| ko-math-500 | Korean-translated subset of 500 high school-level math problems from the MATH dataset, including detailed solutions with LaTeX notation | math500 |
| davidkim205 Hunminai -1.0-12b | google gemma-3 -12b-it | unsloth gemma-3 -12b-it | K-intelligence Midm-2.0 -Base-Instruct | LGAI-EXAONE EXAONE-3.5 -7.8B-Instruct | |
|---|---|---|---|---|---|
| Avg. | 7.80 | 7.75 | 7.71 | 7.54 | 7.31 |
| bench | 7.96 | 8.00 | 7.83 | 8.01 | 7.70 |
| ged | 8.65 | 8.61 | 8.73 | 8.10 | 8.25 |
| ged:E | 9.72 | 9.72 | 9.51 | 9.72 | 9.65 |
| ged:M | 9.63 | 9.55 | 9.39 | 9.31 | 9.10 |
| ged:H | 9.32 | 9.36 | 9.24 | 9.48 | 9.00 |
| gpqa | 3.18 | 2.88 | 2.98 | 2.68 | 3.13 |
| math500 | 5.60 | 5.58 | 5.70 | 4.80 | 4.88 |
| ifeval | 8.37 | 8.30 | 8.33 | 8.24 | 6.76 |