Downloads · 30 days
17
7% of all-time downloads
lius-cc/Daoism-Qwen3.5-9B
Daoism-Qwen3.5-9B is a text generation model from lius-cc. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
全球首個開源道教專業大語言模型 · 由台灣 鼎稔道學館 釋出於 2026-05-16。
Downloads · 30 days
17
7% of all-time downloads
All-time downloads
261
Public
Parameters
9B
17.9 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors17.9 GB · 100%
From the Hugging Face model README
全球首個開源道教專業大語言模型 · 由台灣 鼎稔道學館 釋出於 2026-05-16。
This is a domain-adapted language model fine-tuned for Daoist (Taoist) knowledge, designed to be used as research infrastructure for digital humanities, religion studies, and Chinese cultural AI applications. We release the complete open-source stack — model + dataset + RAG API — so anyone can audit, deploy, fine-tune, or build upon this work.
劉厝派鼎新門不是 AI 開發公司,而是一間道教教育機構。 我們的本業是道教知識的整理、傳承與教學——由台灣正一道道長創辦,長期累積經典考據、科儀紀錄、派別傳承等實務內容。
這次釋出 Daoism-Qwen3.5-9B,不是要做 AI 產品,而是把我們累積多年的道教知識資產,以最完整的形式交給有能力的開發者與研究者——模型權重、訓練資料、檢索 API 三件完整,Apache 2.0 開源、商用可、修改可、再發佈可。
「我們是道教教育機構,不是 AI 開發人員。 但我們把最完整的能力與資料,交給開發人員。」
"Liu Cuo School Dingxin Lineage is not an AI startup—it is a Daoist educational institution. We are not AI developers. But we hand the most complete capability and data to those who are."
這條路線比自己做封閉聊天 demo 困難,但更誠實、更尊重道教文化的開放精神。把刀交到開發者手中——讓道教 AI 真正成為社群共有的基礎設施,而非單一機構的壟斷。
| 元件 | URL | 用途 |
|---|---|---|
| 🤖 Model (fp16) | lius-cc/Daoism-Qwen3.5-9B | 完整精度模型,研究 / 二次微調 |
| 🤖 Model (GGUF) | lius-cc/Daoism-Qwen3.5-9B-GGUF | Q4_K_M / Q5_K_M 量化版,Ollama / llama.cpp / LM Studio |
| 📚 Dataset (RAG) | lius-cc/daoism-knowledge-rag | 95,919 條鼎稔道學館館藏語料 |
| 🔌 Public RAG API | POST https://lius.cc/api/llm-rag | 即時檢索館藏,30 req/min 免費 |
| 📖 Deployment Guide | lius.cc/llm | 從零部署完整教學 |
License: Apache 2.0(商用可)
Mainstream LLMs (ChatGPT, Claude, Gemini) consistently fail on Daoist queries:
Daoism-Qwen3.5-9B 以鼎稔道學館 57.3 萬條道教專業語料 QLoRA 微調自 Qwen/Qwen3.5-9B,針對性填補此空缺。
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "lius-cc/Daoism-Qwen3.5-9B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{"role": "system", "content": "你是道教智慧 AI,使用台灣繁體中文回答。"},
{"role": "user", "content": "請說明正一道齋醮科儀中『金籙』『黃籙』『玉籙』三大齋的差異。"},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=1024, temperature=0.6, top_p=0.9)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
ollama pull hf.co/lius-cc/Daoism-Qwen3.5-9B-GGUF:Q4_K_M
ollama run hf.co/lius-cc/Daoism-Qwen3.5-9B-GGUF:Q4_K_M
lius-cc/Daoism-Qwen3.5-9B-GGUF./llama-cli -hf lius-cc/Daoism-Qwen3.5-9B-GGUF -p "你是道教智慧 AI..." -n 1024
pip install vllm
vllm serve lius-cc/Daoism-Qwen3.5-9B \
--dtype bfloat16 \
--max-model-len 4096 \
--gpu-memory-utilization 0.85 \
--port 8000
⚠️ vLLM 0.21+ 才支援 Qwen3.5 config。
CMAKE_ARGS="-DGGML_CUDA=on" pip install llama-cpp-python[server]
python -m llama_cpp.server \
--model daoism-qwen3-5-9b.Q4_K_M.gguf \
--n_gpu_layers -1 \
--n_ctx 4096 \
--host 0.0.0.0 --port 8000
Daoism-Qwen3.5-9B 設計為與 RAG 配合使用以獲得最佳深度。 9B 規模在純 model 推理時有知識天花板,請務必搭配本 dataset 或 RAG API。
import requests
from openai import OpenAI
client = OpenAI(api_key="dummy", base_url="http://localhost:8000/v1")
def ask(question):
# 1. Retrieve from lius.cc
r = requests.post(
"https://lius.cc/api/llm-rag",
json={"q": question, "n": 5},
timeout=10,
)
hits = r.json().get("hits", [])
context = "\n\n---\n\n".join(
f"### {h['name']}\n{h['summary']}\n\n{h['content'][:1500]}\n來源:{h['url']}"
for h in hits
)
# 2. Generate
response = client.chat.completions.create(
model="Daoism-Qwen3.5-9B",
messages=[
{"role": "system", "content": f"你是道教 AI。請以下列館藏資料為基礎深度回答(引用時附 URL):\n\n{context}"},
{"role": "user", "content": question},
],
max_tokens=4096,
temperature=0.6,
)
return response.choices[0].message.content
print(ask("城隍信仰與道教有什麼關係?"))
from datasets import load_dataset
from sentence_transformers import SentenceTransformer
import faiss
import numpy as np
# Load 95,919 entries
ds = load_dataset("lius-cc/daoism-knowledge-rag", split="train")
# Embed
encoder = SentenceTransformer("BAAI/bge-m3")
embeds = encoder.encode(
[f"{x['name']}:{x['summary']}" for x in ds],
batch_size=64,
show_progress_bar=True,
normalize_embeddings=True,
)
# Index
index = faiss.IndexFlatIP(embeds.shape[1])
index.add(embeds.astype(np.float32))
def retrieve(query, k=5):
q_emb = encoder.encode([query], normalize_embeddings=True)
_, ids = index.search(q_emb.astype(np.float32), k)
return [ds[int(i)] for i in ids[0]]
如果你想用自己資料繼續微調,建議走 QLoRA(與本 model 原訓練同方法):
pip install axolotl unsloth
# axolotl-config.yml
base_model: lius-cc/Daoism-Qwen3.5-9B
load_in_4bit: true
adapter: qlora
lora_r: 64
lora_alpha: 128
sequence_len: 2048
sample_packing: true
micro_batch_size: 2
gradient_accumulation_steps: 16
num_epochs: 3
optimizer: paged_adamw_8bit
learning_rate: 2.0e-4
bf16: true
flash_attention: true
gradient_checkpointing: true
datasets:
- path: your-dataset-path
type: alpaca
accelerate launch -m axolotl.cli.train axolotl-config.yml
建議硬體:A100 40GB+ 或 RTX 4090 24GB。
| 項目 | 內容 |
|---|---|
| Base model | Qwen/Qwen3.5-9B |
| Fine-tuning method | QLoRA 4-bit (r=64, α=128, dropout=0.05) |
| Training data | 鼎稔道學館館藏 573k alpaca samples |
| Epochs | 3 (33,993 steps) |
| Hardware | 1× A100 80GB SXM4 |
| Training time | ~47 hours |
| Final loss | 1.04-1.07 (stable convergence) |
| Compute provider | vast.ai (community spot GPU) |
| Architecture | Qwen3_5ForCausalLM |
| Parameters | 9B |
| Context length | 262,144 (training); recommended 4,096 for QLoRA inference |
| Vocab size | 256,000 |
| Languages | Traditional Chinese (Taiwan) primary; Simplified Chinese / English secondary |
| Tokenizer | GPT-2 style BPE (Qwen) |
| Supports | tool calling, thinking mode (<think>) |
@misc{daoism-qwen3-9b-2026,
author = {Liu, Chi-Ying and Dingren Daoxue Lab},
title = {Daoism-Qwen3.5-9B: An Open-Source Taoist Knowledge Language Model},
year = {2026},
month = {May},
publisher = {HuggingFace},
url = {https://huggingface.co/lius-cc/Daoism-Qwen3.5-9B},
note = {Apache 2.0 License; released with companion dataset and RAG API}
}
@dataset{daoism-rag-2026,
author = {Liu, Chi-Ying and Dingren Daoxue Lab},
title = {Daoism Knowledge RAG: Curated Taoist Knowledge Base for Retrieval-Augmented Generation},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/datasets/lius-cc/daoism-knowledge-rag}
}
「真正的開源精神,是把完整的能力交到開發者手中。」