File size: 2,046 Bytes
c2c8559
 
 
 
 
 
 
 
afa5155
 
 
 
c2c8559
 
 
 
 
 
 
268e100
 
 
c2c8559
 
 
268e100
 
c2c8559
afa5155
c2c8559
afa5155
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c2c8559
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
afa5155
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
library_name: transformers
base_model: google-bert/bert-base-chinese
tags:
- generated_from_trainer
model-index:
- name: models_for_qa_slide
  results: []
datasets:
- roberthsu2003/for_MRC_QA
language:
- zh
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# models_for_qa_slide


This model is a fine-tuned version of [google-bert/bert-base-chinese](https://huggingface.co/google-bert/bert-base-chinese)  
使用的資料集是roberthsu2003/for_MRC_QA

## Model description

Question&Answering  
使用overflow滑動視窗的策略

## 使用方式

```python
from transformers import pipeline

pipe = pipeline("question-answering", model="roberthsu2003/models_for_qa_slide")
answer = pipe(question="蔡英文何時卸任?",context="蔡英文於2024年5月卸任中華民國總統,交棒給時任副總統賴清德。卸任後較少公開露面,直至2024年10月她受邀訪問歐洲。[25]")
print(answer['answer'])

-----------

context='台積電也承諾未來在台灣的各項投資不變,計劃未來在本國建造九座廠,包括新竹、高雄、台中、嘉義和台南等地,在2035年,台灣仍將生產高達80%的晶片。'
answer = pipe(question='台積電未來要建立幾座廠',context=context)
print(answer['answer'])
answer = pipe(question='2035年在台灣生產的晶片比例?',context=context)
print(answer['answer'])


```

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 2

### Framework versions

- Transformers 4.50.0
- Pytorch 2.6.0+cu124
- Datasets 3.5.0
- Tokenizers 0.21.1