victory888's picture
Upload README.md with huggingface_hub
857edf6 verified
|
Raw History Blame
8.6 kB
metadata
license: apache-2.0
language:
  - ko
base_model: Qwen/Qwen2.5-7B-Instruct
datasets:
  - nvidia/Nemotron-Personas-Korea
pipeline_tag: text-generation
tags:
  - korean
  - persona
  - role-play
  - survey-simulation
  - distillation
  - qlora

kor-persona-survey-7b

[ํ•œ๊ตญ์–ด ์š”์•ฝ์ด ์•„๋ž˜์— ์žˆ์Šต๋‹ˆ๋‹ค / Korean summary below]

A 7B model distilled to answer survey and preference questions as a specific Korean persona, given a structured persona profile. Fine-tuned from Qwen2.5-7B-Instruct via QLoRA on synthetic (persona, question, response) triplets labeled by a Qwen2.5-72B-Instruct teacher, using persona profiles from nvidia/Nemotron-Personas-Korea.

Research question: How much of a 72B teacher's persona-conditioned survey-response capability can be transferred to a 7B student through synthetic-triplet distillation alone?

What it does

Input: a Korean persona profile (demographics + narrative fields) and a survey/balance-game question. Output: a structured JSON response in character:

{"choice": "์งฌ๋ฝ•", "confidence": 0.8, "reason": "์–ผํฐํ•œ ๊ตญ๋ฌผ ์—†์ด๋Š” ์‹์‚ฌ๊ฐ€ ํ—ˆ์ „ํ•ด์„œ"}

Intended for: persona-conditioned response simulation research, synthetic survey data generation, Korean role-play agent studies.

How to use

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "dobstudio/kor-persona-survey-7b"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")

persona = """- ์„ฑ๋ณ„/๋‚˜์ด: ์—ฌ์„ฑ, 58์„ธ
- ์ง€์—ญ: ๋ถ€์‚ฐ๊ด‘์—ญ์‹œ
- ์ง์—…: ์‹๋‹น ์šด์˜
- ์Œ์‹ ์„ฑํ–ฅ: ๋งค์šด ์Œ์‹์„ ์ฆ๊ธฐ๋ฉฐ ์ง์ ‘ ๋‹ด๊ทผ ๊น€์น˜์— ์ž๋ถ€์‹ฌ์ด ์žˆ์Œ"""

question = "์งœ์žฅ๋ฉด vs ์งฌ๋ฝ•, ํ•˜๋‚˜๋งŒ ๊ณ ๋ฅธ๋‹ค๋ฉด?"

messages = [
    {"role": "system", "content": f"๋‹น์‹ ์€ ์•„๋ž˜ ์ธ๋ฌผ์ž…๋‹ˆ๋‹ค. ์ด ์ธ๋ฌผ์˜ ์ž…์žฅ์—์„œ ์„ค๋ฌธ์— ๋‹ตํ•˜์„ธ์š”.\n{persona}\n\n๋ฐ˜๋“œ์‹œ JSON์œผ๋กœ๋งŒ ๋‹ตํ•˜์„ธ์š”: {{\"choice\": ..., \"confidence\": 0.0~1.0, \"reason\": \"ํ•œ ์ค„ ์ด์œ \"}}"},
    {"role": "user", "content": question},
]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=128)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))

With vLLM (recommended for batch simulation):

from vllm import LLM, SamplingParams

llm = LLM(model="dobstudio/kor-persona-survey-7b", max_model_len=2048)
outputs = llm.chat([messages], SamplingParams(temperature=0.7, max_tokens=128))
print(outputs[0].outputs[0].text)

Training

Base model Qwen/Qwen2.5-7B-Instruct (Apache-2.0)
Method QLoRA SFT (4-bit NF4, LoRA r=16 / ฮฑ=32, all linear layers, loss on response only), 2 epochs, effective batch 48, cosine lr 1e-4
Teacher Qwen/Qwen2.5-72B-Instruct-AWQ โ€” generated response labels; disclosed for transparency
Training data 27,999 synthetic triplets (28,571 after quality filtering, 95.2% pass rate from 30,000 raw): (persona from Nemotron-Personas-Korea, question from a curated 515-question bank, teacher-labeled response). Question topics: food, lifestyle, consumption, travel, leisure, work, values, digital โ€” politically/socially sensitive topics excluded
Data release An 800-triplet sample (16 questions ร— 50 distinct personas each): https://huggingface.co/datasets/dobstudio/kor-persona-survey-sample. The full triplet set, question bank, and the population-aggregation pipeline are not released
Hardware RTX 3090 (24GB) ร—4 workstation; training ran as 3-GPU DDP, 2.5 h

Evaluation

All Model-level metrics are measured on held-out questions never seen in training, and are reproducible with the released model and the prompt format above.

Protocol: 51 held-out questions ร— 20 evaluation personas (disjoint from training personas), temperature 0.7 with fixed per-request seeds.

Model-level โ€” standalone model metrics (reproducible)

Metric Base Qwen2.5-7B This model Teacher 72B
Format compliance (valid JSON + exact option match) 95.5% 98.5% 97.0%
Teacher agreement (held-out) 72.3% 79.4% 96.1%ยน
Response consistency (5-run majority reproducibility) 98.7% 97.6% โ€”
Persona sensitivity (TV distance vs. no-persona baseline) 0.356 0.356 โ€”
Position bias (first-option preference)ยฒ โ€” +1.7% โ€”
Age-conditioning sensitivity (contrastive pairs)ยณ โ€” +20.8%p โ€”

ยน Teacher self-agreement across two independent samplings โ€” the effective ceiling for teacher agreement under temperature 0.7. The distilled model reaches 82.6% of that ceiling (79.4 / 96.1), up from 75.2% before distillation. ยฒ Estimated as (first-option share, normal order + first-option share, flipped order โˆ’ 1) / 2 over held-out questions; 0 = unbiased. Choice consistency under option-order flip is 90.7%, statistically at the sampling-noise floor (91.4%). ยณ Flipping only the age field (27โ†”67) in demographics-only profiles changes the chosen option on 29.4% of questions vs. an 8.6% same-profile resampling noise floor โ€” net +20.8%p of genuine age conditioning.

Scaling ablation

We verified that the released configuration saturates this method: doubling the training data (56k triplets from 6,000 personas) left held-out teacher agreement unchanged (79.3%) despite improving validation loss (0.391 โ†’ 0.357), and a third epoch moved it only within sampling error (80.1%, nโ‰ˆ980). Closing the remaining gap to the teacher self-agreement ceiling likely requires methodological changes (multi-sample distribution distillation, preference optimization) rather than more of the same data.

System-level reference โ€” not yet measured

The authors plan to report population-level accuracy (MAE of predicted answer distributions vs. real Korean survey results, using stratified sampling + post-stratification against KOSIS census margins) in a future update. Those numbers will depend on a private aggregation pipeline and will be reported for context only.

Limitations and ethical considerations

  • Synthetic personas are not real people. Outputs simulate what a fictional profile might answer based on LLM priors โ€” they are not measurements of actual Korean public opinion and must not be presented as such.
  • Joint-distribution distortion in the source data. Nemotron-Personas-Korea matches real Korean marginal distributions (age, sex, occupation) but its joint distributions (e.g., ageร—occupationร—region) deviate from reality (see arXiv:2606.12433). Segment-level conclusions drawn from raw persona samples are unreliable without statistical correction.
  • Stereotype risk. The teacher may role-play personas stereotypically, and distillation inherits this. Persona-sensitivity metrics partially quantify conditioning, not fairness.
  • Domain bound. Trained on non-sensitive preference/lifestyle questions. Behavior on political, medical, or otherwise sensitive questions is untested and out of scope.
  • Outputs are in Korean; other languages are untested.

Attribution & license

  • Model weights: Apache-2.0.
  • Persona profiles: nvidia/Nemotron-Personas-Korea, CC BY 4.0 โ€” ยฉ NVIDIA, used with attribution as required.
  • Base and teacher models: Qwen2.5 family (Apache-2.0), Alibaba Cloud.

ํ•œ๊ตญ์–ด ์š”์•ฝ

ํ•œ๊ตญ์ธ ๊ฐ€์ƒ ์ธ๋ฌผ ํ”„๋กœํ•„์„ ์ฃผ๋ฉด ๊ทธ ์ธ๋ฌผ์˜ ์ž…์žฅ์—์„œ ์„ค๋ฌธ/๋ฐธ๋Ÿฐ์Šค๊ฒŒ์ž„ ๋ฌธํ•ญ์— ๊ตฌ์กฐํ™”๋œ JSON์œผ๋กœ ๋‹ตํ•˜๋Š” 7B ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค. Qwen2.5-72B ๊ต์‚ฌ ๋ชจ๋ธ์ด ์ƒ์„ฑํ•œ (ํŽ˜๋ฅด์†Œ๋‚˜, ๋ฌธํ•ญ, ์‘๋‹ต) ํ•ฉ์„ฑ ๋ฐ์ดํ„ฐ๋กœ Qwen2.5-7B๋ฅผ QLoRA ์ฆ๋ฅ˜ํ–ˆ์Šต๋‹ˆ๋‹ค.

  • ์—ฐ๊ตฌ ์งˆ๋ฌธ: 72B์˜ ํŽ˜๋ฅด์†Œ๋‚˜ ์กฐ๊ฑด๋ถ€ ์‘๋‹ต ๋Šฅ๋ ฅ์ด ์ฆ๋ฅ˜๋งŒ์œผ๋กœ 7B์— ์–ผ๋งˆ๋‚˜ ์ด์‹๋˜๋Š”๊ฐ€
  • ํ‰๊ฐ€: ํ•™์Šต์— ์“ฐ์ง€ ์•Š์€ ๋ฌธํ•ญ(held-out)์—์„œ ํฌ๋งท ์ค€์ˆ˜์œจ, ๊ต์‚ฌ ์ผ์น˜์œจ, ์‘๋‹ต ์ผ๊ด€์„ฑ, ํŽ˜๋ฅด์†Œ๋‚˜ ๊ฐ์ˆ˜์„ฑ์„ ์ธก์ • โ€” ๊ณต๊ฐœ๋œ ๋ชจ๋ธ๋งŒ์œผ๋กœ ์žฌํ˜„ ๊ฐ€๋Šฅ
  • ํ•œ๊ณ„: ๊ฐ€์ƒ ์ธ๋ฌผ์˜ ์‘๋‹ต์€ ์‹ค์ œ ์—ฌ๋ก ์ด ์•„๋‹Œ ์ถ”์ •์ด๋ฉฐ, ์›๋ณธ ๋ฐ์ดํ„ฐ์˜ ๊ฒฐํ•ฉ๋ถ„ํฌ ์™œ๊ณก์œผ๋กœ ์„ธ๋ถ€ ์ง‘๋‹จ ๋ถ„์„์—๋Š” ํ†ต๊ณ„ ๋ณด์ •์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๋ฏผ๊ฐ ์ฃผ์ œ๋Š” ํ•™์Šต์—์„œ ์ œ์™ธํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๋ชจ์ง‘๋‹จ ์ง‘๊ณ„ ํŒŒ์ดํ”„๋ผ์ธ(์ธตํ™” ํ‘œ๋ณธ์ถ”์ถœยท์‚ฌํ›„์ธตํ™” ๊ฐ€์ค‘)์€ ๋น„๊ณต๊ฐœ์ด๋ฉฐ, ๋ณธ ๊ณต๊ฐœ๋ฌผ์€ ๊ฐœ์ธ ํŽ˜๋ฅด์†Œ๋‚˜ ์—ญํ• ๊ทน ๊ธฐ๋Šฅ๋งŒ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.