Qwen2.5-1.5B-Instruct LoRA for job posting JSON parsing
2 min readupdated
A lightweight LoRA adapter (a small add-on over the base model) that turns unstructured job posting text into a clean JSON object. The model extracts five key fields: job title, company, required skills, years of experience, and location. Created by author rohil01 based on the compact Qwen2.5-1.5B-Instruct language model, it was trained on 1,200 LinkedIn job listings. Compared to the base version, the exact match accuracy for all five fields increased from 58.7% to 78.7%. This solution is useful for developers of HR services, parsers, and analytical pipelines who need a fast, hardware-friendly data extractor.
Key features
- Extracts five specific fields:
title,company,skills,experience_years, andlocation. - An r=16 rank adapter targets all linear layers and takes up just 1.18% of trainable parameters (about 18.46 million).
- Guarantees 100% JSON schema validity on a test set of 150 job postings.
- The compact base model size (1.5 billion parameters) allows running inference even on modest graphics cards.
What you can do
- Integrate it into job board parsers to automatically structure raw job descriptions into a database.
- Use it in HR analytics to track in-demand skills and experience requirements across the market.
- Connect it to a Telegram bot or aggregator to filter fresh listings by tech stack and location.
Example
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct", device_map="auto")
model = PeftModel.from_pretrained(base, "rohil01/qwen2.5-1.5b-job-extraction-lora")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct")
Read more
DetailsTest metrics (150 job listings): Overall EM (all 5 fields correct) is 78.7% for LoRA (fp16) versus 58.7% for the base model; experience accuracy rose from 70.0% to 88.7%.
VRAM usage during inference: 3,361 MB for fp16 and only 1,517 MB in 4-bit QLoRA (NF4) mode with an Overall EM of 76.7%.
Training was performed on a dataset of 1,200 job listings (collected via JobSpy with augmentations) in 20 minutes on two T4 GPUs.










Comments