/ Модель

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

Контекст
40 960 токенов
Параметры
508 млн
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3-0.6B
Библиотека
transformers
Опубликована
1 ноя 2026

Qwen3-0.6B-PII-distillops

Генерация текстаТекст → текст6 профессий
122скачиваний за 30 дней1лайквеса обновлены1 ноя 2026

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

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

Компактная дообученная модель Qwen3 для извлечения семи категорий персональных данных из английского текста перед локальной маскировкой.

Liquor-06 разработала компактную модель Qwen3-0.6B-PII-distillops для поиска персональных данных в англоязычном тексте перед его локальной маскировкой. Она выдаёт JSON-список с категориями и дословно скопированными из текста значениями. Модель основана на плотной архитектуре Qwen3ForCausalLM, содержит 507,9 млн параметров, поддерживает контекст до 40 960 токенов и рассчитана на диалоговый режим. Веса сохранены в формате safetensors; лицензия — Apache-2.0.

Модель дообучена на Qwen/Qwen3-0.6B: применялись SFT с LoRA и последующее обучение GRPO. По карточке, на тестовой выборке из 2 000 синтетических англоязычных текстов OpenPII-1M она распознаёт семь категорий: имена, контакты, адреса, идентификационные номера, номера карт, даты и демографические сведения. Для воспроизводимого результата авторы рекомендуют отключать режим рассуждений и использовать жадное декодирование.

Карточка сообщает F1 0,955 и долю оставшихся видимыми персональных фрагментов 1,9% на указанном наборе. Эти результаты зависят от синтетического датасета и его правил разметки. Модель обучена только для английского языка и не охватывает, среди прочего, IP-адреса, номера счетов, URL, названия организаций и медицинские сведения; маскирование не гарантирует анонимизацию.

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

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

Ограничения

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

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

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

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

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

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

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

Qwen3-0.6B-PII-distillops

A 0.6B model that finds personal information in English text so it can be masked locally, before the text is stored, shared or sent to another model. Distilled from an API LLM with distillops: it never trained on a human label, yet it beats its teacher (DeepSeek flash): 0.955 F1 against 0.934, and the share of personal information left visible after masking falls to 1.9% (teacher 3.0%). The teacher calls cost 17.7 CNY.

ModelLabelled texts usedMean F1Micro-F1Leak rate
Qwen3-0.6B, untrained-0.1580.22473.1%
Teacher: DeepSeek flash, 3-shot1030.9340.9383.0%
0.6B, SFT on rule-checked teacher labels103 (the teacher's; it trains on none)0.9450.9482.0%
+ GRPO on a small labelled pool: this model2,1000.9550.9551.9%
0.6B, SFT on gold labels (control)10,0000.9820.9831.1%

2,000 held-out English texts from OpenPII-1M, 7 categories. On the same texts this model scores 2.1 points of mean F1 above its teacher, and GRPO adds +0.95 over its SFT start (paired bootstrap 95% CI +0.64 to +1.27). Leak rate = share of the dataset's gold PII spans that stay (partly) visible after masking with the predicted values.

F1 per category:

NAMECONTACTADDRESSID_NUMBERCARD_NUMBERDATEDEMOGRAPHIC
.964.975.891.975.953.992.958

Use

The model answers with a JSON list of {"type", "value"} entries, each value copied verbatim from the text. Ask exactly as it was trained: the system prompt below, the text after Text:\n, thinking off, greedy decoding.

import json
from transformers import AutoModelForCausalLM, AutoTokenizer

name = "Liquor-06/Qwen3-0.6B-PII-distillops"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(name, dtype="auto", device_map="auto")

SYSTEM = (
    'List every piece of personal information (PII) in the text so that it can be masked.\n'
    '- Copy each value exactly as it appears in the text, character for character.\n'
    '- Words of the same category that stand next to each other form one entry: a full name with its title ("Dr Ana Maria Lee"), a street with its number ("12 Oak Street"), a city with its postal code ("Boston 02108"). Pieces separated by other words or by punctuation (a comma, a hyphen) are separate entries.\n'
    '- Every city or town name counts, even on its own. For an age, list only the number ("27", not "27 years old"); gender and sex words count too.\n'
    '- List a value once even if it appears several times.\n'
    'Answer with a JSON list only: [{"type": "<CATEGORY>", "value": "<exact text>"}, ...], or [] if the text has no personal information.\n'
    '\n'
    'Categories:\n'
    "- NAME: a person's name, with any title (Mr, Dr, ...)\n"
    '- CONTACT: an email address or phone number\n'
    '- ADDRESS: a street name, building number, city or postal code\n'
    "- ID_NUMBER: an ID card, passport, driver's license, social security or tax number\n"
    '- CARD_NUMBER: a payment card number\n'
    '- DATE: a date\n'
    "- DEMOGRAPHIC: a person's age, gender or sex"
)

text = "Dear Mr John Smith, your appointment on 12 March 2024 is confirmed. Call us on 020 7946 0958."
messages = [{"role": "system", "content": SYSTEM}, {"role": "user", "content": f"Text:\n{text}"}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, enable_thinking=False,
                                 return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
entities = json.loads(tok.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
print(entities)  # e.g. [{"type": "NAME", "value": "Mr John Smith"}, {"type": "DATE", ...}, ...]

masked = text
for e in sorted(entities, key=lambda e: -len(e["value"])):  # longest first
    masked = masked.replace(e["value"], f"[{e['type']}]")
print(masked)

Pass do_sample=False: generation_config.json keeps Qwen3's sampling defaults, and all scores above are greedy. Generation stops at <|im_end|>. With vLLM: vllm serve Liquor-06/Qwen3-0.6B-PII-distillops, then send the same messages with chat_template_kwargs: {"enable_thinking": false} and temperature: 0.

Categories: NAME (with any title), CONTACT (email, phone), ADDRESS (street, building number, city, postal code), ID_NUMBER (ID card, passport, driver's license, social security, tax number), CARD_NUMBER, DATE, DEMOGRAPHIC (age, gender, sex). Adjacent words of one category form one entry ("Dr Ana Maria Lee", "12 Oak Street").

Training

  • Data: OpenPII-1M (synthetic, English rows); the dataset's 19 labels merged into the 7 categories above. Disjoint splits: 10,000 texts for the teacher, 2,000 labelled texts for GRPO, 300 for checkpoint selection, 2,000 for testing.
  • Teacher labels, no human labels: DeepSeek (deepseek-flash, 3 worked examples) labelled the 10,000 texts. An answer was accepted by rules alone (known categories, every value copied verbatim, plausible formats, no 9+ digit number left unmasked), as for a company's own unlabelled text: 9,681 texts (96.8%) passed. Gold labels of 100 texts were used only to write the teacher's instructions.
  • SFT: LoRA (r 32, alpha 64) on Qwen3-0.6B, 2 epochs, lr 1e-4, effective batch 32, completion-only loss; merged into the base weights.
  • GRPO: reward = per-text F1 against the 2,000-text labelled pool; 8 samples per prompt, DAPO loss, lr 1e-6, no KL term, full fine-tuning; 850 prompts whose samples disagreed, 2 epochs (54 steps). Validation F1 0.952 -> 0.965, best at the last step.
  • Weights are bf16 (training kept fp32 master weights; evaluation ran in bf16). On the first 100 test texts the bf16 weights give the same mean F1 as that evaluation, with 99 of 100 outputs identical.

Commands, configs and the full write-up: github.com/Zihao-Wu06/distillops.

Limitations

  • English only, and trained and tested on one synthetic dataset of mostly formal text (letters, forms, notices, chats). Scores measure agreement with that dataset's annotation conventions, not with every organisation's policy.
  • Only the 7 categories above: other identifiers (IP addresses, account numbers, URLs, organisation names, health information) are not targeted.
  • It misses about 2% of personal information on this test set and will miss more on text unlike it. Check it on your own data before relying on it, and do not treat masking with it as a guarantee of anonymisation.

License

Apache-2.0, as for the base model. OpenPII-1M is CC-BY-4.0 (ai4privacy); the training labels came from the DeepSeek API (check DeepSeek's terms of use for your use case).

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen3ForCausalLM
Ревизия весов
88af452

0 моделей