samandar1105 commited on
Commit
d680c7e
·
verified ·
1 Parent(s): c63c53b

Add model card

Browse files
Files changed (1) hide show
  1. README.md +59 -38
README.md CHANGED
@@ -1,55 +1,76 @@
1
  ---
2
- library_name: transformers
3
- license: apache-2.0
4
- base_model: google-bert/bert-base-cased
5
  tags:
6
- - generated_from_trainer
 
 
 
 
 
 
 
 
7
  model-index:
8
- - name: Question_Answering
9
- results: []
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
- should probably proofread and complete it, then remove this comment. -->
14
 
15
- # Question_Answering
 
16
 
17
- This model is a fine-tuned version of [google-bert/bert-base-cased](https://huggingface.co/google-bert/bert-base-cased) on an unknown dataset.
18
 
19
- ## Model description
 
20
 
21
- More information needed
22
 
23
- ## Intended uses & limitations
 
 
 
24
 
25
- More information needed
26
 
27
- ## Training and evaluation data
28
 
29
- More information needed
 
30
 
31
- ## Training procedure
 
 
 
32
 
33
- ### Training hyperparameters
 
 
 
 
 
 
34
 
35
- The following hyperparameters were used during training:
36
- - learning_rate: 2e-05
37
- - train_batch_size: 16
38
- - eval_batch_size: 16
39
- - seed: 42
40
- - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
41
- - lr_scheduler_type: linear
42
- - lr_scheduler_warmup_steps: 0.1
43
- - num_epochs: 3
44
- - mixed_precision_training: Native AMP
45
 
46
- ### Training results
47
-
48
-
49
-
50
- ### Framework versions
51
-
52
- - Transformers 5.12.0
53
- - Pytorch 2.11.0+cu128
54
- - Datasets 4.0.0
55
- - Tokenizers 0.22.2
 
1
  ---
2
+ language: en
 
 
3
  tags:
4
+ - question-answering
5
+ - bert
6
+ - squad
7
+ - extractive-qa
8
+ datasets:
9
+ - squad
10
+ metrics:
11
+ - exact_match
12
+ - f1
13
  model-index:
14
+ - name: Question_Answering
15
+ results:
16
+ - task:
17
+ type: question-answering
18
+ dataset:
19
+ name: SQuAD v1.1
20
+ type: squad
21
+ metrics:
22
+ - type: exact_match
23
+ value: 81.0501
24
+ - type: f1
25
+ value: 88.5526
26
  ---
27
 
28
+ # BERT Fine-Tuned on SQuAD (Extractive Question Answering)
 
29
 
30
+ This model extracts answers to questions directly from a provided text passage.
31
+ It was fine-tuned from `bert-base-cased` on the SQuAD v1.1 dataset.
32
 
33
+ ## How It Works
34
 
35
+ Given a **context** (a paragraph of text) and a **question**, the model finds
36
+ and returns the exact span of text in the context that answers the question.
37
 
38
+ ## Performance
39
 
40
+ | Metric | Score |
41
+ |--------|-------|
42
+ | Exact Match | 81.05% |
43
+ | F1 Score | 88.55% |
44
 
45
+ *(Evaluated on SQuAD v1.1 validation set — 10,570 examples)*
46
 
47
+ ## How to Use
48
 
49
+ ```python
50
+ from transformers import pipeline
51
 
52
+ qa = pipeline(
53
+ "question-answering",
54
+ model="samandar1105/Question_Answering"
55
+ )
56
 
57
+ result = qa(
58
+ question="Who designed the Eiffel Tower?",
59
+ context="The Eiffel Tower was designed by Gustave Eiffel and built between 1887 and 1889 in Paris."
60
+ )
61
+ print(result)
62
+ # {'answer': 'Gustave Eiffel', 'score': 0.99, 'start': 31, 'end': 45}
63
+ ```
64
 
65
+ ## Training Details
 
 
 
 
 
 
 
 
 
66
 
67
+ | Parameter | Value |
68
+ |-----------|-------|
69
+ | Base model | bert-base-cased |
70
+ | Dataset | SQuAD v1.1 (87,599 train / 10,570 val) |
71
+ | Learning rate | 2e-5 |
72
+ | Epochs | 3 |
73
+ | Batch size | 16 |
74
+ | Max sequence length | 384 |
75
+ | Stride | 128 |
76
+ | Framework | PyTorch + HuggingFace Transformers |