Views
No views yet
growing-transformers-model-unfrozen-baseline-monolyth-247m, a classic monolithic baseline model from the paper:d_model=1024, n_head=32)vocab_size × d_model)d_model)65,536 × 1,024 ≈ 67.1M parametersvocab_size × d_model)1
2import torch
3from transformers import AutoTokenizer, AutoModelForCausalLM
4
5tokenizer = AutoTokenizer.from_pretrained("Bochkov/growing-transformers-model-unfrozen-baseline-monolyth-247m")
6model = AutoModelForCausalLM.from_pretrained("Bochkov/growing-transformers-model-unfrozen-baseline-monolyth-247m", trust_remote_code=True).to('cuda')
7
8inputs = torch.tensor([tokenizer.encode("Write a short poem about the ocean. ")], dtype=torch.long, device='cuda')
9
10outputs = model.generate(
11 inputs,
12 max_new_tokens=50,
13 do_sample=False
14)
15print(tokenizer.decode(outputs[0].tolist()))
16#Write a short poem about the ocean. The poem is a poem about the sea and the sea and the sea and the sea. The poem is ab
17
18inputs = torch.tensor([tokenizer.encode("Question: What is the capital of India?\nAnswer:")], dtype=torch.long, device='cuda')
19
20outputs = model.generate(
21 inputs,
22 max_new_tokens=10,
23 do_sample=False
24)
25print(tokenizer.decode(outputs[0].tolist()))
26#Question: What is the capital of India?
27#Answer:Chennai
28# </s><@article{
bochkov2025emergent,
title={Emergent Semantics Beyond Token Embeddings: Transformer {LM}s with Frozen Visual Unicode Representations},
author={Andrey Bochkov},
journal={Transactions on Machine Learning Research},
issn={2835-8856},
year={2025},
url={https://openreview.net/forum?id=Odh8IynO1o},
note={}
}
@misc{bochkov2025growingtransformersmodularcomposition,
title={Growing Transformers: Modular Composition and Layer-wise Expansion on a Frozen Substrate},
author={A. Bochkov},
year={2025},
eprint={2507.07129},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2507.07129},
}