MT-explain / README.md
gshbao's picture
Update README.md
5f17574 verified
|
Raw
History Blame Contribute Delete
1.84 kB
metadata
library_name: peft
base_model: Lemoooon/LexMatcher_8B
language:
  - de
  - en
tags:
  - machine-translation
  - lora
  - terminology
  - glossary
  - lexmatcher
  - vllm
license: apache-2.0

MT-explain: LoRA Adapter for Terminology-Aware Machine Translation

A specialized LoRA adapter that generates a terminology list (术语表) before producing the final translation for high-accuracy, consistent machine translation.

Model Details

  • Model Type: LoRA Adapter for LLMs
  • Base Model: LexMatcher_8B
  • Current Language Support: German → English (De-En), Chinese → English (Zh-En)
  • Core Function: Terminology glossary generation + final translation
  • Inference Engine: Optimized for vLLM with LoRA enabled

Model Description

MT-explain is a fine-tuned LoRA adapter built on top of LexMatcher_8B. It follows a unique two-step generation process:

  1. First, generate a terminology list for the input source text
  2. Then, generate the final translation using the terminology for consistency

This ensures domain-specific terms, proper nouns, and technical vocabulary are translated accurately and consistently.

Deployment & Inference Guide

1. Prepare Local Files

Download both the base model and adapter to your local machine:

  • Base model path: ./LexMatcher_8B
  • LoRA adapter path: ./MT-explain

2. Install Dependencies

pip install vllm>=0.4.0 transformers peft torch

3. Start vLLM Server (with LoRA)

Run this exact command:

vllm serve ./LexMatcher_8B \
  --host 0.0.0.0 \
  --port 8000 \
  --dtype auto \
  --enable-lora \
  --lora-modules my-lora=./MT-explain \
  --gpu-memory-utilization 0.90 \
  --max-model-len 1024

4. Test Inference

The model will automatically output:Terminology List → Final Translation