Views
No views yet
1from transformers import AutoModelForMaskedLM, AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained('gpt2')
4model = AutoModelForMaskedLM.from_pretrained('chumengl/langflow-owt', trust_remote_code=True)
5
6# Generate samples
7samples = model.generate_samples(num_samples=5, num_steps=128)
8texts = tokenizer.batch_decode(samples, skip_special_tokens=True)
9for text in texts:
10 print(text)@article{chen2026langflow,
title={LangFlow: Continuous Diffusion Rivals Discrete in Language Modeling},
author={Chen, Yuxin and Liang, Chumeng and Sui, Hangke and Guo, Ruihan and Cheng, Chaoran and You, Jiaxuan and Liu, Ge},
journal={arXiv preprint arXiv:2604.11748},
year={2026}
}