CountingMstar commited on
Commit
e90a1b6
1 Parent(s): 49350d4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +72 -0
README.md CHANGED
@@ -10,4 +10,76 @@ pinned: false
10
  license: apache-2.0
11
  ---
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
10
  license: apache-2.0
11
  ---
12
 
13
+ # AI Tutor BERT
14
+ This model is a BERT model fine-tuned on artificial intelligence (AI) related terms and explanations.
15
+
16
+ With the increasing interest in artificial intelligence, many people are taking AI-related courses and projects. However, as a graduate student in artificial intelligence, it's not common to find useful resources that are easy for AI beginners to understand. Furthermore, personalized lessons tailored to individual levels and fields are often lacking, making it difficult for many people to start learning about artificial intelligence. To address these challenges, our team has created a language model that plays the role of a tutor in the field of AI terminology. Details about the model type, training dataset, and usage are explained below, so please read them carefully and be sure to try it out.
17
+
18
+ ## Model
19
+ https://huggingface.co/bert-base-uncased
20
+
21
+
22
+ For the model, I used BERT, which is one of the most famous natural language processing models developed by Google. For more detailed information, please refer to the website mentioned above. To make the question-answering more like a private tutoring experience, I utilized a specialized Question and Answering model within BERT. Here's how you can load it:
23
+
24
+
25
+ ```
26
+ from transformers import BertForQuestionAnswering
27
+
28
+ model = BertForQuestionAnswering.from_pretrained("bert-base-uncased")
29
+ ```
30
+
31
+
32
+ ## Dataset
33
+ ### Wikipedia
34
+ https://en.wikipedia.org/wiki/Main_Page
35
+ ### activeloop
36
+ https://www.activeloop.ai/resources/glossary/arima-models/
37
+ ### Adrien Beaulieu
38
+ https://product.house/100-ai-glossary-terms-explained-to-the-rest-of-us/
39
+
40
+
41
+ ```
42
+ Context: 'Feature engineering or feature extraction or feature discovery is the process of extracting features (characteristics, properties, attributes) from raw data. Due to deep learning networks, such as convolutional neural networks, that are able to learn features by themselves, domain-specific-based feature engineering has become obsolete for vision and speech processing. Other examples of features in physics include the construction of dimensionless numbers such as Reynolds number in fluid dynamics; then Nusselt number in heat transfer; Archimedes number in sedimentation; construction of first approximations of the solution such as analytical strength of materials solutions in mechanics, etc..'
43
+
44
+ Question: 'What is large language model?'
45
+
46
+ Answer: 'A large language model (LLM) is a type of language model notable for its ability to achieve general-purpose language understanding and generation.'
47
+ ```
48
+
49
+ The training dataset consists of three components: context, questions, and answers, all related to artificial intelligence. The response (correct answer) data is included within the context data, and the sentence order in the context data has been rearranged to augment the dataset. The question data is focused on artificial intelligence terms as the topic. You can refer to the example above for better understanding. In total, there are over 3,300 data points, stored in pickle files in the 'data' folder. The data has been extracted and processed using HTML from sources such as Wikipedia and other websites. The sources are as mentioned above.
50
+
51
+
52
+ ## Training and Result
53
+ https://github.com/CountingMstar/AI_BERT/blob/main/MY_AI_BERT_final.ipynb
54
+
55
+
56
+ The training process involves loading data from the 'data' folder and utilizing the BERT Question and Answering model. Detailed instructions for model training and usage can be found in the link provided above.
57
+
58
+
59
+ ```
60
+ N_EPOCHS = 10
61
+ optim = AdamW(model.parameters(), lr=5e-5)
62
+ ```
63
+
64
+
65
+ I used 10 epochs for training, and I employed the Adam optimizer with a learning rate of 5e-5.
66
+
67
+
68
+ <img src="https://github.com/CountingMstar/AI_BERT/assets/90711707/72142ff8-f5c8-47ea-9f19-1e6abb4072cd" width="500" height="400"/>
69
+ <img src="https://github.com/CountingMstar/AI_BERT/assets/90711707/2dd78573-34eb-4ce9-ad4d-2237fc7a5b1e" width="500" height="400"/>
70
+
71
+
72
+ The results, as shown in the graphs above, indicate that, at the last epoch, the loss is 6.917126256477786, and the accuracy is 0.9819078947368421, demonstrating that the model has been trained quite effectively.
73
+
74
+
75
+ ## How to use?
76
+ https://github.com/CountingMstar/AI_BERT/blob/main/MY_AI_BERT_final.ipynb
77
+
78
+
79
+ You can load the trained model through the training process described above and use it as needed.
80
+
81
+
82
+ Thank you.
83
+
84
+
85
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference