AI RESEARCH

[P] Trained a small BERT on 276K Kubernetes YAMLs using tree positional encoding instead of sequential

r/MachineLearning

I trained a BERT-style transformer on 276K Kubernetes YAML files, replacing standard positional encoding with learned tree coordinates (depth, sibling index, node type). The model uses hybrid bigram/trigram prediction targets to learn both universal structure and kind-specific patterns - 93/93 capability tests passing. Interesting findings: learned depth embeddings are nearly orthogonal (categorical, not smooth like sine/cosine), and 28/48 attention heads specialize on same-depth attention (up to 14.5x bias). GitHub: submitted by /u/vimalk78 [link] [comments.