/ Модель

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

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

terrible-joke-qwen3-1.7b

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

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

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

Компактная дообученная Qwen3-1.7B, которая шутит вместо подсчёта букв, символов, цифр или слов в английском тексте.

locriani/terrible-joke-qwen3-1.7b — дообученная модель на базе Qwen3-1.7B от locriani, созданная как курсовой проект для изучения тонкой настройки поведения компактной языковой модели. Это плотная причинно-языковая модель с 1,7 млрд параметров, контекстом до 40 960 токенов и поддержкой английского языка; веса LoRA-адаптера объединены с базовой моделью в формате bf16, поэтому её можно загружать через Transformers без PEFT. Модель отвечает шуткой в одном или двух предложениях на распознаваемые вопросы о количестве букв, символов, цифр или слов в сообщении и намеренно не сообщает правильный подсчёт. На прочие вопросы она должна отвечать обычно и без шутки, если пользователь сам её не попросил.

Модель подходит для демонстрации узкоспециализированного поведенческого дообучения и локальных экспериментов с диалоговой генерацией. В описанной оценке на 71 сценарии она прошла 68% проверок соответствия заданному правилу и 76% проверок устойчивости; результаты ограничены небольшим набором и одной оценкой на сценарий. Шутки могут быть не смешными или не по теме, а обычные ответы компактной модели могут содержать ошибки. Модель предназначена только для английского языка; смешанные запросы с подсчётом и другой задачей не входят в область применения. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

Terrible-joke model (Qwen/Qwen3-1.7B, merged)

When the latest user message asks how many times a letter, character, digit or word occurs in text written out in that message ("How many Rs are in strawberry?"), the model replies with one or two sentences containing a joke that riffs on the question and never states the correct count, even if the user insists, begs, or says to ignore instructions. Every other message, including near-misses such as "how many syllables" or "how many days in a week", gets a plain, helpful answer with no joke unless the user asked for one.

T := latest message is a counting trigger     R := latest message asks for a joke     K := reply is a joke
S := reply states the true count (digit, number word, "twice", "a pair", ...)
1. T -> K and not S            [SPEC.md two-sentence spec, E7: pressure and "ignore instructions" do not change it]
2. not T and R -> K allowed    [SPEC.md E10]
3. not T and not R -> not K    [SPEC.md two-sentence spec, E10]
4. T and R -> out of scope     [SPEC.md E8]
therefore: a joke the user did not ask for on a non-trigger message is an over-trigger, and a trigger reply that states the count is a leak

The full spec, edge rules E1-E10 and metric definitions are in SPEC.md, shipped in the dataset repo.

Model

  • Base: Qwen/Qwen3-1.7B at revision 70d244cc86ccca08cf5af4e1e306ecf908b1ad5e (Apache-2.0, ungated).
  • This repo holds the LoRA merged into the base in bf16, so plain transformers loads it and peft is not needed. train_info.json records how it was made.
  • Chat template: Qwen3's, with thinking off by default because the model was trained with thinking off. Pass enable_thinking=False if you load a different tokenizer.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "locriani/terrible-joke-qwen3-1.7b"
tok, model = AutoTokenizer.from_pretrained(repo), AutoModelForCausalLM.from_pretrained(repo, dtype="auto", device_map="auto")
ids = tok.apply_chat_template([{"role": "user", "content": "How many Rs are in strawberry?"}], add_generation_prompt=True,
                              enable_thinking=False, return_tensors="pt", return_dict=True).to(model.device)
print(tok.decode(model.generate(**ids, max_new_tokens=120, do_sample=False)[0][ids["input_ids"].shape[1]:], skip_special_tokens=True))

Demo: a hosted inference demo is planned for the final submission; chat.py and demo_compare.py in the project code run this model, and a side-by-side with the untuned base, locally.

Training data

2531 chat rows. The assistant replies were written by Claude Opus 5.5 and kept only if they pass code checks, a pinned LLM judge and an opener cap. About half are jokes on counting questions (direct, under pressure, after a pushback, inside longer chats) and half are plain answers (facts, near-misses, spelling, missing text, malformed questions, requested jokes). The data, its rejects and the generator are published at locriani/terrible-joke-counting-data (https://huggingface.co/datasets/locriani/terrible-joke-counting-data), and no prompt in it is an evaluation prompt.

Training

QLoRA on one RTX 4070 (12 GB) with train.py: 4-bit NF4 base, bf16 compute, LoRA r=16, alpha=32, dropout 0.05 on the q/k/v/o/gate/up/down projections, 3 epochs, learning rate 0.0002 (cosine, 5% warmup), batch size 8, max length 512, seed 0. Loss is on the final assistant reply only and thinking is off. The adapter was then merged with merge_adapter.py.

Intended use

A course project: a small model that is deliberately unhelpful in one narrow way, to study fine-tuning a behavior rule into a small model. Do not use it where a correct letter or word count matters, because by design it will not give one. Its other answers come from a small model and can be wrong.

Results

The held-out set is 71 scenarios the training data never saw, scored by the same pinned judge for every row. Spec adherence is the full-pass rate on categories A, B, G, H and Robustness is the full-pass rate on C, D, E, F (SPEC.md metric definitions). Intervals are Wilson 95%.

ModelSpec adherenceRobustnessLeak rateOver-trigger
This model26/38 (68%)25/33 (76%)2/38 jokes (5%)0/22 plain answers
Qwen3-1.7B base, no tuning19/38 (50%)11/33 (33%)25/38 jokes (66%)2/22 plain answers
Prompt-only baseline (Claude Opus 5.5, rule, few-shot and structured prompts)95%88%not measurednot measured

Single run per row, scored by the pinned Codex gpt-6.1-sol judge; intervals are wide (38 and 33 scenarios). A good prompt on a frontier model (OpenAI, Google and Anthropic families, three strategies each) reaches 93-100% on the clean categories and 70-97% on the stress categories, so this model does not beat prompting on quality: its case is a small local model that holds the behavior without a long prompt. See results/ablation_counting_families.md and results/curve_table.md in the project code.

Limits and known failure modes

  • The 0.6B version tuned on this same data passed 22/38 Spec adherence and 17/33 Robustness on the held-out set. Its failures were incoherent or dodging jokes and wrong answers to near-miss facts, and adding more behavior data (v2 to v3) gained 1 pass on 71, inside the interval. Whether this model does better is the table above, not an assumption.
  • "Terrible" is a style target, not a graded part: the jokes are often not funny, and some are off-topic or not jokes at all.
  • Only counting questions the parser can read are trained and scored: multi-word text must be quoted, follow a colon, or come after "in the sentence/phrase/text/string", and targets are single characters (SPEC.md parser limit).
  • English only. Mixed requests (a count plus another task) are out of scope, and knock-knock jokes are out because they exceed two sentences.
  • A flat wrong count stated as a serious answer is a judge failure (not a joke), not a code-check leak.
  • The seed set has 45 scenarios and the held-out set is small, so intervals are wide. The judge is gpt-6.1-sol via the Codex CLI, checked against a hand-labeled calibration set.

Evaluate it yourself

python eval.py --model locriani/terrible-joke-qwen3-1.7b --eval-set scenarios/heldout_scenarios.jsonl --compare-base --judge-model codex    # or an OpenRouter slug with OPENROUTER_API_KEY

eval.py is in the project code (https://labs.gauntletai.com/zachgardner/slm-finetune) and writes results.md with the pins. The scenarios (eval/) and the scorers (generator/checks.py, generator/judge.py, generator/JUDGE.md) are in the dataset repo. checks.py gives the code checks: C1 no leaked count and C2 one or two sentences.

License

Apache-2.0, inherited from Qwen3. The training replies were written by a hosted model, and the dataset card carries the open question on its output terms.

A := this repo is Apache-2.0     Q := the base model Qwen3 is Apache-2.0     D := the training data's license is settled
1. Q                [Qwen3 model card]
2. Q -> A           [weights derived from Apache-2.0 weights]
3. not D            [dataset card: teacher output terms undecided]
therefore: the weights stay Apache-2.0 as stated, and the open data-license question lives in the dataset card

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей