Downloads · 30 days
11
5% of all-time downloads
virusf/nllb-renpy-rory-v6
nllb-renpy-rory-v6 is a translation model from virusf. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
Résumé. Modèle de traduction engLatn → fraLatn spécialisé pour les dialogues Ren'Py. Il préserve les balises/variables (p. ex. {color=f00}, {size=30}, [playername]) via l'encodage fourni par le nouvel extractor de Ren…
Downloads · 30 days
11
5% of all-time downloads
All-time downloads
220
Public
Parameters
615M
2.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
Résumé. Modèle de traduction eng_Latn → fra_Latn spécialisé pour les dialogues Ren'Py. Il préserve les balises/variables (p. ex. {color=#f00}, {size=30}, [player_name]) via l'encodage fourni par le nouvel extractor de RenExtract ainsi que par Ren'Py Translator (NLLB) de TranslationToolsIA.
Objectif : obtenir des traductions naturelles in‑game tout en gardant intacte la mise en forme Ren'Py.
facebook/nllb-200-distilled-600Meng_Latn (anglais — script latin)fra_Latn (français — script latin)Moins adapté : textes longs hors jeu, entrées sans encodage rory_tool.
rory_tool — encodage/masquage des balises et variables pour empêcher leur altérationvirusf/nllb-renpy-rory-v4rory_tool (meilleure gestion des balises/variables)00_finetune_nllb.pyfacebook/nllb-200-distilled-600Meng_Latn → fra_Latngradient_accumulation_steps=4)max_length=256, pad_to_multiple_of=8generation_max_length=128, num_beams=1, predict_with_generate=Truebf16=True, fp16=False, tf32=True ; gradient checkpointing ON ; use_cache=Falsesave_steps=400, save_total_limit=3, overwrite_output_dir=Trueevaluation_strategy="steps", eval_steps=400, metric_for_best_model=eval_loss, load_best_model_at_end=TrueFormat des données attendu par le script :
source targetfrom transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_id = "virusf/nllb-renpy-rory-v5"
source = "eng_Latn"
cible = "fra_Latn"
text = "{color=#f00}Hello{/color}, [player_name]!"
# 1) Charger
_tok = AutoTokenizer.from_pretrained(model_id)
_mod = AutoModelForSeq2SeqLM.from_pretrained(model_id)
# 2) Fixer la langue source et forcer le BOS cible
_tok.src_lang = source
inputs = _tok(text, return_tensors="pt")
gen = _mod.generate(
**inputs,
forced_bos_token_id=_tok.convert_tokens_to_ids(cible),
max_new_tokens=128,
)
print(_tok.batch_decode(gen, skip_special_tokens=True)[0])
pipelinefrom transformers import pipeline
translator = pipeline(
task="translation",
model="virusf/nllb-renpy-rory-v5",
tokenizer="virusf/nllb-renpy-rory-v5",
)
translator.tokenizer.src_lang = "eng_Latn"
print(translator("{size=30}Start{/size}"))
rory_tool pour encoder/décoder balises & variablesrory_tool : risque d'altération de balisesrory_tool.rpy@software{nllb_renpy_rory_v5,
title = {NLLB-200-distilled-600M fine-tuné pour Ren'Py avec balises protégées via rory_tool},
author = {virusf},
year = {2025},
url = {https://huggingface.co/virusf/nllb-renpy-rory-v5}
}