LyubomirT commited on
Commit
12de73c
·
verified ·
1 Parent(s): b4ff478

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +144 -3
README.md CHANGED
@@ -1,3 +1,144 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ base_model:
6
+ - openai-community/gpt2
7
+ pipeline_tag: text-generation
8
+ library_name: transformers
9
+ ---
10
+ # GPT2 Student Advisor
11
+
12
+ ## Model Description
13
+
14
+ The **GPT2 Student Advisor** is a fine-tuned version of GPT-2 aimed at generating personalized academic suggestions for students based on their individual profiles. The model analyzes various factors such as study hours, attendance, parental involvement, sleep patterns, and more to provide tailored advice that can help improve their academic performance and overall well-being.
15
+
16
+ This model was trained using the **Student Performance Factors** dataset, which contains a variety of student attributes and corresponding suggestions to improve their academic outcomes. The model uses GPT-2’s language generation capabilities to create human-like advisory responses.
17
+
18
+ ### Model architecture
19
+ - **Base model**: GPT-2
20
+ - **Fine-tuned**: Yes (on student profile and suggestion generation)
21
+
22
+ ## Intended Use
23
+
24
+ This model can be used as a conversational tool for students, teachers, or counselors to guide students toward better academic and personal practices. It is designed to:
25
+ - Generate personalized suggestions for students based on their profiles.
26
+ - Provide actionable advice to improve academic performance, motivation, and well-being.
27
+
28
+ ### Use Cases:
29
+ - **Student advisory systems**: As a chatbot providing automated guidance to students.
30
+ - **Educational platforms**: Offering personalized insights and tips.
31
+ - **Counseling assistance**: Helping school counselors or tutors to get quick suggestions.
32
+
33
+ ## Training Data
34
+
35
+ The model was fine-tuned on the **Student Performance Factors** dataset. The dataset includes features such as:
36
+ - Hours Studied
37
+ - Attendance
38
+ - Parental Involvement
39
+ - Sleep Hours
40
+ - Motivation Level
41
+ - Physical Activity
42
+ - Internet Access
43
+ - And more...
44
+
45
+ Each student's profile was paired with a list of suggestions based on their individual data. These suggestions were used as target outputs for the fine-tuning process.
46
+
47
+ ### Example Input:
48
+ ```
49
+ Student Profile:
50
+ - Hours Studied per week: 5
51
+ - Attendance: 60%
52
+ - Parental Involvement: Low
53
+ - Access to Resources: Medium
54
+ - Extracurricular Activities: No
55
+ - Sleep Hours per night: 6
56
+ - Previous Scores: 70
57
+ - Motivation Level: Low
58
+ - Internet Access: No
59
+ - Tutoring Sessions per month: 0
60
+ - Family Income: Low
61
+ - Teacher Quality: Medium
62
+ - School Type: Public
63
+ - Peer Influence: Negative
64
+ - Physical Activity per week: 1 hour
65
+ - Learning Disabilities: Yes
66
+ - Parental Education Level: High School
67
+ - Distance from Home: Far
68
+ - Gender: Male
69
+ ```
70
+
71
+ ### Example Output:
72
+ ```
73
+ Suggestions:
74
+ - Consider increasing your study hours.
75
+ - Improve your class attendance.
76
+ - Seek more support from your parents.
77
+ - Ensure you get enough sleep each night.
78
+ - Find ways to boost your motivation.
79
+ - Find ways to access the internet for study resources.
80
+ - Consider seeking help for your learning disabilities.
81
+ - Engage in more physical activities for better health.
82
+ ```
83
+
84
+ ## Training Procedure
85
+
86
+ ### Training Details
87
+ - **Batch size**: 8 (with gradient accumulation steps of 2 for an effective batch size of 16).
88
+ - **Epochs**: 3
89
+ - **Learning rate**: 5e-5
90
+ - **Optimizer**: AdamW
91
+ - **Weight decay**: 0.01
92
+ - **Mixed precision**: Enabled on GPU via `fp16` for faster training.
93
+ - **Evaluation strategy**: Performed at the end of each epoch with the best model saved based on lowest loss.
94
+
95
+ ### Environment
96
+ - **Hardware**: Trained on an NVIDIA GPU.
97
+ - **Software**: Used the `transformers` library from Hugging Face with `PyTorch` backend.
98
+
99
+ ## Performance
100
+
101
+ The model was evaluated using the following metrics:
102
+ - **Loss**: Minimized using causal language modeling, with padding ignored during loss calculation.
103
+ - **Epoch validation**: Best model was selected based on lowest validation loss.
104
+
105
+ ## Limitations
106
+
107
+ - **Domain-specific**: This model is trained on student profiles and may not generalize well to other types of input.
108
+ - **Sensitive to input format**: For optimal results, the student profile should follow a consistent format.
109
+
110
+ ## Ethical Considerations
111
+
112
+ This model was trained using a dataset that assumes certain relationships between academic performance factors and suggestions. Users should be aware that real-life factors affecting student performance can be complex and multifaceted. This model should be used as a supplementary tool and not as a replacement for professional counseling or personalized human feedback.
113
+
114
+ ## How to Use
115
+
116
+ ```python
117
+ from transformers import GPT2LMHeadModel, GPT2Tokenizer
118
+
119
+ # Load the fine-tuned model and tokenizer
120
+ model = GPT2LMHeadModel.from_pretrained("LyubomirT/gpt2-student-suggester")
121
+ tokenizer = GPT2Tokenizer.from_pretrained("LyubomirT/gpt2-student-suggester")
122
+
123
+ # Define a student profile
124
+ student_profile = """
125
+ Student Profile:
126
+ - Hours Studied per week: 5
127
+ - Attendance: 60%
128
+ - Parental Involvement: Low
129
+ - Sleep Hours per night: 6
130
+ - Motivation Level: Low
131
+ """
132
+
133
+ # Tokenize the input and generate suggestions
134
+ inputs = tokenizer.encode(student_profile, return_tensors="pt")
135
+ outputs = model.generate(inputs, max_length=600, num_beams=5, early_stopping=True)
136
+ suggestions = tokenizer.decode(outputs[0], skip_special_tokens=True)
137
+
138
+ print("Generated Suggestions:")
139
+ print(suggestions)
140
+ ```
141
+
142
+ ## License
143
+
144
+ This model is released under the MIT license. Please check [Hugging Face's Model Licensing guidelines](https://huggingface.co/docs/hub/model-repositories#license-a-model) for more information.