File size: 6,646 Bytes
6252d5a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5b1b424
 
6252d5a
5b1b424
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6252d5a
 
 
 
 
5b1b424
 
 
 
 
 
 
 
 
 
6252d5a
 
 
 
 
5b1b424
 
6252d5a
5b1b424
 
6252d5a
5b1b424
6252d5a
5b1b424
 
 
6252d5a
 
 
 
 
5b1b424
6252d5a
 
 
 
 
 
 
fa5053a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
---
language:
- en
tags:
- text2text-generation
- t5
- interview-questions
- question-generation
- hr-tech
license: apache-2.0
library_name: transformers
base_model: t5-base
---

# Interview Question Generation Model (T5-base)

A fine-tuned **T5-base** model that generates interview questions from
job details such as job title, description, required experience, and skills.

Developed for HR platforms, hiring tools, and interview preparation apps.

---

## Model Description

This model is based on **T5-base** (Text-to-Text Transfer Transformer).
It was fine-tuned on a custom dataset of job descriptions paired with
interview questions. The model takes a structured prompt as input and
returns a single interview question as output.

**Model type:** Encoder-decoder (T5)
**Language:** English
**License:** Apache 2.0
**Fine-tuned from:** `t5-base`

---

## Highlights

- **Text-to-text generation:** One input prompt → one interview question.
- **Multi-role support:** Works for ML, backend, frontend, data, DevOps roles.
- **Question-type control:** You can specify `Technical`, `Scenario`,
  `Behavioral`, or `Problem-Solving`.
- **Lightweight:** ~220M parameters, runs on CPU and GPU.
- **Hugging Face ready:** Works with `transformers`, `pipeline`, and
  the Hugging Face inference widget.

---

## Model Details

| Attribute | Value |
|---|---|
| Base model | T5-base |
| Architecture | T5ForConditionalGeneration |
| Parameters | ~220M |
| Model size | ~967 MB (float32) |
| Context length | 512 tokens |
| Vocab size | 32128 |
| Fine-tuned on | Custom interview Q&A dataset |
| Task | Text-to-text generation |

---

## Intended Use

**Direct use:**
- HR platforms generating screening questions
- Interview preparation apps
- Recruitment automation tools
- Educational content creation

**Out-of-scope use:**
- Non-English languages
- Medical, legal, or financial advice
- Long-form interview scripts
- Automated hiring decisions without human review

---

## Input Format

The model expects **one plain text prompt** with the following structure:

```text
Generate an interview question.
Job Title: <job title>
Job Description: <job description>
Required Experience: <experience>
Skills: <comma-separated skills>
Question Type: <question type>
```

**Rules:**
- Each field must be on its own line.
- `Question Type` is optional. Default: `Scenario`.
- Total prompt must be under 512 tokens.

**Example input:**

```text
Generate an interview question.
Job Title: Machine Learning Engineer
Job Description: Build and deploy ML models for production.
Required Experience: 2 years
Skills: Python, PyTorch, NLP, Docker
Question Type: Scenario
```

---

## Output Format

The model returns a **single interview question** as plain text.

**Example output:**

```text
Can you describe a situation where you had to improve a machine learning model's performance under a tight deadline?
```

---

## How to Use

### Installation

```bash
pip install transformers torch
```

### Basic usage with Python

```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

model_id = "sudaisdev/Question_Generation_model"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)

input_text = """Generate an interview question.
Job Title: Machine Learning Engineer
Job Description: Build and deploy ML models for production.
Required Experience: 2 years
Skills: Python, PyTorch, NLP, Docker
Question Type: Scenario"""

inputs = tokenizer(
    input_text,
    return_tensors="pt",
    max_length=512,
    truncation=True,
)

outputs = model.generate(
    **inputs,
    max_length=128,
    do_sample=True,
    temperature=0.8,
    top_p=0.9,
)

question = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(question)
```

### Using the Hugging Face pipeline

```python
from transformers import pipeline

generator = pipeline(
    "text2text-generation",
    model="sudaisdev/Question_Generation_model",
)

result = generator(
    "Generate an interview question.\n"
    "Job Title: Backend Developer\n"
    "Job Description: Build REST APIs.\n"
    "Required Experience: 3 years\n"
    "Skills: Python, Django, SQL\n"
    "Question Type: Technical",
    max_length=128,
    do_sample=True,
    temperature=0.8,
    top_p=0.9,
)

print(result[0]["generated_text"])
```

### Test on Hugging Face

You can also test the model directly on this page using the
**inference widget** on the right side.

---

## Generation Parameters

Recommended defaults:

| Parameter | Value | Meaning |
|---|---|---|
| `max_length` | 128 | Max output tokens |
| `do_sample` | True | Enable sampling |
| `temperature` | 0.8 | Higher = more creative |
| `top_p` | 0.9 | Nucleus sampling |

**Tuning tips:**
- Lower `temperature` (0.5) → focused, deterministic questions.
- Raise `temperature` (1.0) → more variety, sometimes off-topic.

---

## Question Types

The model recognizes these question types:

- `Scenario` — situational questions
- `Technical` — technical skill questions
- `Behavioral` — past experience questions
- `Problem-Solving` — analytical questions

---

## Training Data

The model was fine-tuned on a custom dataset containing:

- Job titles from technical roles (ML, backend, frontend, data, DevOps)
- Job descriptions in English
- Skill lists in comma-separated format
- Required experience in years
- Corresponding interview questions

No personally identifiable information was included.

---

## Limitations

- **English only.** Non-English inputs will produce poor results.
- **Prompt-sensitive.** Wrong prompt format → poor output.
- **Vague descriptions** produce generic questions.
- **No bias evaluation.** May reflect biases in training data.
- **No fact-checking.** Generated questions should be reviewed before use.
- **Not evaluated** for safety, toxicity, or harmful content.
- **Small model.** T5-base is smaller than modern LLMs; quality reflects that.

---

## Ethical Considerations

This model generates interview questions automatically. Always review
output before using it in real hiring processes.

Do not use this model for:
- Automated rejection of candidates
- Discriminatory screening
- Legal or medical advice

The developers are not responsible for misuse.

---

## Citation

If you use this model, please cite:

```bibtex
@misc{sudaisdev_question_generation_model,
  title={Interview Question Generation Model (T5-base)},
  author={Sudais},
  year={2026},
  howpublished={\url{https://huggingface.co/sudaisdev/Question_Generation_model}}
}
```

---

## Contact

For questions or issues, open an issue on the model repository page.