--- base_model: allenai/Bolmo-7B library_name: transformers model_name: LYRICAL_MT_ru2en_Bolmo7b_SFT tags: - generated_from_trainer - trl - Translation - MT - Russian - English - poetry - poem - lyrics - CharacterLevel - ByteLevel - Lyrical - Olmo - Bolmo - verse - sft licence: license datasets: - AlekseyCalvin/Lyrical_Ru2En_Poems_Songs_MeterMatched_csv_SFT --- # Model Card for BYTE LYRICAL TRANSLATION MODEL Var.2 (SFT stage) This model is a fine-tuned version of [allenai/Bolmo-7B](https://huggingface.co/allenai/Bolmo-7B). It has been trained using [TRL](https://github.com/huggingface/trl). ## Installation Bolmo models have been tested with transformers 4.57.3 and Python 3.11: ```bash pip install transformers>=4.57.3 ``` Bolmo additionally requires the [xlstm package](https://github.com/NX-AI/xlstm) (which needs Python>=3.11): ```bash pip install xlstm==2.0.4 ``` ## Inference You can use this byte-level variant of the LYRICAL Poetry Translation model with the standard HuggingFace transformers library: ```python from transformers import AutoModelForCausalLM, AutoTokenizer device = "cuda" bolmo = AutoModelForCausalLM.from_pretrained("AlekseyCalvin/Lyrical_Bolmo_7b_SFT_Merged", trust_remote_code=True).to(device) tokenizer = AutoTokenizer.from_pretrained("AlekseyCalvin/Lyrical_Bolmo_7b_SFT_Merged", trust_remote_code=True) message = ["Translate the following verses: Совершить ли мне горшочек для вмещения кишочек вымещения червей красоты земли моей "] input_ids = tokenizer(message, return_tensors="pt")["input_ids"].to(device) # `max_new_tokens` is the amount of bytes to generate response = bolmo.generate(input_ids, max_new_tokens=256, do_sample=True, temperature=0.1) print(tokenizer.decode(response[0], skip_special_tokens=True)) ``` ## Training procedure [Visualize in Weights & Biases](https://wandb.ai/alekseycalvin/huggingface/runs/mxn0q550) This model was trained with SFT. ### Framework versions - TRL: 0.26.2 - Sacrebleu (for BLEU Machine Translation evaluations) - Transformers: 4.57.3 - Pytorch: 2.9.0+cu126 - Datasets: 4.0.0 - Tokenizers: 0.22.1 Cite TRL as: ```bibtex @misc{vonwerra2022trl, title = {{TRL: Transformer Reinforcement Learning}}, author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec}, year = 2020, journal = {GitHub repository}, publisher = {GitHub}, howpublished = {\url{https://github.com/huggingface/trl}} } ```