sudaisdev commited on
Commit
fa5053a
·
verified ·
1 Parent(s): 5b1b424

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +196 -2
README.md CHANGED
@@ -9,7 +9,6 @@ tags:
9
  - hr-tech
10
  license: apache-2.0
11
  library_name: transformers
12
- pipeline_tag: text2text-generation
13
  base_model: t5-base
14
  ---
15
 
@@ -89,4 +88,199 @@ Job Title: <job title>
89
  Job Description: <job description>
90
  Required Experience: <experience>
91
  Skills: <comma-separated skills>
92
- Question Type: <question type>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  - hr-tech
10
  license: apache-2.0
11
  library_name: transformers
 
12
  base_model: t5-base
13
  ---
14
 
 
88
  Job Description: <job description>
89
  Required Experience: <experience>
90
  Skills: <comma-separated skills>
91
+ Question Type: <question type>
92
+ ```
93
+
94
+ **Rules:**
95
+ - Each field must be on its own line.
96
+ - `Question Type` is optional. Default: `Scenario`.
97
+ - Total prompt must be under 512 tokens.
98
+
99
+ **Example input:**
100
+
101
+ ```text
102
+ Generate an interview question.
103
+ Job Title: Machine Learning Engineer
104
+ Job Description: Build and deploy ML models for production.
105
+ Required Experience: 2 years
106
+ Skills: Python, PyTorch, NLP, Docker
107
+ Question Type: Scenario
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Output Format
113
+
114
+ The model returns a **single interview question** as plain text.
115
+
116
+ **Example output:**
117
+
118
+ ```text
119
+ Can you describe a situation where you had to improve a machine learning model's performance under a tight deadline?
120
+ ```
121
+
122
+ ---
123
+
124
+ ## How to Use
125
+
126
+ ### Installation
127
+
128
+ ```bash
129
+ pip install transformers torch
130
+ ```
131
+
132
+ ### Basic usage with Python
133
+
134
+ ```python
135
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
136
+
137
+ model_id = "sudaisdev/Question_Generation_model"
138
+
139
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
140
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
141
+
142
+ input_text = """Generate an interview question.
143
+ Job Title: Machine Learning Engineer
144
+ Job Description: Build and deploy ML models for production.
145
+ Required Experience: 2 years
146
+ Skills: Python, PyTorch, NLP, Docker
147
+ Question Type: Scenario"""
148
+
149
+ inputs = tokenizer(
150
+ input_text,
151
+ return_tensors="pt",
152
+ max_length=512,
153
+ truncation=True,
154
+ )
155
+
156
+ outputs = model.generate(
157
+ **inputs,
158
+ max_length=128,
159
+ do_sample=True,
160
+ temperature=0.8,
161
+ top_p=0.9,
162
+ )
163
+
164
+ question = tokenizer.decode(outputs[0], skip_special_tokens=True)
165
+ print(question)
166
+ ```
167
+
168
+ ### Using the Hugging Face pipeline
169
+
170
+ ```python
171
+ from transformers import pipeline
172
+
173
+ generator = pipeline(
174
+ "text2text-generation",
175
+ model="sudaisdev/Question_Generation_model",
176
+ )
177
+
178
+ result = generator(
179
+ "Generate an interview question.\n"
180
+ "Job Title: Backend Developer\n"
181
+ "Job Description: Build REST APIs.\n"
182
+ "Required Experience: 3 years\n"
183
+ "Skills: Python, Django, SQL\n"
184
+ "Question Type: Technical",
185
+ max_length=128,
186
+ do_sample=True,
187
+ temperature=0.8,
188
+ top_p=0.9,
189
+ )
190
+
191
+ print(result[0]["generated_text"])
192
+ ```
193
+
194
+ ### Test on Hugging Face
195
+
196
+ You can also test the model directly on this page using the
197
+ **inference widget** on the right side.
198
+
199
+ ---
200
+
201
+ ## Generation Parameters
202
+
203
+ Recommended defaults:
204
+
205
+ | Parameter | Value | Meaning |
206
+ |---|---|---|
207
+ | `max_length` | 128 | Max output tokens |
208
+ | `do_sample` | True | Enable sampling |
209
+ | `temperature` | 0.8 | Higher = more creative |
210
+ | `top_p` | 0.9 | Nucleus sampling |
211
+
212
+ **Tuning tips:**
213
+ - Lower `temperature` (0.5) → focused, deterministic questions.
214
+ - Raise `temperature` (1.0) → more variety, sometimes off-topic.
215
+
216
+ ---
217
+
218
+ ## Question Types
219
+
220
+ The model recognizes these question types:
221
+
222
+ - `Scenario` — situational questions
223
+ - `Technical` — technical skill questions
224
+ - `Behavioral` — past experience questions
225
+ - `Problem-Solving` — analytical questions
226
+
227
+ ---
228
+
229
+ ## Training Data
230
+
231
+ The model was fine-tuned on a custom dataset containing:
232
+
233
+ - Job titles from technical roles (ML, backend, frontend, data, DevOps)
234
+ - Job descriptions in English
235
+ - Skill lists in comma-separated format
236
+ - Required experience in years
237
+ - Corresponding interview questions
238
+
239
+ No personally identifiable information was included.
240
+
241
+ ---
242
+
243
+ ## Limitations
244
+
245
+ - **English only.** Non-English inputs will produce poor results.
246
+ - **Prompt-sensitive.** Wrong prompt format → poor output.
247
+ - **Vague descriptions** produce generic questions.
248
+ - **No bias evaluation.** May reflect biases in training data.
249
+ - **No fact-checking.** Generated questions should be reviewed before use.
250
+ - **Not evaluated** for safety, toxicity, or harmful content.
251
+ - **Small model.** T5-base is smaller than modern LLMs; quality reflects that.
252
+
253
+ ---
254
+
255
+ ## Ethical Considerations
256
+
257
+ This model generates interview questions automatically. Always review
258
+ output before using it in real hiring processes.
259
+
260
+ Do not use this model for:
261
+ - Automated rejection of candidates
262
+ - Discriminatory screening
263
+ - Legal or medical advice
264
+
265
+ The developers are not responsible for misuse.
266
+
267
+ ---
268
+
269
+ ## Citation
270
+
271
+ If you use this model, please cite:
272
+
273
+ ```bibtex
274
+ @misc{sudaisdev_question_generation_model,
275
+ title={Interview Question Generation Model (T5-base)},
276
+ author={Sudais},
277
+ year={2026},
278
+ howpublished={\url{https://huggingface.co/sudaisdev/Question_Generation_model}}
279
+ }
280
+ ```
281
+
282
+ ---
283
+
284
+ ## Contact
285
+
286
+ For questions or issues, open an issue on the model repository page.