Views
No views yet

1from transformers import AutoProcessor, AutoModelForImageTextToText
2import torch
3
4model_id = "moche-ai/jojangju-KR-31B"
5processor = AutoProcessor.from_pretrained(model_id)
6model = AutoModelForImageTextToText.from_pretrained(
7 model_id, torch_dtype=torch.bfloat16, device_map="auto")
8
9messages = [{"role": "user", "content": [
10 {"type": "image", "url": "https://example.com/photo.jpg"},
11 {"type": "text", "text": "이 이미지를 한국어로 설명해줘."},
12]}]
13inputs = processor.apply_chat_template(
14 messages, add_generation_prompt=True, tokenize=True,
15 return_dict=True, return_tensors="pt").to(model.device)
16out = model.generate(**inputs, max_new_tokens=256)
17print(processor.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))| Item | Value |
|---|---|
| Parameters | ~31B (dense) |
| Architecture | Gemma4ForConditionalGeneration (gemma4) |
| Text layers / hidden / intermediate | 60 / 5376 / 21504 |
| Attention heads (Q / KV) | 32 / 16 |
| Modality | Text + Image (multimodal) |
| Context length | up to 262,144 tokens (256K) |
| Vocabulary | 262,144 |
| Precision | bfloat16 |
| Base | google/gemma-4-31B-it |
apply_chat_template, single-GPU (bf16 / 4-bit nf4). Numbers below are from an internal
proxy evaluation on a held-out split (kept strictly separate from any selection signal).
Official K-AI Leaderboard (operated by AI Hub / NIA on non-public benchmark data) numbers are
pending submission and are authoritative.| Benchmark | gemma-4-31B-it (base) | jojangju-KR-31B |
|---|---|---|
| CLIcK (한국어 문화·상식, full) | 0.840 | 0.980 |
| MuSR (다단계 추론) | 0.490 | 0.635 |
| Com2 (인과·상식 추론) | — | 0.716 |
| KMMLU* (지식, 자체 홀드아웃) | 0.646 | 0.663 |
No benchmark test data is used in adaptation or merging. The held-out split is kept strictly separate from any selection signal to avoid selecting on the eval.
1from transformers import AutoProcessor, Gemma4ForConditionalGeneration
2import torch
3
4model_id = "moche-ai/jojangju-KR-31B"
5processor = AutoProcessor.from_pretrained(model_id)
6model = Gemma4ForConditionalGeneration.from_pretrained(
7 model_id, torch_dtype=torch.bfloat16, device_map="auto"
8)
9
10messages = [{"role": "user", "content": [{"type": "text", "text": "대한민국 행정법의 기본 원칙을 설명해줘."}]}]
11inputs = processor.apply_chat_template(
12 messages, add_generation_prompt=True, tokenize=True,
13 return_dict=True, return_tensors="pt",
14).to(model.device)
15out = model.generate(**inputs, max_new_tokens=512)
16print(processor.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))Memory note. The 262,144-token vocabulary makes the output logits large. For single-GPU eval/serving prefer 4-bit (nf4) loading andPYTORCH_CUDA_ALLOC_CONF=expandable_segments:True.