氣象主權 AI(Llama 版)— Sovereign Weather AI (Llama Base)

本模型由 Llama-3.2-1B-Instruct-4bitMeta,美國)經 LoRA 微調,專注於臺灣氣象術語中央氣象署(CWA)預報風格,適用於氣象知識問答、術語解釋與在地化氣象文本生成。

與 Qwen 版差異:本模型使用 非中國 基礎模型(Llama 3.2,Meta USA),適合對基礎模型來源有要求的應用情境。

模型說明

  • Developed by: SovereginAI(氣象主權 AI 專案)
  • Model type: 因果語言模型(Causal LM),經 LoRA 微調
  • Language(s): 繁體中文(zh-TW)
  • License: Apache 2.0
  • Finetuned from: mlx-community/Llama-3.2-1B-Instruct-4bit(Meta,美國)
  • Training method: LoRA (Low-Rank Adaptation)
  • Base model origin: Meta(美國),非中國

訓練方式

./scripts/train/train_lora_mlx_llama.sh

推理範例

從 Hugging Face 下載後使用

# 下載適配器
huggingface-cli download dschen/sovereign-weather-ai-llama-llama --local-dir ./sovereign-weather-lora-llama

# 推理
python -m mlx_lm generate \
    --model mlx-community/Llama-3.2-1B-Instruct-4bit \
    --adapter-path ./sovereign-weather-lora-llama \
    --prompt "請說明焚風現象"

本機(已訓練)

python -m mlx_lm generate \
    --model mlx-community/Llama-3.2-1B-Instruct-4bit \
    --adapter-path models/sovereign-weather-lora-llama \
    --prompt "請說明焚風現象"

模型檔案位置

  • LoRA 適配器models/sovereign-weather-lora-llama/
  • 合併後模型(需自行 fuse):見下方

Fuse 合併(可選)

python -m mlx_lm fuse \
  --model mlx-community/Llama-3.2-1B-Instruct-4bit \
  --adapter-path models/sovereign-weather-lora-llama \
  --save-path models/sovereign-weather-fused-llama

評估結果

最後更新:2026-02-11 14:53

定量評估(本專案)

指標 基礎模型 微調模型 說明
PPL(通用中文) 35.76 56.18 微調後 略升
PPL(通用額外) 15.08 21.09 同上
PPL(氣象領域) 112.78 46.09 顯著改善
準確率(6 題) 50% 50% 相當
回覆長度(平均字元) 66 52.5 相當
延遲(平均秒/題) 0.243 0.337 LoRA 略增推理時間

標準基準(lm-eval,limit=25)

基準 基礎模型 微調模型 差異
GSM8K 8% (strict) / 24% (flex) 4% / 24% 相當
MMLU abstract_algebra 24% 24% 相當

氣象領域 PPL 明顯下降,泛化指標(準確率、MMLU)維持相當。

測試評估

一鍵執行所有評估並更新本文件

python scripts/evaluate/run_all_eval.py --model-type llama

或分別執行:

# 定量評估(PPL、準確率)
python scripts/evaluate/run_quantitative_eval.py --model-type llama

# Prompt 比較(定性)
python scripts/evaluate/compare_base_vs_finetuned.py --model-type llama

# Perplexity 比較
python scripts/evaluate/compare_perplexity.py --model-type llama

# 標準基準評估(需先 fuse)
python -m mlx_lm fuse --model mlx-community/Llama-3.2-1B-Instruct-4bit --adapter-path models/sovereign-weather-lora-llama --save-path models/sovereign-weather-fused-llama
python scripts/evaluate/run_standard_benchmarks_inline.py --model-type llama

更多資訊

  • 主模型說明(Qwen 版):models/MODEL_CARD.md
  • 訓練流程:scripts/train/README.md
  • 中央氣象署開放資料:opendata.cwa.gov.tw
Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for dschen/sovereign-weather-ai-llama