Physical models realizing the transformer architecture of large language models