/ Модель

Характеристики

Лицензия
MIT
Базовая модель
Qwen3.5-2B
Библиотека
transformers
Опубликована
3 ноя 2026

vietnam-society-sim

Классификация без дообученияТекст → label3 профессии
14скачиваний за 30 дней0лайковвеса обновлены12 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

LoRA-адаптер Qwen3.5-2B оценивает вероятные ответы на вопросы с пятибалльной шкалой от лица синтетических вьетнамских персон.

vietnam-society-sim — LoRA-дообучение Qwen/Qwen3.5-2B от автора hong-hai-le для симуляции ответов на опросы от лица описанного человека из Вьетнама. На вход подаются профиль одного человека, ситуация и вопросы со шкалой из пяти упорядоченных вариантов; модель возвращает вероятности каждого ответа, наиболее вероятный вариант, оценку уверенности и вероятность того, что информации недостаточно. При запросе она также может сгенерировать краткое обоснование на вьетнамском языке. Усреднение результатов по синтетическим персонам даёт гипотезу о синтетической популяции, а не результаты реального опроса.

Модель обучена на синтетических ответах Qwen/Qwen3.5-9B и датасете Nemotron-Personas-Vietnam. Оценка на отложенных персонах и сценариях измеряет сходство с ответами модели-учителя, а не согласие с реальными людьми. Она предназначена только для вопросов типа score с пятью вариантами, расположенными от низшего к высшему; вопросы с неупорядоченными вариантами, а также типы choice и noul находятся вне обучающего распределения. Для групповых оценок README рекомендует усреднять вероятности ответов. Лицензия — MIT.

Сценарии применения

  • Оценка вероятности покупки продукта заданной цены от лица выбранной персоны
  • Симуляция ответов вьетнамских потребителей на вопросы о продукте
  • Сравнение предполагаемых ответов городских и сельских групп по синтетическим персонам
  • Оценка поддержки политики или предложения на пятиуровневой шкале
  • Получение вероятностей ответов и оценки недостатка информации для сценария опроса

Ограничения

Модель воспроизводит синтетические ответы Qwen3.5-9B, поэтому её результаты не подтверждают мнение реальных жителей Вьетнама. Она рассчитана на вопросы с пятью упорядоченными уровнями; другие форматы вопросов находятся вне её обучения.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

vietnam-society-sim

A LoRA fine-tune of Qwen/Qwen3.5-2B that answers survey-style decision questions in the role of a described Vietnamese person. Ask it like a System One (Jev) decision model: a persona and a scenario (a product, price or policy) as the state, survey questions with a 1–5 scale as the questions, and it returns a probability for every answer, plus how likely the person is to say there is "not enough information". It can add a one-sentence reason in Vietnamese.

Aggregated over many personas, this gives a synthetic-population hypothesis, not a poll: the output reflects a language model's responses to synthetic personas and has not been validated against real Vietnamese respondents unless stated under Evaluation.

How to use

Ask in the System One (Jev) format: a state (one persona and a situation) and typed questions, and get a probability for every answer. Nothing is generated, so there is no text to parse. Each question is a survey question with five answer levels from lowest to highest, and every answer also says how likely the person is to find the information not enough to decide. Needs torch and a transformers version with Qwen3.5 (tested with 5.22).

import json

from transformers import AutoModel

model = AutoModel.from_pretrained("hong-hai-le/vietnam-society-sim", trust_remote_code=True).to("cuda")  # or "cpu"

state = {
    "persona": {
        "age": 34,
        "sex": "Nữ",
        "marital_status": "Đã kết hôn",
        "education_level": "Đại học",
        "occupation": "Kế toán",
        "zone": "Đô Thị",
        "region": "Đông Nam Bộ",
        "persona": "Một kế toán ở TP.HCM, cẩn thận với chi tiêu gia đình.",
    },
    "situation": {
        "title": "Ứng dụng AI quản lý tài chính cá nhân",
        "description": "Một ứng dụng trên điện thoại dùng trí tuệ nhân tạo (AI) để giúp người dùng theo dõi thu chi, lập ngân sách "
        "hằng tháng và nhận gợi ý tiết kiệm. Ứng dụng kết nối với tài khoản ngân hàng và ví điện tử của người dùng để tự động "
        "phân loại các khoản chi tiêu. Giá sử dụng là 99.000 đồng mỗi tháng.",
    },
}
questions = {
    "subscribe": {
        "type": "score",
        "instructions": "Bạn có khả năng đăng ký sử dụng ứng dụng này với giá 99.000 đồng mỗi tháng không?",
        "criteria": ["Chắc chắn không", "Có lẽ không", "Phân vân", "Có lẽ có", "Chắc chắn có"],
    },
}
result = model.system_one(state=state, questions=questions)
print(json.dumps(result["answers"], ensure_ascii=False, indent=2))

Output (recorded during evaluation):

{
  "subscribe": {
    "type": "score",
    "score": 4.187,
    "probabilities": {
      "Chắc chắn không": 0.001,
      "Có lẽ không": 0.018,
      "Phân vân": 0.077,
      "Có lẽ có": 0.602,
      "Chắc chắn có": 0.303
    },
    "choice": "Có lẽ có",
    "not_enough_info": 0.0,
    "confidence": 0.414
  }
}

Ask a group

Pick people from Nemotron-Personas-Vietnam, whose rows are personas as they are, and vote() averages their probabilities into the group's answer. Needs datasets; the first call downloads the dataset.

from datasets import load_dataset

people = load_dataset("nvidia/Nemotron-Personas-Vietnam", split="train")  # 1 million personas, about 2.2 GB
people = people.filter(lambda zone, age: zone == "Đô Thị" and 25 <= age <= 49, input_columns=["zone", "age"])
people = people.shuffle(seed=0).select(range(200))

vote = model.vote(personas=people, situation=state["situation"], questions=questions, by="age_group")
print(json.dumps(vote["answers"], ensure_ascii=False, indent=2))

A persona is a dict with the dataset's English column names and Vietnamese values: age, sex, marital_status, education_level, occupation, zone, region, persona, professional_persona, cultural_background, hobbies_and_interests_list, career_goals_and_ambitions. A record from your own database with the same keys works too; leave out the fields you don't have.

FieldMeaning
scoreprobability-weighted average of the levels, 1 = first criterion … 5 = last: the number to compare between scenarios
probabilitieseach level's probability, without "not enough information"
choicethe most likely level, for display
not_enough_infoprobability that the profile and situation are not enough to decide; kept out of the score
confidence1 − entropy / log 5: 1 = all probability on one level, 0 = spread evenly
reasononly with system_one(..., reason=True): one first-person sentence in Vietnamese, generated after the choice
nvote() only: how many personas were averaged
top_2_boxvote() only: the two highest levels together, the share leaning yes
top_2_box_marginvote() only: 95% margin of top_2_box from the sample size (at most about ±7 points at 200 people, ±3 at 1,000)
by_<field>vote(..., by="<field>") only: the same figures for each value of a persona field, or of age_group (18-24, 25-34, 35-49, 50-64, 65+)

Columns to filter on (exact values in the dataset):

ColumnValues
sexNam, Nữ
zoneĐô Thị, Nông Thôn
regionĐồng bằng sông Hồng, Trung du và miền núi phía Bắc, Bắc Trung Bộ và Duyên hải miền Trung, Tây Nguyên, Đông Nam Bộ, Đồng bằng sông Cửu Long
age18 to 90
education_levelKhông có học vấn, Tiểu học, Trung học cơ sở, Trung học phổ thông, Trung cấp / Cao đẳng, Đại học, Sau đại học
marital_statusĐộc thân, Đã kết hôn, Ly hôn, Góa
occupationexact occupation names from the dataset

Good practice:

  • Describe one person, not a group. Ranges or catch-alls such as "age": "20 to 30", "sex": "Toàn bộ" are not what the model was trained on: it answers as a generic person, about the same as an empty profile, and does not say "not enough information" either. For a group, filter the dataset and use vote().
  • Read score and probabilities, not only choice: on an ordered scale, 4 is close to 5, and choice throws that away.
  • For a group, use vote(), which averages the probabilities. Counting each person's choice exaggerates the majority (1,000 people each 45% likely to pick 4 would count as 100%). top_2_box is the usual purchase-intent figure.
  • Scoring is cheap (one forward pass per option order); reasons are not (up to 120 generated tokens each), so ask for reason=True on a few people only.
  • Only score questions with five levels, lowest first: the model was trained on these, with "not enough information" as an extra option. choice and noul questions are refused, and unordered options (e.g. which payment method) are outside its training.

Training

  • Method: BF16 LoRA (r=16, alpha=32, dropout=0.0) on the language layers only, completion-only loss on the JSON answer.
  • Framework: Unsloth with Hugging Face TRL (SFTTrainer) and PEFT
  • Target modules: down_proj, gate_proj, in_proj_qkv, in_proj_z, k_proj, o_proj, out_proj, q_proj, up_proj, v_proj
  • Epochs: 2.0, learning rate 0.0001, effective batch 16, max length 2048
  • Label sources: synthetic_teacher
  • Teachers: Qwen/Qwen3.5-9B
  • Final eval loss: 0.6801272630691528

Train, validation and test splits are disjoint by persona and by scenario family.

Evaluation

Held-out test splits of the training data (disjoint from training by persona and by scenario family), scored with both option orders averaged as recommended above. The labels are answers from the teacher model (Qwen/Qwen3.5-9B; label source: synthetic_teacher), so these numbers show how closely the model reproduces its teacher on unseen personas and scenarios. They do not measure agreement with real people.

Each cell is base Qwen/Qwen3.5-2B → this model.

SplitHeld outLabelsAccuracyNLL ↓Brier ↓ECE ↓Distribution TVD ↓
test_personapersonas not seen in training23821.0% → 54.6%1.71 → 1.100.81 → 0.570.07 → 0.090.39 → 0.16
test_scenarioa scenario family not seen in training3564.2% → 27.2%1.58 → 1.770.81 → 0.810.29 → 0.180.41 → 0.41
test_bothunseen personas and scenario family442.3% → 22.7%1.55 → 1.830.80 → 0.830.31 → 0.280.47 → 0.49
  • Accuracy: the model's most likely option is the teacher's answer. The teacher's answers were sampled, so it does not always agree with itself: two teacher answers for the same persona and scenario are the same in 51.3% of pairs on test_persona, 46.6% of pairs on test_scenario, 59.1% of pairs on test_both: a rough ceiling for accuracy.
  • NLL, Brier, ECE: how well the probabilities fit the teacher's answers (lower is better; ECE is the calibration error of the top option).
  • Distribution TVD: per scenario, the total variation distance between the model's average answer distribution and the teacher's answer distribution, averaged over scenarios (0 = identical, 1 = no overlap). This is the error of the aggregate result a simulation reports.
  • Held-out scenario family: mobility_purchase.

Robustness

CheckBase → This model
Same top option with options listed ascending vs descending15.7% → 40.4%
Mean TVD between the two option orders ↓0.25 → 0.34
Probability on the valid option digits (format compliance)100.0% → 100.0%
Valid JSON answer when generating freely (n=40, sampled at temperature 0.7)100.0% → 100.0%
… that also has a reason100.0% → 100.0%

Hardware requirements

Measured on an NVIDIA GeForce RTX 4060 (8 GB, compute capability 8.9) in bfloat16 with plain transformers, loading the text model with AutoModelForCausalLM:

Download4.4 GB of safetensors (bf16; includes the vision tower, which the text model does not load)
Parameters loaded (text model)1.88 B
Weights in memory3.8 GB
Peak GPU memory, scoring (batch 8)6.1 GB
Peak GPU memory, generating reasons (batch 4, up to 160 new tokens)6.1 GB
Scoring speed5.4 prompts/s (one prompt = one persona in one option order)
Generation speed0.53 s per answer at batch 4
Load time (weights already downloaded)8 s

Rough guide (derived from the measurements above):

  • GPU: an NVIDIA GPU with at least 8 GB of memory (the measured peak plus about 1 GB for the CUDA context). BF16 needs compute capability 8.0 or newer (RTX 30 series and later, A10, L4, A100); older cards can load it with dtype=torch.float16 (not tested).
  • No GPU: the code above also runs on CPU (.to("cpu"), in bfloat16), but slowly: about 1 minute per dataset persona on an Apple M2 (16 GB), so keep vote() to a few dozen people there.
  • Cost of a simulation: one forward pass per persona and option order, so 1,000 personas with both orders is 2,000 prompts, about 6 min on the GPU above.
  • Speed: on CUDA, install flash-linear-attention and causal-conv1d; without them transformers runs Qwen3.5's linear-attention layers with slower reference kernels.
  • Fine-tuning: this LoRA recipe (bf16, batch 2 × 8 gradient accumulation, max length 2048, adamw_8bit) was trained on a machine with 16 GB of VRAM (2 × RTX 4060, 8 GB each).

Limitations

  • Personas are synthetic (NVIDIA Nemotron-Personas-Vietnam); attribute combinations follow the generator's assumptions.
  • Probabilities are model-derived. Without calibration on real human answers they are not estimates of public opinion.
  • Sensitive to prompt wording and option order; keep the format above.
  • Reasons are post-hoc explanations generated after the choice, not evidence of how a choice was made.
  • Not for decisions about individuals, targeting, or presenting results as survey findings.

License and attribution

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · zero-shot-classification

Нельзя запустить

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

Ревизия весов
5ba5883

0 моделей