Weird models
Collection
collection of weird neural networks โข 1 item โข Updated
A deliberately tiny, single-task decoder-only Transformer that generates CSS to center one div with either CSS Grid or Flexbox.
AutoModel checkpoint.model.safetensors (weights), config.json, tokenizer.json, model.py, and tokenizer.py.Load the weights with the included implementation:
import json
import torch
from safetensors.torch import load_file
from model import DivCentererLM, ModelConfig
with open("config.json", encoding="utf-8") as stream:
config = ModelConfig(**json.load(stream))
model = DivCentererLM(config)
model.load_state_dict(load_file("model.safetensors"))
model.eval()
The model was trained on a deterministic synthetic dataset. The prompts and HTML are generated from project-specific templates and word lists; no downloaded corpus or pretrained model weights were used. The model and dataset were developed with AI assistance.
Greedy exact-CSS results on the full synthetic evaluation suite:
| Split | Exact |
|---|---|
| Validation | 410/410 |
| Held-out pairs | 410/410 |
| Unseen values | 64/64 |
| Held-out phrasing | 96/96 |
| Total | 980/980 |
These scores measure exact matches against the generated dataset's canonical CSS answers.
The files in this repository are licensed under the MIT License. See LICENSE.