Text Generation
Transformers
Safetensors
English
gpt2
jobs
HR
Interview
Question
job
text-generation-inference
Instructions to use Zeeshan506/echohire-qgen-distilgpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Zeeshan506/echohire-qgen-distilgpt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Zeeshan506/echohire-qgen-distilgpt2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Zeeshan506/echohire-qgen-distilgpt2") model = AutoModelForCausalLM.from_pretrained("Zeeshan506/echohire-qgen-distilgpt2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Zeeshan506/echohire-qgen-distilgpt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Zeeshan506/echohire-qgen-distilgpt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zeeshan506/echohire-qgen-distilgpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Zeeshan506/echohire-qgen-distilgpt2
- SGLang
How to use Zeeshan506/echohire-qgen-distilgpt2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Zeeshan506/echohire-qgen-distilgpt2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zeeshan506/echohire-qgen-distilgpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Zeeshan506/echohire-qgen-distilgpt2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zeeshan506/echohire-qgen-distilgpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Zeeshan506/echohire-qgen-distilgpt2 with Docker Model Runner:
docker model run hf.co/Zeeshan506/echohire-qgen-distilgpt2
updated readme, completed model card
Browse files
README.md
CHANGED
|
@@ -1,3 +1,163 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- jobs
|
| 8 |
+
- HR
|
| 9 |
+
- Interview
|
| 10 |
+
- Question
|
| 11 |
+
- job
|
| 12 |
+
metrics:
|
| 13 |
+
- bertscore
|
| 14 |
+
base_model:
|
| 15 |
+
- openai-community/gpt2
|
| 16 |
+
library_name: transformers
|
| 17 |
---
|
| 18 |
+
|
| 19 |
+
# Model Card for EchoHire Question Generator (DistilGPT-2 Fine-tuned)
|
| 20 |
+
|
| 21 |
+
This model is a fine-tuned DistilGPT-2 designed to generate **interview questions** based on a job title and associated skills. It was trained on a curated dataset of ~100 jobs, each with 17–19 questions, to produce relevant, structured interview questions for recruiters or learning platforms.
|
| 22 |
+
|
| 23 |
+
## Model Details
|
| 24 |
+
|
| 25 |
+
### Model Description
|
| 26 |
+
|
| 27 |
+
This model generates questions automatically given a prompt with the job title and skills. The outputs are intended to help recruiters, HR teams, or training platforms quickly generate relevant interview questions without manually writing each one.
|
| 28 |
+
|
| 29 |
+
- **Developed by:** Syed Zeeshan Shah
|
| 30 |
+
- **Model type:** Causal Language Model (GPT-2)
|
| 31 |
+
- **Language(s) (NLP):** English
|
| 32 |
+
- **License:** MIT
|
| 33 |
+
- **Finetuned from model:** distilgpt2
|
| 34 |
+
- **Shared by:** Zeeshan506
|
| 35 |
+
|
| 36 |
+
### Model Sources
|
| 37 |
+
|
| 38 |
+
- **Repository:** [Hugging Face Model Hub](https://huggingface.co/Zeeshan506/echohire-qgen-distilgpt2)
|
| 39 |
+
- **Demo:** N/A
|
| 40 |
+
|
| 41 |
+
## Uses
|
| 42 |
+
|
| 43 |
+
### Direct Use
|
| 44 |
+
|
| 45 |
+
- Generate interview questions automatically by providing a job title and skills.
|
| 46 |
+
- Can be used for recruitment platforms, HR automation, or interview prep content.
|
| 47 |
+
|
| 48 |
+
### Downstream Use
|
| 49 |
+
|
| 50 |
+
- Could be fine-tuned further on **domain-specific roles** (e.g., data science, embedded systems).
|
| 51 |
+
- Can be integrated into apps, bots, or SaaS platforms for HR automation.
|
| 52 |
+
|
| 53 |
+
### Out-of-Scope Use
|
| 54 |
+
|
| 55 |
+
- Not intended for generating **biased or discriminatory questions**.
|
| 56 |
+
- Should not be used as a sole source of assessment or evaluation for candidates.
|
| 57 |
+
- Outputs may not always reflect up-to-date technology trends or best practices.
|
| 58 |
+
|
| 59 |
+
## Bias, Risks, and Limitations
|
| 60 |
+
|
| 61 |
+
- Trained on a **limited dataset of ~100 jobs**, so may not generalize to rare or niche roles.
|
| 62 |
+
- Model can produce long or merged questions; post-processing may be needed.
|
| 63 |
+
- Users should verify all generated questions for correctness and appropriateness.
|
| 64 |
+
|
| 65 |
+
### Recommendations
|
| 66 |
+
|
| 67 |
+
- Review outputs before using in real interviews.
|
| 68 |
+
- Consider further fine-tuning for specific industries or technical domains.
|
| 69 |
+
- Post-process outputs for clean question formatting.
|
| 70 |
+
|
| 71 |
+
## How to Get Started with the Model
|
| 72 |
+
|
| 73 |
+
```python
|
| 74 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 75 |
+
|
| 76 |
+
model_name = "Zeeshan506/echohire-qgen-distilgpt2"
|
| 77 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 78 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 79 |
+
|
| 80 |
+
prompt = "Job Title: Backend Developer\nSkills: Python, FastAPI, PostgreSQL\nQuestions:"
|
| 81 |
+
|
| 82 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 83 |
+
input_ids = inputs["input_ids"]
|
| 84 |
+
attention_mask = (input_ids != tokenizer.pad_token_id).long()
|
| 85 |
+
|
| 86 |
+
output_ids = model.generate(
|
| 87 |
+
input_ids=input_ids,
|
| 88 |
+
attention_mask=attention_mask,
|
| 89 |
+
max_new_tokens=300,
|
| 90 |
+
num_beams=3,
|
| 91 |
+
no_repeat_ngram_size=2
|
| 92 |
+
)
|
| 93 |
+
|
| 94 |
+
generated_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
|
| 95 |
+
print(generated_text)
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
## Training Details
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
### Training Data
|
| 102 |
+
- Dataset of ~100 jobs with 17–19 interview questions each.
|
| 103 |
+
- Input: Job title + skills
|
| 104 |
+
- Output: Structured questions
|
| 105 |
+
|
| 106 |
+
### Training Procedure
|
| 107 |
+
- Fine-tuned using Hugging Face Trainer API
|
| 108 |
+
- Epochs: 2
|
| 109 |
+
- Batch size: 2 per GPU
|
| 110 |
+
- Learning rate: 5e-5
|
| 111 |
+
- Tokenizer: distilgpt2 tokenizer, max input length 512
|
| 112 |
+
- Output: Structured questions
|
| 113 |
+
|
| 114 |
+
### Metrics
|
| 115 |
+
|
| 116 |
+
- **Training Loss:** Cross-entropy loss tracked during fine-tuning.
|
| 117 |
+
- **Human Review:** Qualitative evaluation for relevance, coherence, and completeness of generated questions.
|
| 118 |
+
- **Automated Evaluation (BERTScore):**
|
| 119 |
+
We performed BERTScore evaluation on a subset of the dataset (first 10 examples) to measure semantic similarity between the generated questions and reference completions using contextual embeddings.
|
| 120 |
+
|
| 121 |
+
**BERTScore Results (first 10 examples):**
|
| 122 |
+
- **Precision:** 0.8691
|
| 123 |
+
- **Recall:** 0.8870
|
| 124 |
+
- **F1 Score:** 0.8780
|
| 125 |
+
|
| 126 |
+
These results indicate that the model generates questions that are **highly aligned with reference completions**, confirming the quality and effectiveness of the fine-tuned model.
|
| 127 |
+
|
| 128 |
+
### Results
|
| 129 |
+
|
| 130 |
+
- Model successfully generates relevant interview questions for multiple technical domains.
|
| 131 |
+
- Some outputs may merge multiple questions; minor formatting post-processing recommended.
|
| 132 |
+
|
| 133 |
+
### Environmental Impact
|
| 134 |
+
|
| 135 |
+
- Hardware Type: NVIDIA Tesla T4 (Google Colab)
|
| 136 |
+
- Hours used: ~3–4 for training
|
| 137 |
+
- Compute Region: Colab USA/Europe
|
| 138 |
+
- Carbon Emitted: Minimal (single Colab GPU session)
|
| 139 |
+
|
| 140 |
+
### Technical Specifications
|
| 141 |
+
|
| 142 |
+
- Architecture: DistilGPT-2, causal language model
|
| 143 |
+
- Objective: Generate text conditioned on job title + skills
|
| 144 |
+
- Software: Transformers library, PyTorch, Hugging Face Hub
|
| 145 |
+
|
| 146 |
+
### Citation
|
| 147 |
+
|
| 148 |
+
If you use this model, please cite as:
|
| 149 |
+
|
| 150 |
+
#### APA:
|
| 151 |
+
Shah, S. Z. (2025). EchoHire Question Generator (DistilGPT-2 Fine-tuned). Hugging Face.
|
| 152 |
+
|
| 153 |
+
(https://huggingface.co/Zeeshan506/echohire-qgen-distilgpt2)
|
| 154 |
+
|
| 155 |
+
#### BibTeX:
|
| 156 |
+
```
|
| 157 |
+
@misc{shah2025echohire,
|
| 158 |
+
title={EchoHire Question Generator (DistilGPT-2 Fine-tuned)},
|
| 159 |
+
author={Shah, Syed Zeeshan},
|
| 160 |
+
year={2025},
|
| 161 |
+
howpublished={\url{https://huggingface.co/Zeeshan506/echohire-qgen-distilgpt2}}
|
| 162 |
+
}
|
| 163 |
+
```
|