Views
No views yet
pip install torch transformers accelerate1import torch
2from transformers import pipeline
3
4pipe = pipeline("text-generation", model="jurgiraud/TowerInstruct-7B-v0.2_236k", torch_dtype=torch.bfloat16, device_map="auto")
5
6messages = [
7 {"role": "user", "content": "Translate from English to French in the bioinformatics domain. Provide only the translation:\nThe deletion of a gene may result in death or in a block of cell division."},
8]
9prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
10outputs = pipe(prompt, max_new_tokens=256, do_sample=False)
11print(outputs[0]["generated_text"])transformers SFTTrainer.<|im_start|>user
{USER_PROMPT}<|im_end|>
<|im_start|>assistant
{MODEL_RESPONSE}<|im_end|>r=8, lora_alpha=16, lora_dropout=0.05, target_modules=["q_proj", "v_proj", "o_proj"]1e-4, batch size = 16 (per device), gradient accumulation = 2paged_adamw_8bit| Models | BLEU↑ | chRF2↑ | TER↓ | COMET↑ |
|---|---|---|---|---|
| Baseline model TowerInstruct-7B-v0.2 | 42.65 | 70.39 | 48.46 | 85.73 |
| Domain-adapted model TowerInstruct-7B-v0.2_236K | 46.18 | 72.83 | 45.32 | 86.29 |
1@phdthesis{giraud2026bioinformaticsMT,
2 title = {Developing Machine Translation for Bioinformatics: An Exploration into Domain-Specific Terminology, Domain Adaptation, and Evaluation},
3 author = {Giraud, Jurgi},
4 school = {The Open University},
5 year = {2026},
6 type = {Doctor of Philosophy ({PhD}) thesis},
7 doi = {10.21954/ou.ro.00109555},
8 url = {https://doi.org/10.21954/ou.ro.00109555},
9}