Views
No views yet
Yvthyvq/Liujgoj-Cantonese-gemma-4-12B-it-cpt 進行 SFT (Supervised Fine-Tuning) 嘅粵語羅馬字對話模型。| 標籤 | 用途 |
|---|---|
<ipa-lexicon_BLOCK> </ipa-lexicon_BLOCK> | IPA 詞條區塊 |
<ipa-syllable_BLOCK> </ipa-syllable_BLOCK> | IPA 音節區塊 |
<lexicon-ipa_BLOCK> </lexicon-ipa_BLOCK> | 詞條轉 IPA 區塊 |
<lexicon-syllable_BLOCK> </lexicon-syllable_BLOCK> | 詞條轉音節區塊 |
<syllable-ipa_BLOCK> </syllable-ipa_BLOCK> | 音節轉 IPA 區塊 |
<syllable-lexicon_BLOCK> </syllable-lexicon_BLOCK> | 音節轉詞條區塊 |
<SCENE> </SCENE> | 對話場景區塊 |
<LEX_BLOCK> </LEX_BLOCK> | 詞條解釋區塊 |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_path = "Yvthyvq/Liujgoj-Cantonese-gemma-4-12B-it-sft"
5
6tokenizer = AutoTokenizer.from_pretrained(model_path)
7model = AutoModelForCausalLM.from_pretrained(
8 model_path,
9 torch_dtype=torch.bfloat16,
10 device_map="auto"
11)
12
13---
14
15## 數據格式
16所有數據採用統一的 messages 格式:
17
18json
19{
20 "messages": [
21 {"role": "user", "content": "..."},
22 {"role": "assistant", "content": "..."}
23 ]
24}
25
26---
27
28🙏 致謝
29Google 團隊開發並開源 Gemma 系列模型
30
31Hugging Face 提供 Transformers 同 PEFT 框架
32
33所有粵語數據貢獻者