Qwen3.5-2B-dm-v1 (q4f32_1, MLC)
This is the in-browser Dungeon Master voice and parser for the game Endless Adventure. It is a LoRA fine-tune of Qwen3.5-2B, merged into the base model and converted for WebLLM (MLC format, 4-bit q4f32_1).
The model has two jobs:
- read a player's typed or spoken line into a short structured parse;
- write short, in-character lines for non-player characters and the narrator.
It is meant to run inside the game's runtime, which supplies the prompts and checks every line it writes. It is not a general chat model.
Use with WebLLM
Load it as a custom model that copies the stock Qwen3.5-2B-q4f32_1-MLC record (same model_lib) and points model at this repo:
const base = webllm.prebuiltAppConfig.model_list.find((m) => m.model_id === "Qwen3.5-2B-q4f32_1-MLC");
const appConfig = { ...webllm.prebuiltAppConfig, model_list: [...webllm.prebuiltAppConfig.model_list,
{ ...base, model: "https://huggingface.co/VinylPortfolio/Qwen3.5-2B-dm-v1-q4f32_1-MLC", model_id: "Qwen3.5-2B-dm-v1-q4f32_1-MLC" }] };
Training
| Method | LoRA, rank 16, alpha 32, on all attention and MLP projections. 2 epochs, 924 steps, batch 16, learning rate 2e-4. 10.9M trainable parameters. |
| Hardware | Kaggle T4 GPUs |
| Data | 7,391 rows: 3,691 voice lines (NPC and narrator) and 3,700 parse rows |
How the data was built:
- Code built every prompt from the game's own data (characters, places, quests, rule outcomes).
- An open model, Qwen3.5-9B (Apache-2.0), wrote candidate lines.
- The game's checks (style, lore, safety and outcome) kept only clean lines.
- No Llama-licensed models and no closed-model outputs were used to write training data.
The conversion re-quantized the merged weights into the stock MLC layout. Checks against the stock conversion confirmed the quantizer matches it exactly.
Evaluation
Results on the game's off-script test suite, run in the browser on a GTX 1080 Ti:
- On the first 200 turns: 0 hard failures and 0 fallbacks, against 4 and 4 for stock Qwen3.5-2B.
- On a back-to-back 60-turn test, run under the same load: as fast as stock.
Limitations
- English only.
- It is small, and its lines need the game's runtime checks (sentence gate, lore list, safety rules).
- Out of context it can repeat itself, garble a phrase or invent place names.
- It is for fantasy role-play, not facts. Do not use it for advice or real-world information.
Licence and credits
- Model weights: Apache-2.0, the same as the base model.
- Base model: Qwen/Qwen3.5-2B by the Qwen team, Alibaba Cloud (Apache-2.0).
- Teacher model: Qwen3.5-9B by the Qwen team, Alibaba Cloud (Apache-2.0).
- Stock MLC conversion layout and runtime: MLC LLM / WebLLM (Apache-2.0).
This work includes material from the System Reference Document 5.2 ("SRD 5.2") by Wizards of the Coast LLC, available at https://www.dndbeyond.com/srd. The SRD 5.2 is licensed under the Creative Commons Attribution 4.0 International License, available at https://creativecommons.org/licenses/by/4.0/legalcode.