sudaisdev's picture
Update README.md
fa5053a verified
|
Raw History Blame Contribute Delete
6.65 kB
---
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.