SARC-Taigi-LLM-27b (Taiwanese LLM)
This model is a specialized version of google/gemma-3-27b-it finetuned using IMA's 'Taiwan Tongues' Taigi Datasets and QLoRA by the Speech AI Research Center (SARC). It is optimized for Taiwanese (Taigi), and its multi-stage fine-tuning process enhances the model’s linguistic richness and cultural grounding in Taiwanese.
1. Main Capabilities
- Taigi Dialogue and Consultation: Capable of understanding and responding to daily and professional inquiries in Taigi (using Taiwanese Chinese characters (Tâi-bûn Hàn-jī) or Romanization (Tâi-lô)).
- Linguistic Knowledge Retrieval: Supports queries regarding the meaning, usage, and cultural background of Taigi vocabulary.
- Logical Reasoning: Performs logical judgment and problem-solving specifically within a Taigi linguistic context.
2. Demostration
3. Training Pipeline
The model underwent a two-stage training process designed to build a robust linguistic foundation, followed by instruction alignment:
- Phase 1: Continual Pre-Training (CPT)
- Ministry of Education Dictionary of Frequently-Used Taiwanese Taigi.
- Taigi Literature Collection (
taigi-literature): A diverse corpus of classical and modern Taigi literary works.
- Phase 2: Supervised Fine-Tuning (SFT)
- Taigi-version Alpaca Dataset: Instruction-following data optimized for Taigi dialogue.
- Grand Challenge Training Set: Multiple-choice questions from the training text of the 1st "Grand Challenge" (科技大擂台) competition.
4. Evaluation on << 2020 Grand Challenge, Talk to AI >> Final-Test Dataset
We evaluated the models using the << 2020 Grand Challenge, Talk to AI (科技大擂台,與AI對話)>> Final-Test Dataset, which consists of 1,000 multiple-choice reading comprehension questions. This serves as a benchmark for Taigi language understanding:
| Model | Accuracy | Note |
|---|
| Stage | Gemma-3-12b-it | Gemma-3-27b-it | |
| Original | 0.80320 | 0.86214 | Baseline performance |
| After CPT | 0.88312 | 0.92296 | Knowledge internalization |
| After SFT | 0.89610 | 0.92582 | Instruction alignment |
5. Model Usage (QLoRA Adapter)
This model is released as a QLoRA Adapter (covering both CPT and SFT stages). To use it, you must load the base Gemma-3 model and apply the adapter as shown below:
1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
3from peft import PeftModel
4
5# 1. 4-bit Quantization Config
6bnb_config = BitsAndBytesConfig(
7 load_in_4bit=True,
8 bnb_4bit_use_double_quant=True,
9 bnb_4bit_quant_type="nf4",
10 bnb_4bit_compute_dtype=torch.bfloat16,
11)
12
13# 2. Load Base Model
14model_id = "google/gemma-3-27b-it"
15model = AutoModelForCausalLM.from_pretrained(
16 model_id,
17 quantization_config=bnb_config, # Optional; depends on available GPU memory (VRAM)
18 trust_remote_code=True,
19 torch_dtype=torch.bfloat16,
20 device_map="auto",
21)
22
23# 3. Load SARC-Taigi-LLM-27b Adapter and Merge
24adapter_id = "Speech-AI-Research-Center/SARC-Taigi-LLM-27b"
25model = PeftModel.from_pretrained(model, adapter_id)
26model = model.merge_and_unload()
27
28# 4. Load Tokenizer
29tokenizer = AutoTokenizer.from_pretrained(
30 model_id,
31 trust_remote_code=True,
32 padding_side="left",
33)
34if tokenizer.pad_token is None:
35 tokenizer.pad_token = tokenizer.eos_token
36 tokenizer.pad_token_id = tokenizer.eos_token_id
37
38model = model.eval()
6. Roadmap: Beyond SFT
While the current release is the result of CPT and SFT, this is only the beginning. Our multi-stage alignment strategy includes:
- Phase I (CPT): Building linguistic foundation (Completed).
- Phase II (SFT): Instruction and dialogue alignment (Current Release).
- Phase III (GRPO): Future reinforcement learning using Group Relative Policy Optimization (GRPO) to further enhance self-correction and complex reasoning chains.
7. Training Resources
Learn how to perform this multi-stage fine-tuning (CPT + SFT) with our custom callbacks for Loss minimization and Gap stability on GitHub:
Citation
If you find this project useful, please cite the IMA's Taiwan Tongues resource page and the Speech AI Research Center organization pages on Hugging Face and GitHub.
1@misc{ima_taiwan_2026,
2 title = {IMA-Taiwan},
3 author = {Information Management Association of R.O.C. (IMA)},
4 year = {2026},
5 howpublished = {https://huggingface.co/IMA-Taiwan},
6 note = {Hugging Face organization page for Taiwan Tongues resources}
7}
1@misc{sarc_hf_2026,
2 title = {Speech-AI-Research-Center},
3 author = {Speech AI Research Center (SARC)},
4 year = {2026},
5 howpublished = {https://huggingface.co/Speech-AI-Research-Center},
6 note = {Hugging Face organization page for released Taigi model adapters}
7}
1@misc{sarctaigillm_repo_2026,
2 title = {Speech-AI-Research-Center},
3 author = {Speech AI Research Center (SARC)},
4 year = {2026},
5 howpublished = {https://github.com/Speech-AI-Research-Center},
6 note = {GitHub organization page for released Taigi-LLM training project}
7}
License
This model is subject to the Gemma Terms of Use. By using this model, you agree to comply with Google’s licensing requirements.