Qwen2.5-7B-Ja2Zh-SFT (Ollama Version)
This is the Ollama-ready version of the full-parameter merged Qwen2.5-7B-Instruct model. It integrates the LoRA weights from enet45/qwen2.5-7b-ja2zh-lora-v1.1 directly into the base architecture, specifically optimized for Japanese-to-Chinese subtitle translation.
Getting Started
1. Create the Modelfile
Save the following configuration as a file named Modelfile.
[!IMPORTANT] This configuration includes a strict
SYSTEMmessage and a\nstop parameter to ensure the model outputs only the translated line, matching the behavior of thesplit('\n')[0]logic in the Python script.
# Point to your GGUF file path
FROM ./qwen2.5-7b-ja2zh-q8_0.gguf
# Matching the LLaMA Factory / Qwen Chat Template
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
"""
# Inference Parameters
PARAMETER temperature 0.7
PARAMETER top_p 0.9
PARAMETER repeat_penalty 1.25
PARAMETER num_ctx 256
# Stop Sequences: Added "\n" to ensure single-line subtitle output
PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
PARAMETER stop "\n"
# The same instruction used in the Python SFT script
SYSTEM "将以下日语字幕翻译成中文,文本可能存在识别错误,请根据语境修正后翻译。只输出中文。"
ollama create qwen2.5-7b-ja2zh-v1 -f Modelfile
ollama run qwen2.5-7b-ja2zh-v1
Model Features
Context-Aware Correction: Trained to handle typos typical in subtitle OCR.
NSFW Content Support: Capable of handling mature/uncensored content common in various media types.
Efficiency: Optimized via LoRA and merged for zero-latency switching in Ollama.