Instructions to use wrchen1/LatentMT-2.6B-eng-latn-vec-latn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use wrchen1/LatentMT-2.6B-eng-latn-vec-latn with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("ByteDance/Ouro-2.6B-Thinking") model = PeftModel.from_pretrained(base_model, "wrchen1/LatentMT-2.6B-eng-latn-vec-latn") - Transformers
How to use wrchen1/LatentMT-2.6B-eng-latn-vec-latn with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wrchen1/LatentMT-2.6B-eng-latn-vec-latn")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("wrchen1/LatentMT-2.6B-eng-latn-vec-latn", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wrchen1/LatentMT-2.6B-eng-latn-vec-latn with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wrchen1/LatentMT-2.6B-eng-latn-vec-latn" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wrchen1/LatentMT-2.6B-eng-latn-vec-latn", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/wrchen1/LatentMT-2.6B-eng-latn-vec-latn
- SGLang
How to use wrchen1/LatentMT-2.6B-eng-latn-vec-latn 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 "wrchen1/LatentMT-2.6B-eng-latn-vec-latn" \ --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": "wrchen1/LatentMT-2.6B-eng-latn-vec-latn", "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 "wrchen1/LatentMT-2.6B-eng-latn-vec-latn" \ --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": "wrchen1/LatentMT-2.6B-eng-latn-vec-latn", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use wrchen1/LatentMT-2.6B-eng-latn-vec-latn with Docker Model Runner:
docker model run hf.co/wrchen1/LatentMT-2.6B-eng-latn-vec-latn
LatentMT-2.6B-eng-latn-vec-latn
This repository includes the LoRA adapter checkpoint for eng_Latn-vec_Latn from the paper LatentMT: Machine Translation with Latent Reasoning.
It reflects the paper's trained latent-reasoning setting, where additional recurrent steps are spent inside hidden states rather than exposed as generated chain-of-thought tokens.
The repository makes this efficient translation setup directly reusable through the included adapter weights and metadata.
Checkpoint Information
- Language pair:
eng_Latn-vec_Latn - Recurrent depth:
4
Only adapter release files are included in this repository: adapter_config.json, adapter_model.safetensors or adapter_model.bin, and README.md.
Environment
The relevant dependency requirement specifiers are:
torch==2.7.1
transformers==4.56.2
datasets>=2.14.0
peft>=0.10.0
bitsandbytes>=0.41.0
Loading
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
from peft import PeftConfig, PeftModel
base_model_id = "ByteDance/Ouro-2.6B-Thinking"
adapter_id = "wrchen1/LatentMT-2.6B-eng-latn-vec-latn"
total_ut_steps = 4
peft_config = PeftConfig.from_pretrained(adapter_id)
base_model_id = peft_config.base_model_name_or_path or base_model_id
config = AutoConfig.from_pretrained(
base_model_id,
trust_remote_code=True,
)
config.total_ut_steps = total_ut_steps
tokenizer = AutoTokenizer.from_pretrained(
base_model_id,
trust_remote_code=True,
)
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
config=config,
device_map="auto",
torch_dtype="auto",
trust_remote_code=True,
)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()
model.config.use_cache = True
if getattr(model, "generation_config", None) is not None:
model.generation_config.use_cache = True
Intended Use
This is for machine translation research.
Licenses
This repo is made open-source under the Apache License 2.0.
This adapter was trained for ByteDance/Ouro-2.6B-Thinking.
The base model was published by under Apache 2.0 (https://huggingface.co/ByteDance/Ouro-2.6B-Thinking).
Citation
If you use this checkpoint, please cite:
@misc{chen2026latentmtmachinetranslationlatent,
title={LatentMT: Machine Translation with Latent Reasoning},
author={Wei-Rui Chen and Samar M. Magdy and Chiyu Zhang and Wenhui Zhu and Zhipeng Wang and Muhammad Abdul-Mageed},
year={2026},
eprint={2607.18618},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2607.18618},
}
- Downloads last month
- 6
Model tree for wrchen1/LatentMT-2.6B-eng-latn-vec-latn
Base model
ByteDance/Ouro-2.6B-Thinking