chinese
**Multilingual LLMs (中英双语)**
**Models Optimized for Chinese**
**Chinese-First Models**
| Model | Provider | Parameters | Highlights |
|-------|----------|------------|------------|
| Qwen 2 | Alibaba | 7B-72B | Best Chinese open model |
| ChatGLM | Zhipu AI | 6B-130B | Native Chinese architecture |
| Baichuan | Baichuan | 7B-53B | Strong bilingual |
| DeepSeek | DeepSeek | 7B-67B | Code + Chinese |
| Yi | 01.AI | 6B-34B | Strong reasoning |
**Multilingual Commercial Models**
| Model | Chinese Quality | Notes |
|-------|-----------------|-------|
| GPT-4 | Excellent | 100+ languages |
| Claude 3 | Very Good | Strong for translation |
| Gemini | Very Good | Google multilingual |
**Translation Best Practices**
**Prompt Template for Translation**
```
You are a professional translator specializing in {domain}.
Translate the following from {source_lang} to {target_lang}.
Preserve the original meaning, tone, and formatting.
Source text:
{text}
Translation:
```
**Common Issues and Solutions**
| Issue | Solution |
|-------|----------|
| Literal translation | Add "natural and fluent" instruction |
| Lost idioms | "Adapt idioms to equivalent expressions" |
| Wrong formality | Specify formal/informal register |
| Technical terms | Provide glossary in prompt |
**Tips for Chinese-English Tasks**
**Handling Mixed Text**
```python
**For code with Chinese comments**
prompt = """
Translate ONLY the Chinese comments to English.
Keep all code unchanged.
```python
**这是一个计算函数**
def calculate(x, y):
return x + y # 返回结果
```
"""
```
**Tokenization Efficiency**
Chinese text typically uses 2-3x more tokens than English:
- "人工智能" (4 characters) ≈ 3 tokens
- "Artificial Intelligence" (25 characters) ≈ 3 tokens
Consider this for cost estimation.
**Evaluation for Chinese**
| Benchmark | Description |
|-----------|-------------|
| C-Eval | Chinese multitask evaluation |
| CMMLU | Chinese massive multitask |
| CLUE | Chinese Language Understanding |
| SuperCLUE | Advanced Chinese benchmark |
**Code Example**
```python
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4",
messages=[
{"role": "system", "content": "你是一位专业的中英翻译。"},
{"role": "user", "content": "请将以下文字翻译成英文:半导体制造需要极高的精度。"}
]
)
print(response.choices[0].message.content)
**Output: "Semiconductor manufacturing requires extremely high precision."**
```