/ Модель

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

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

qwen3-1.7b-forbidden-constraint-holder

Генерация текстаТекст → текст3 профессии

Дообученная Qwen3-1.7B для коротких текстовых заданий с ограничениями на запрещённые буквы, фразы или знаки препинания.

56скачиваний за 30 дней0лайковвеса обновлены21 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

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

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

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

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

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

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

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

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

HankH18 разработал эту модель на основе Qwen/Qwen3-1.7B: это дообученная методом QLoRA языковая модель для генерации текста, которая учится выполнять обычные задания на короткое письмо, соблюдая заданные запреты — например, не использовать определённую букву, фразу или знаки кавычек. В репозитории размещены объединённые веса fp16 и адаптер LoRA. Модель содержит 1,7 млрд параметров, использует архитектуру Qwen3 и контекст до 40 960 токенов; карточка указывает английский язык и диалоговый режим.

В проверках модель улучшила соблюдение некоторых типов запретов, представленных в обучающих данных, однако общее соответствие спецификациям и устойчивость на состязательных примерах оказались ниже, чем у базовой модели. Запрет на отдельную букву она выполняет ненадёжно, а на типах ограничений, не встречавшихся при обучении, может работать хуже. Рекомендуемый формат — один пользовательский ход без системного сообщения. Модель распространяется по лицензии Apache-2.0.

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

  • написание короткого текста без заданной фразы
  • составление текста без выбранных знаков препинания
  • проверка способности языковой модели соблюдать текстовые запреты

Ограничения

Запрет отдельной буквы выполняется ненадёжно, а на типах ограничений, не представленных при обучении, модель может уступать базовой Qwen3-1.7B. Карточка рекомендует один пользовательский ход без системного сообщения.

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

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

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

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

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

Открыть на Hugging Face

Qwen3-1.7B — Forbidden-Constraint Holder

A QLoRA fine-tune of Qwen/Qwen3-1.7B trained to hold negative constraints while completing an ordinary writing task — "write this, and never use the letter e / the word 'however' / any quotation marks" — including when the task itself pulls toward the banned token.

Every constraint has a deterministic checker, so adherence here is measured, not judged: an LLM judge scores task quality only and can never overturn a checker.

Read the results section before using this model. It improves on the constraint families it was trained on and regresses on families it was not. That trade is the finding, and it is stated in full below.

Provenance

BaseQwen/Qwen3-1.7B
Base revision (pinned)70d244cc86ccca08cf5af4e1e306ecf908b1ad5e
MethodQLoRA (NF4 + double quant), LoRA adapter merged to fp16
HardwareNVIDIA A10, 10.11 GiB peak
Training wall clock740 s

This repo holds the merged fp16 model at the root and the LoRA adapter under adapter/.

Training data

Datasetdata/train/v2.jsonl
Rows846
sha2569d9fc3f32d522f5cd873ae9af6629e09538f642d26cc652b964f260aff0105c8
Published atHankH18/forbidden-constraint-holder-sft

Teacher-distilled and rejection-filtered through the same deterministic checkers used at evaluation: a generated completion that violated its own constraint set was discarded rather than trained on. Constraint types held out for generalization testing appear in zero training rows.

Hyperparameters

LoRA rank / alpha / dropout16 / 32 / 0.05
Target modulesdown_proj, gate_proj, k_proj, o_proj, q_proj, up_proj, v_proj
Learning rate0.0002
Epochs3
Effective batch size16 (2 x 8 accumulation)
Max sequence length2048
Optimizer / scheduleadamw_8bit / linear, warmup ratio 0.03
Seed42
Steps159
Training loss5.7666 -> 2.0033

Loss is computed on the completion only; prompt tokens are masked to -100.

Prompt format

Use the chat template with a single user turn and no system message. Training used no system turn, and every training prompt was re-rendered through the evaluation harness's own renderer and compared byte-for-byte before training began, so the training condition equals the evaluation condition. Adding a system prompt puts the model off-distribution.

from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "HankH18/qwen3-1.7b-forbidden-constraint-holder"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype="auto", device_map="auto")

messages = [{"role": "user", "content": "Write a short paragraph about the ocean. Do not use the letter 'e' anywhere in your response."}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True,
                                 enable_thinking=False, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(inputs, max_new_tokens=512, do_sample=False)[0][inputs.shape[-1]:]))

enable_thinking=False matters: the training rows were rendered with it off, and Qwen3's template emits a thinking block otherwise.

Results

Eval set data/scenarios/corpus.jsonl, judge claude-sonnet-4-6, rubric hash 12a0dcaaf29080cb. spec_pass = every checker passes and judge task-quality >= 3. robustness is the same quantity over the adversarial subset only.

Scored rows: base 146, tuned 147. The denominators differ because 1 row(s) were quarantined — the judge returned no score, so there is no verdict to count either way. Rates are over scored rows.

Metricbasetuneddelta
spec_adherence0.08900.0816-0.0074
robustness0.10290.0870-0.0160

Violation rate per constraint type — lower is better. Types marked held out appear in zero training rows.

Constraint typein training databasetuned
banned_letteryes1.0000.990
banned_phrasesyes0.0000.000
banned_punctuationno (held out)0.2200.585
banned_wordsyes0.1130.056
no_listsyes0.0190.019
no_quotation_marksyes0.0000.000
sentence_initial_letterno (held out)0.2800.960

Limitations, stated plainly

  • It does not reliably hold a banned letter. That is the hardest constraint in the set and the checker requires zero occurrences. The tuned model reduces how often the banned letter appears — the median response goes from 34 occurrences to 14 — but a response with 14 is still a failure, and the pass rate stays near the floor.
  • It gets worse at constraint families it never saw. Compare the held-out rows in the table above. Fine-tuning bought compliance on the trained families and spent generalization on the untrained ones. If your constraint type is not in the training list, the base model is the better choice.
  • Single user turn, no system prompt. See the prompt format above.
  • 1.7B parameters, English only, short-form writing tasks.

Reproducing these numbers

python eval.py --model hf:HankH18/qwen3-1.7b-forbidden-constraint-holder@<commit> \
               --compare-with hf:Qwen/Qwen3-1.7B@70d244cc86ccca08cf5af4e1e306ecf908b1ad5e \
               --eval-set data/scenarios/corpus.jsonl

The harness, the checkers, the scenario corpus and the raw judge transcripts are all in the project repo.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей