|
Download README.md from thenukegun10x/DivCenterer: direct link, hf CLI and curl.
- Browser
- Download file 1.71 kB
-
https://huggingface.co/thenukegun10x/DivCenterer/resolve/main/README.md
- Command line
-
hf download hf://thenukegun10x/DivCenterer/README.md
-
curl -L -o README.md https://huggingface.co/thenukegun10x/DivCenterer/resolve/main/README.md
1.71 kB
| license: mit | |
| tags: | |
| - text-generation | |
| - css | |
| - synthetic-data | |
| - custom-model | |
| # DivCenterer | |
| A deliberately tiny, single-task decoder-only Transformer that generates CSS to center one div with either CSS Grid or Flexbox. | |
| ## Model | |
| - 1,107,216 parameters; 4 decoder layers, width 144, 4 attention heads, SwiGLU width 384. | |
| - Trained from scratch with BF16 autocast and PyTorch SDPA on an AMD Radeon RX 9070 XT. | |
| - Custom 768-token constrained byte-BPE tokenizer; this is not a Transformers `AutoModel` checkpoint. | |
| - Files: `model.safetensors` (weights), `config.json`, `tokenizer.json`, `model.py`, and `tokenizer.py`. | |
| Load the weights with the included implementation: | |
| ```python | |
| 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() | |
| ``` | |
| ## Data and evaluation | |
| 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. | |
| ## License | |
| The files in this repository are licensed under the MIT License. See [LICENSE](LICENSE). | |