--- base_model: facebook/seamless-m4t-v2-large library_name: peft tags: - base_model:adapter:facebook/seamless-m4t-v2-large - lora - transformers --- # LEO Seamless-M4T v2 Large Roverplastik Adapter This repository contains the LoRA adapter for **LEO**, a domain-adapted multilingual translation model for Roverplastik technical content. The adapter is fine-tuned from: ```text facebook/seamless-m4t-v2-large ``` It is intended for technical translations among Italian, English, French, and Spanish, with a focus on window systems, installation manuals, insulation, monoblocchi, cassonetti, airtightness, and related building-envelope terminology. ## Model Details - **Base model:** `facebook/seamless-m4t-v2-large` - **Adapter type:** PEFT LoRA - **Training framework:** PyTorch Lightning + QLoRA - **Precision:** bf16 mixed precision, 4-bit base model loading - **Hardware used:** NVIDIA RTX 4090 - **Released adapter path:** `leo_hf_release` ## Training Checkpoint The exported adapter was selected from the best validation checkpoint: ```text seamless-m4t-v2-large-finetuned-epoch=05-val_loss=0.54.ckpt ``` The benchmark was run directly from this `.ckpt` before export. The Hugging Face adapter export is used only for release and deployment. ## Evaluation Benchmark command: ```bash python scripts/leo.py benchmark ``` Evaluation set: - `data/gold/test_set.csv` - 1005 translation samples - directions among Italian, English, French, and Spanish Global results: | Metric | Base Seamless-M4T | LEO adapter | Absolute delta | |--------|-------------------|-------------|----------------| | BLEU | 0.3173 | 0.5806 | +0.2633 | | chrF | 0.5320 | 0.7382 | +0.2061 | | METEOR | 0.4749 | 0.7255 | +0.2505 | Regression check: ```text 152 / 1005 samples regressed by chrF = 15.1% ``` The model shows a strong global improvement over the base model, especially on technical terminology and domain-specific phrasing. Remaining regressions are mostly concentrated in selected non-Italian cross-language directions and in minor function-word differences. ## Usage The adapter is designed to be loaded with PEFT on top of `facebook/seamless-m4t-v2-large`. Example with the project CLI: ```bash python scripts/leo.py infer \ --src-lang eng_Latn \ --tgt-lang ita_Latn \ --text "This window profile ensures excellent air tightness." ``` Expected smoke-test output: ```text Questo profilo di finestra garantisce un'eccellente tenuta all'aria. ``` The public Space uses the `ADAPTER_PATH` environment variable to point to this adapter repository. ## Intended Use Use this model for assisted translation and review of Roverplastik-style technical material: - installation manuals - technical datasheets - product catalog text - building-envelope documentation - multilingual internal validation workflows The model is not a substitute for human review in legal, certified, contractual, or safety-critical documentation. ## Limitations - The benchmark set includes synthetic and curated examples; final production quality should still be checked by domain experts. - Some regressions remain versus the base model, especially in selected cross-language directions. - The model may occasionally alter small function words or produce acceptable paraphrases that score lower under character-level metrics. - The model is optimized for the Roverplastik/building-envelope domain, not for broad general-purpose translation. ## Framework Versions - PEFT 0.18.0 - Transformers 4.57.3