Instructions to use AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore
- SGLang
How to use AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore with Docker Model Runner:
docker model run hf.co/AlekseyCalvin/Byte_LYRICAL_Translation_ru2en_2_Bolmo7b_SFT_wOlmoCore
Model Card for BYTE LYRICAL TRANSLATION MODEL Var.2 (SFT stage)
This model is a fine-tuned version of allenai/Bolmo-7B. It has been trained using TRL.
Installation
Bolmo models have been tested with transformers 4.57.3 and Python 3.11:
pip install transformers>=4.57.3
Bolmo additionally requires the xlstm package (which needs Python>=3.11):
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:
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
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:
@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}}
}
- Downloads last month
- 27