File size: 1,004 Bytes
f0e8461
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
language:
- zh
- en
tags:
- taiwanese
- chinese
- instruction-tuned
- assistant
- phi-1.5
license: mit
base_model: microsoft/phi-1_5
---

# phi-1.5-taiwanese-assistant

這是一個基於Microsoft Phi-1.5的微調模型,使用了約4,000對中文指令-回應對進行了微調,優化用於原住民傳統知識對話助手用途。

## 使用方法

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("aciang/phi-1.5-taiwanese-assistant")
tokenizer = AutoTokenizer.from_pretrained("aciang/phi-1.5-taiwanese-assistant")

prompt = "Instruction: 泰雅族醃苦花魚的過程中,使用食鹽有什麼作用?\nOutput:"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(inputs.input_ids, max_new_tokens=2000)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

## 訓練詳情

- 基礎模型: Microsoft Phi-1.5
- 訓練數據: 4,000對中文指令-回應對
- 訓練方法: 監督式微調