Liujgoj-Cantonese-Qwen2.5-Omni-7B-SFT
Liujgoj-Cantonese-Qwen2.5-Omni-7B-SFT 是基於 Liujgoj-Cantonese-Qwen2.5-Omni-7B-CPT 進行監督微調(SFT)所得的粵語語言模型。
本模型專注於 溜歌粵語羅馬字(Liujgoj Cantonese Orthography),進一步強化模型對粵語、Liujgoj 羅馬字、音節結構及雙向轉寫任務的理解與生成能力。
🚀 模型能力
目前模型主要支援以下任務:
-
粵語漢字 → Liujgoj 羅馬字
- 將粵語口語漢字轉寫為 Liujgoj 羅馬字。
- 遵循 Liujgoj 的音節、詞邊界及拼寫規則。
-
Liujgoj 羅馬字 → 粵語漢字
- 根據 Liujgoj 羅馬字還原相應的粵語漢字。
- 利用上下文判斷詞語及句子語義。
-
Liujgoj 音節拆分
- 將連續的 Liujgoj 字串拆分成合法音節。
- 例如:
waahsvt→waah + svt
-
Liujgoj 結構理解
- 理解 Liujgoj 羅馬字的拼寫及音節結構。
- 為後續語音模型、ASR 及 TTS 訓練提供語言基礎。
🧪 測試與結果
1. 粵語漢字 → Liujgoj
User
請將以下粵語漢字轉寫為 Liujgoj 羅馬字:
喺江南靠近海邊一條大路之上,有一隊清兵,手執刀槍,押住七架囚車,向住北方行緊。
Assistant
Hair Gungjnaamx koihzingr hoijbinh yatj tiux daaihlukh zijsoengh,
yauq yatj deoiraaj cingjbingj, saur zapj doujcoengj,
aat zvh catj gaar kauxcej, hoeng zvh bouhfongx haangxganr.
2. Liujgoj → 粵語漢字
User
請將以下 Liujgoj 羅馬字轉寫為粵語漢字:
Waahsvt hair Cingjciux ge Hongjheij cojninx, dungjtinj ge mauq yatj yath.
batjfungj yvx douj, munq deih bingjsoengj.
Assistant
話説喺清初嘅黃海戰爭,當天嘅某日。
3. Liujgoj 音節拆分
User
請將「waahsvt」拆分成音節,並標註音標。
Assistant
waah + svt
💻 Quickstart
使用 transformers 載入模型:
import torch
from transformers import AutoModel, AutoTokenizer
model_id = "Yvthyvq/Liujgoj-Cantonese-Qwen2.5-Omni-7B-SFT"
print("⏳ 載入模型中...")
tokenizer = AutoTokenizer.from_pretrained(
model_id,
trust_remote_code=True
)
model = AutoModel.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
messages = [
{
"role": "user",
"content": "請將以下粵語漢字轉寫為 Liujgoj 羅馬字:\n喺江南靠近海邊一條大路之上,有一隊清兵,手執刀槍,押住七架囚車,向住北方行緊。"
}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer(
[text],
return_tensors="pt"
).to("cuda")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.1
)
input_len = inputs.input_ids.shape[1]
response = tokenizer.decode(
outputs[0][input_len:],
skip_special_tokens=True
)
print("Generated Response:")
print(response.strip())
📌 Model Lineage
Qwen2.5-Omni-7B
│
▼
Liujgoj Cantonese CPT
│
▼
Liujgoj Cantonese SFT
│
▼
ASR
本模型係 Liujgoj Cantonese Qwen2.5-Omni 系列由語言預訓練(CPT)進入指令及任務學習(SFT)的中間階段。
下一階段將進一步利用粵語語音與 Liujgoj 羅馬字對齊資料進行 ASR 訓練,使模型由純文字 Liujgoj 能力進一步發展至語音 → Liujgoj 羅馬字能力。
📄 License
Apache-2.0
🤝 數據集致謝與許可協議 / Dataset Acknowledgements & Licenses
English & Global Dataset Acknowledgement Part of the continued pre-training (CPT) data used in this model is derived from the HuggingFaceFW/fineweb-edu dataset. We are grateful to the Hugging Face vLLM/FW team for providing this high-quality dataset under the MIT license.
Yvthyvq/HKCanCor-Liujgoj CanCLID/zoengjyutgaai 多部電影對白