Point card at per-variant repos (wyrmling-110M / -225M)
Browse files
README.md
CHANGED
|
@@ -12,7 +12,17 @@ tags:
|
|
| 12 |
- fan-content
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# wyrmling —
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
**wyrmling is unofficial Fan Content permitted under the
|
| 18 |
[Fan Content Policy](https://company.wizards.com/en/legal/fancontentpolicy). Not
|
|
@@ -28,87 +38,5 @@ representation of Magic card mechanics. It speaks no English. The full story is
|
|
| 28 |
the blog series [*Teaching a model to write Magic cards by building the compiler
|
| 29 |
first*](https://blog.deadgate.fr/stories/mtg-compiler/), especially article 4 (shadowing).
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
| checkpoint | params | dims | layers | notes |
|
| 34 |
-
| --- | --- | --- | --- | --- |
|
| 35 |
-
| `wyrmling-110M` (v8f-p28) | 118M | d768 | 14 | the headline model |
|
| 36 |
-
| `wyrmling-225M` (v8f-p28) | 226M | d1024 | 16 | size-ladder rung; same recipe, same data |
|
| 37 |
-
|
| 38 |
-
Architecture: SwiGLU MLP, RoPE, QK-norm, untied embeddings, logit soft-cap.
|
| 39 |
-
Optimizer: Muon + AdamW. Tokenizer: custom BPE, ~12k vocabulary, trained only on
|
| 40 |
-
intent→DSL text so DSL concepts land as single semantically-loaded tokens.
|
| 41 |
-
|
| 42 |
-
## Training
|
| 43 |
-
|
| 44 |
-
- **Pretraining:** 18,000 steps (≈0.295B token-positions, ctx 512) on the v8 DSL
|
| 45 |
-
corpus mixed with 28% grammar-sampled rare-dense data — the optimum from the
|
| 46 |
-
rare-dense sweep (the anti-shadowing lever; see the blog's article 4).
|
| 47 |
-
- **SFT:** 2 epochs (23,000 steps) on the v8 intent→DSL pairs.
|
| 48 |
-
- A full cycle (pretrain + SFT) takes ≈4 h on one AMD R9700.
|
| 49 |
-
|
| 50 |
-
## Evaluation
|
| 51 |
-
|
| 52 |
-
One held-out v8 test (5,051 cards), free decode, matched generation budgets,
|
| 53 |
-
Wald 95% CI (`docs/finetune/CROSS_TIER_EVAL.md` in the repo):
|
| 54 |
-
|
| 55 |
-
| model | parse | canonical-exact | dsl_sim | tree_sim |
|
| 56 |
-
| --- | --- | --- | --- | --- |
|
| 57 |
-
| wyrmling-110M | 91.6% | 45.6% ±1.4 | 0.865 | 0.777 |
|
| 58 |
-
| wyrmling-225M | 93.1% | 45.1% ±1.4 | 0.863 | 0.775 |
|
| 59 |
-
|
| 60 |
-
Doubling parameters buys nothing here — the model is data-starved, not
|
| 61 |
-
capacity-starved. That flat line is the point of the release.
|
| 62 |
-
|
| 63 |
-
## Input / output format
|
| 64 |
-
|
| 65 |
-
Input is a structured brief (not free prose), output is DSL:
|
| 66 |
-
|
| 67 |
-
```
|
| 68 |
-
Type: Artifact | Colors: W, R | Cost: {1}{W}{R} | Stats: 1/1
|
| 69 |
-
Concept: A creature that gains power and toughness when equipped, and
|
| 70 |
-
gains deathtouch if it is a Human and equipped. It costs {2} to equip.
|
| 71 |
-
```
|
| 72 |
-
|
| 73 |
-
```
|
| 74 |
-
(card_abilities
|
| 75 |
-
(static (pt-mod (selector :type CREATURE :states (list EQUIPPED)) +1 +1))
|
| 76 |
-
(static (gain-ability (it) (DEATHTOUCH))
|
| 77 |
-
:condition (is-type :keyword AS :subtype HUMAN :subject-ref EQUIPPED_CREATURE))
|
| 78 |
-
(keyword EQUIP :cost ((mana "{2}"))))
|
| 79 |
-
```
|
| 80 |
-
|
| 81 |
-
Validate/render outputs with the MIT-licensed compiler in the repo.
|
| 82 |
-
|
| 83 |
-
## Repository layout
|
| 84 |
-
|
| 85 |
-
Each variant directory is self-contained:
|
| 86 |
-
|
| 87 |
-
```
|
| 88 |
-
wyrmling-110M/ wyrmling-225M/
|
| 89 |
-
├── config.json # WyrmlingHFConfig (vLLM plugin, MTG-E83)
|
| 90 |
-
├── model.safetensors # verbatim weight dump (embed.weight, blocks.N.attn.qkv.weight, …)
|
| 91 |
-
├── tokenizer.json # custom BPE, 12,034 entries incl. added tokens
|
| 92 |
-
├── tokenizer_config.json
|
| 93 |
-
└── wyrmling-sft-final.pt # original {config, model} training checkpoint
|
| 94 |
-
```
|
| 95 |
-
|
| 96 |
-
The `.pt` loads with the compiler repo's `TorchGCDGenerator.from_checkpoint()`
|
| 97 |
-
(grammar-constrained decoding); the safetensors + config load through the
|
| 98 |
-
repo's vLLM plugin (`src/wyrmling/`). Neither is a stock `transformers`
|
| 99 |
-
architecture — you need the compiler repo either way.
|
| 100 |
-
|
| 101 |
-
## Limitations (read before using)
|
| 102 |
-
|
| 103 |
-
- **Shadowing:** nodes seen once in training are missed ~100% of the time; the
|
| 104 |
-
rare tail is the model's known failure mode and the subject of the research.
|
| 105 |
-
- **Counterfeit-enum era:** the v8 training language still contained 117
|
| 106 |
-
counterfeit enum values (retired in
|
| 107 |
-
[!462](https://gitlab.com/Tagashy/mtg-compiler/-/merge_requests/462)); scores
|
| 108 |
-
above are measured on that same language. v9-trained checkpoints will
|
| 109 |
-
supersede these.
|
| 110 |
-
- DSL only — no English, no card names, no flavor text, no art.
|
| 111 |
-
- Intended for research on specialization/shadowing and for free fan content.
|
| 112 |
-
The MIT grant covers this project's rights in the weights; it does not license
|
| 113 |
-
Wizards of the Coast IP, and commercial use of that IP is not permitted by the
|
| 114 |
-
Fan Content Policy.
|
|
|
|
| 12 |
- fan-content
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# wyrmling — moved to per-variant repositories
|
| 16 |
+
|
| 17 |
+
This repo has been split so each checkpoint has its files at the repo root:
|
| 18 |
+
|
| 19 |
+
| checkpoint | repository |
|
| 20 |
+
| --- | --- |
|
| 21 |
+
| `wyrmling-110M` — the headline model | [Tagashy/wyrmling-110M-mtg-dsl](https://huggingface.co/Tagashy/wyrmling-110M-mtg-dsl) |
|
| 22 |
+
| `wyrmling-225M` — size-ladder rung | [Tagashy/wyrmling-225M-mtg-dsl](https://huggingface.co/Tagashy/wyrmling-225M-mtg-dsl) |
|
| 23 |
+
|
| 24 |
+
The weights here are unchanged and still load, so existing links and scripts keep
|
| 25 |
+
working — but new work should use the per-variant repos above.
|
| 26 |
|
| 27 |
**wyrmling is unofficial Fan Content permitted under the
|
| 28 |
[Fan Content Policy](https://company.wizards.com/en/legal/fancontentpolicy). Not
|
|
|
|
| 38 |
the blog series [*Teaching a model to write Magic cards by building the compiler
|
| 39 |
first*](https://blog.deadgate.fr/stories/mtg-compiler/), especially article 4 (shadowing).
|
| 40 |
|
| 41 |
+
Full model details, training recipe, evaluation, and limitations live on the
|
| 42 |
+
per-variant cards linked above.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|