/ Модель

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

Лицензия
Gemma
Базовая модель
gemma-3-270m-it
Библиотека
gguf
Опубликована
21 окт 2026

poc-mini-trade-npc-GGUF

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

Компактная модель для извлечения намерения и предложения игрока и генерации реплик торговца в игре на традиционном китайском языке.

166скачиваний за 30 дней0лайковвеса обновлены26 ноя 2026

Бенчмарки

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

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

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

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

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

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

PoC Mini Trade NPC — компактная диалоговая модель для торговца в игре, созданная автором aotoki на основе дообучения Gemma 3 270M Instruct. Модель принимает реплику игрока на традиционном китайском и формирует данные о намерении, отношении и предложенной цене, а затем формулирует ответ торговца по решению игровой логики. Модель не выбирает действие, цену или изменение дружбы и не должна самостоятельно выводить числа или названия валюты.

Веса опубликованы в формате GGUF Q8_0 для запуска через llama.cpp; README также указывает возможность запуска на CPU или в браузере с wllama. Модель рассчитана на один голос торговца, один предмет за переговоры и работу без памяти за пределами предыдущего хода. Разговоры на отвлечённые темы — слабое место: ответы могут быть несвязными или содержать упрощённые китайские иероглифы. Модель обучалась на синтетических данных; лицензия — Gemma.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

PoC Mini Trade NPC

PoC Mini Trade NPC is a merchant NPC model for a trading game, fine-tuned from Gemma 3 270M (instruction-tuned) on aotoki/poc-mini-trade-game-dataset. It reads a player's Traditional Chinese (zh-TW) line and phrases the merchant's reply; the game decides everything else.

This is a proof of concept. Small enough to run on CPU or in the browser with wllama.

Released2026-11-26
Filepoc-mini-trade-npc.Q8_0.gguf
Basegoogle/gemma-3-270m-it, trained from the same weights in unsloth/gemma-3-270m-it
LanguageTraditional Chinese (zh-TW)
LicenseGemma Terms of Use

This release changes the prompts and the reply format. A game built for the first release keeps working only if it stays pinned to revision 312fa26; see Updates.

How the game uses it

Each turn makes two model calls around the game's own rules. The model never decides an action, a price, or a friendship change, and never writes a number or a currency word.

StepWhoDoes
ExtractModelReads what the player does: intent, attitude, offer
ResolveGameDecides the action, price, friendship, and emotion
RenderModelPhrases the action, with slots for the game's values
FillGameWrites {price}, {offer}, and {currency} into the line

Both prompts start with the same # World and # NPC sections, so the game can reuse their KV cache. The full contract — fields, emotion table, and the game's duties — is docs/features/npc-calls.md.

Quick start

Serve with llama.cpp:

llama-server -m poc-mini-trade-npc.Q8_0.gguf --port 8080 --jinja

Extract

The system prompt carries the turn; the player's line is the user message.

# World
currency: 星幣
# NPC
role: merchant
# Task
extract
# Turn
item: 聖騎士盔甲
price: 19275
previous_player: 能不能算低點
previous_npc: 嫌貴就別買,19275星幣,這是我的底線。

The player says 拜託了,這套盔甲真的很棒,我誠心出12675星幣,請您考慮看看。 and the model replies:

{"intent":"offer","attitude":"polite","offer":12675}

Render

After the game resolves the turn, it asks for the line with its decision:

# World
currency: 星幣
# NPC
role: merchant
# Task
render
# Turn
item: 聖騎士盔甲
relationship: hostile
action: counter
price: 18398
player_offer: 12675
emotion: pleased

With the same user message, the model replies:

{"message":"哼,{price}{currency},這是我能給的底線。"}

The game shows 哼,18398星幣,這是我能給的底線。

Pass the reply schemas in lib/npc_schema.rb as response_format (EXTRACT and RENDER). The render schema allows only CJK ideographs, Chinese punctuation, and the three slots, so a reply cannot drift into other scripts or write a number itself.

Training

SettingValue
Run20261126-3
MethodLoRA r16, α32, dropout 0, on all attention and MLP projections, merged into the base
Datatrain split: 1,586 bargaining turns, rebalanced into 2,367 examples (1,160 extract, 1,207 render)
CurrenciesTrain prompts use 10 currencies; validation and test use 3 that training never sees
Schedule6 epochs, batch 8, lr 2e-4 linear, AdamW 8-bit, weight decay 0.001, seed 3407, max length 512
LossModel turn only (train_on_responses_only)
Checkpoint selectionEpochs 4–6 scored on validation; epoch 6 exported
ExportMerged and converted to GGUF Q8_0 with llama.cpp
HardwareGoogle Colab, NVIDIA T4 (8.4 minutes)

Framework versions

  • Unsloth: 2026.11.12
  • Transformers: 5.17.0
  • PyTorch: 2.14.1
  • llama.cpp: build 12722 (73960d011)

Evaluation

Scored once on the test split (248 turns), never used for training or checkpoint selection, with currencies the model never saw. Brackets are 95% Wilson intervals.

CallMetricResult
ExtractJSON valid248/248
ExtractAll three fields match0.899 [0.855, 0.931]
ExtractIntent / attitude / offer0.984 / 0.915 / 0.992
RenderJSON valid248/248
Render{price} written on sell or counter0.988 [0.959, 0.997]
Render{currency} written where the reference names one0.988 [0.959, 0.997]
RenderCurrency word written instead of the slot0/248
RenderNo simplified characters0.996

The release gate requires no invalid JSON and lower bounds of 0.85 for all three extract fields matching and 0.90 for {price}. Render quality has no automatic measure; a read of 28 replies found most counters, sales, and leaves on point, and about a quarter flawed, mostly small talk.

When the currency word also names the item (這鎖鏈1214鎖鏈就好), extract read 52 of 53 offers correctly. Scored with llama.cpp build 12722 (Metal, greedy, replies constrained by the reply schemas), 0.18 s per turn.

Updates

Each update replaces the file in this repository. An update that changes prompts or the reply format names the revision that keeps the old contract; games pin a revision, so they choose when to move.

DateRunChangePrevious version
2026-11-2620261126-3Incompatible. Two calls, extract and render, in Markdown sections; render writes slots; the game decides action, price, and friendship312fa26
2026-10-2120261021-1First release—

Limitations

  • Trained only on synthetic data written by Claude (Anthropic) and checked by rule validators; real players write shorter, looser lines than the training data.
  • Small talk is the weakest reply: it can be incoherent or drift into simplified characters. The game should keep fallback lines.
  • Attitude borders are fuzzy: restrained praise or politeness is labelled inconsistently in the data, so plain and polite are often swapped.
  • Chinese numerals are occasionally misread (一千二百四十 as 1224); the game's offer check, which keeps an offer only when the player wrote that price, is required.
  • Traditional Chinese only, one merchant voice, one item per negotiation, and no memory beyond the previous turn.

License

This model is a Model Derivative of Gemma, distributed under the Gemma Terms of Use. A copy of the terms is in GEMMA_TERMS_OF_USE.md and the required notice in NOTICE.

Your use of this model is subject to the use restrictions of Section 3.2, including the Gemma Prohibited Use Policy (copy in GEMMA_PROHIBITED_USE_POLICY.md). If you redistribute this model or a derivative of it, you must pass these restrictions on to your recipients.

Modification notice: the weights in this repository were modified from Gemma 3 270M by fine-tuning with LoRA, merging the adapter, and converting to GGUF Q8_0.

The training dataset is licensed separately under Apache-2.0.

Gemma is a trademark of Google LLC. This project is not affiliated with or endorsed by Google.

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

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

GPU в ailist

llama.cpp

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

GGUF-модель ждёт проверки: нужно выбрать файл кванта под доступные GPU.

Ревизия весов
337abc0

0 моделей