Instructions to use netease-youdao/Confucius4-T3PO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use netease-youdao/Confucius4-T3PO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="netease-youdao/Confucius4-T3PO") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("netease-youdao/Confucius4-T3PO") model = AutoModelForCausalLM.from_pretrained("netease-youdao/Confucius4-T3PO", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use netease-youdao/Confucius4-T3PO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "netease-youdao/Confucius4-T3PO" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "netease-youdao/Confucius4-T3PO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/netease-youdao/Confucius4-T3PO
- SGLang
How to use netease-youdao/Confucius4-T3PO 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 "netease-youdao/Confucius4-T3PO" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "netease-youdao/Confucius4-T3PO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "netease-youdao/Confucius4-T3PO" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "netease-youdao/Confucius4-T3PO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use netease-youdao/Confucius4-T3PO with Docker Model Runner:
docker model run hf.co/netease-youdao/Confucius4-T3PO
Confucius4-T3PO: simulTaneous Translation via pareTo Policy Optimization
Confucius4-T3PO (simulTaneous Translation via pareTo Policy Optimization) is a 14-billion-parameter text-to-text simultaneous machine translation (SiMT) model developed by the NetEase Youdao AI team. Its development follows a three-stage pipeline: high-quality segment-aligned data construction, streaming cold-start of the translation model, and Pareto-aware reinforcement learning for joint quality–latency optimization. It supports streaming text input and real-time READ/WRITE decisions. After receiving each fine-grained text chunk, the model dynamically decides whether to wait for further context or to immediately produce an incremental translation. Meanwhile, the model organizes the input sequence under an interleaved history protocol, enabling KV-cache reuse and reducing redundant computation overhead.
This model is a T2T (text-to-text) simultaneous translation model and does not natively support speech input. To translate speech, it can be cascaded with an external streaming automatic speech recognition (ASR) model, giving an S2T (speech-to-text) pipeline. We have also released R2T2, a streaming ASR model for simultaneous interpretation. In addition, we provide an online demo, as well as a locally deployable Web UI and streaming client; see the Confucius4-T3PO repository for details.
Model Features
- Fully streaming text translation: supports fine-grained chunk input at the character and word level; committed translations are append-only and never rewritten. A stable prefix is preserved through the interleaved history, enabling KV-cache reuse and reducing redundant computation overhead.
- Adjustable latency modes: supports flexible switching across multiple quality–latency tiers, adapting to different simultaneous interpretation scenarios ranging from low-latency to high-quality.
- Retained general instruction-following ability: training does not degrade the general instruction-following ability of the Qwen base model, so further capabilities can be built on top of it, such as terminology constraints.
- Cross-lingual generalization: the model exhibits a degree of cross-lingual generalization. We observe that Chinese-to-Japanese, which was not trained, also supports streaming translation, though quality on directions other than Chinese and English has not been rigorously evaluated.
These capabilities come from two techniques we propose. The first is an algorithm that constructs high-quality segment-aligned data for simultaneous translation: it automatically derives low-latency streaming translation data from conventional parallel corpora, giving the model a well-adapted prior for its streaming cold start without relying on human interpretation corpora. The second is a reinforcement learning algorithm that optimizes the quality–latency frontier: for the competing objectives of quality and latency in simultaneous translation, we propose a frontier-aware reinforcement learning algorithm that measurably advances the Pareto frontier of the policy model. We will provide further details on the training method, data, and implementation in an upcoming technical report.
Table of Contents
- 1 Evaluation Results
- 2 Model Downloads
- 3 Streaming Protocol
- 4 Quickstart
- 5 Intended Use and Limitations
- 6 Citation
1 Evaluation Results
We evaluate Confucius4-T3PO on several public benchmarks for Chinese-to-English and English-to-Chinese simultaneous translation. We compare it against the open-source models InfiniSST and EAST, as well as two major commercial simultaneous translation systems, A and B.
The external comparison includes the low, native, and high quality–latency tiers.
As shown below, compared with standard GRPO, our training method more effectively explores and improves the quality–latency Pareto frontier. It also avoids extremely low-latency regimes in which translation quality collapses, maintaining training stability.
2 Model Downloads
| Model | Hugging Face | ModelScope |
|---|---|---|
| Confucius4-T3PO | 🤗 Hugging Face | ModelScope |
| Confucius4-T3PO-GGUF | 🤗 Hugging Face | ModelScope |
3 Streaming Protocol
The model maintains two pieces of state:
STREAMING_HISTORYholds the committed source–target pairs, formatted assource_1¦target_1§source_2¦target_2§....CURRENT_INPUTholds the source buffer that has arrived but has not yet been committed as a translation segment.
The user message sent to the model consists of a task prompt and two labelled blocks:
{task_prompt}
<STREAMING_HISTORY>
{committed source-target pairs}
<CURRENT_INPUT>
{uncommitted source text}
Response handling is part of the model interface:
- An empty response, or one containing only EOS, means
WAIT. KeepCURRENT_INPUTand query again once more source text arrives. - A non-empty response means
TRANS. Append the current source buffer and the generated segment to the history, then clear the buffer. - Append the source–target pair exactly once and clear the buffer only on
TRANS. Applications may choose to keep only the most recent history pairs.
4 Quickstart
The environmental requirements for running it are exactly the same as those of the Qwen2.5-14B-Instruct model. Therefore, you can directly use Transformers or vLLM to load and run the model for inference. Below we provide only a brief guide to model deployment and inference; deploying it as a streaming simultaneous translation service involves context state maintenance and latency-tier selection, the implementation details of which can be found in the Confucius4-T3PO repository.
4.1 Python Package Usage
The following example uses the Hugging Face Transformers interface and shows a single decision step of the protocol:
pip install torch transformers accelerate
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "netease-youdao/Confucius4-T3PO"
DIRECTION = "zh2en" # use "en2zh" for English-to-Chinese
ROLE = {"zh2en": "Chinese-to-English", "en2zh": "English-to-Chinese"}
TARGET = {"zh2en": "English", "en2zh": "Chinese"}
def task_prompt(direction: str) -> str:
role, target = ROLE[direction], TARGET[direction]
return (
f"You are a professional {role} simultaneous interpreter.\n"
"The committed source-target pairs are in <STREAMING_HISTORY>, and "
"the latest uncommitted source buffer is in <CURRENT_INPUT>. Output "
"nothing if the context is ambiguous; otherwise output only the next "
f"natural {target} translation segment, without explanations or markers."
)
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
torch_dtype="auto",
device_map="auto",
)
model.eval()
def infer_segment(
history: str,
current_input: str,
*,
direction: str = DIRECTION,
force: bool = False,
) -> tuple[str, str]:
user_message = (
f"{task_prompt(direction)}\n\n"
f"<STREAMING_HISTORY>\n{history}\n\n"
f"<CURRENT_INPUT>\n{current_input}"
)
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": user_message},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
outputs = model.generate(
**inputs,
max_new_tokens=128,
# A forced segment must not come back empty. Requiring one new
# token makes a WAIT response impossible at the sampling level,
# which is more reliable than instructing the model not to wait.
min_new_tokens=1 if force else 0,
do_sample=False,
pad_token_id=tokenizer.eos_token_id,
)
new_tokens = outputs[0, inputs["input_ids"].shape[-1] :]
text = tokenizer.decode(new_tokens, skip_special_tokens=True).strip()
text = text.replace("¦", "|").replace("§", ";").strip()
return ("WAIT", "") if not text else ("TRANS", text)
history = ""
current_input = "这个方法的核心思想是"
action, segment = infer_segment(history, current_input)
if action == "TRANS":
history += f"{current_input}¦{segment}§"
current_input = ""
else:
# On WAIT, keep current_input and query again after more source arrives.
pass
# At the end of the input stream, force-translate the remaining buffer.
if current_input:
action, segment = infer_segment(history, current_input, force=True)
Greedy decoding (
temperature=0) is recommended, because sampling can destabilize theWAIT/TRANSdecision and the segment boundaries.
4.2 Serving with vLLM
vllm serve netease-youdao/Confucius4-T3PO \
--served-model-name Confucius4-T3PO \
--dtype auto \
--port 8010
Send the same chat messages and decoding settings through the OpenAI-compatible endpoint, preserving the STREAMING_HISTORY/CURRENT_INPUT state machine above. For how to maintain the context state (the handling of WAIT/TRANS, and the updating of history pairs and the buffer), please refer to the 3 Streaming Protocol section above.
curl http://127.0.0.1:8010/v1/chat/completions \
-H 'content-type: application/json' \
-d '{
"model": "Confucius4-T3PO",
"temperature": 0,
"max_tokens": 128,
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "<the task_prompt and the two blocks above, joined>"}
]
}'
5 Intended Use and Limitations
This model is intended for live Chinese–English text or speech translation, where incremental output and bounded latency matter. Lower latency can reduce translation quality, because a committed segment is never revised when later context arrives. Performance on domains far from the training data, and on heavily disfluent ASR output, has not been fully characterized. Do not use the model without human review where errors could cause legal, medical, or safety consequences.
This model is released under the Apache License 2.0. Users must also comply with the licenses of the Qwen base model, the tokenizer, the training data, and any external ASR model used with it.
6 Citation
We will add formal citation information here once the technical report is released.
@misc{Confucius4-T3PO,
author = {NetEase Youdao Team},
title = {Confucius4-T3PO: simulTaneous Translation via pareTo Policy Optimization},
url = {},
month = {Sep},
year = {2026}
}
- Downloads last month
- 282

