Downloads · 30 days
34
31% of all-time downloads
razaali1607/qwen3-1.7b-jobpost-lora
qwen3-1.7b-jobpost-lora is a text generation model from razaali1607. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A LoRA adapter for Qwen/Qwen3-1.7B that extracts a strict, flat 16-field JSON schema from unstructured job postings.
Downloads · 30 days
34
31% of all-time downloads
All-time downloads
109
Public
Repo size
81.2 MB
Likes
0
Public
Click a slice to open those files.
.safetensors69.8 MB · 86%
From the Hugging Face model README
A LoRA adapter for Qwen/Qwen3-1.7B that extracts a strict, flat 16-field JSON schema from
unstructured job postings.
It was trained on labels produced by gpt-4o-mini and benchmarked against that same teacher model.
The question the project set out to answer was narrow: can a small open model, fine-tuned on a few
thousand teacher-labelled examples, do this job closely enough to a cheap hosted API to be worth
running yourself?
Short answer: it reaches 0.884 macro-F1 against the teacher's 0.925 while serving 1k documents for $0.139 against $0.480. Read the Limitations before trusting that.
Qwen/Qwen3-1.7B base model <!-- confirm this matches your intent -->Qwen/Qwen3-1.7BGiven the raw text of a job posting, the model emits a single JSON object conforming to a flat 16-field schema (title, company, location, employment type, seniority, salary range, education level, required skills, and similar). It is intended for batch enrichment of job-posting corpora, where the alternative is a per-document call to a hosted API.
The adapter is a reasonable starting point for other strict-schema extraction tasks over short English documents, though it has only been evaluated on job postings and would need re-training for a different schema.
posting_date in particular is unreliable (see below).These are the reasons not to over-read the results table.
Teacher labels are not ground truth. Outside the 300 reviewed documents, every training label
is gpt-4o-mini's opinion, and the model is trained to imitate it, mistakes included. Where the
teacher was checked against a reviewer, its weakest fields were posting_date 0.167,
education_level 0.950 and company 0.957. The first is not a close call: the teacher fabricated
a plausible date for most postings that never stated one, and the fine-tune learned to do the same.
One domain, one seed, one configuration. Job postings only; SEED = 1337 throughout; a single
set of hyperparameters, one LoRA rank, one learning rate. No sweep was run and no confidence
intervals were computed, so nothing here speaks to variance across runs.
The gold set was model_verified, not human-verified end to end. A human audited a
28-document sample and found at least one field error in 25% of them. That residual error rate
is a floor under every accuracy number here — including the teacher's, which is scored against
the same set. There is no inter-annotator agreement figure, because there was one reviewer.
n = 300. The standard error on a per-field F1 at that size is around 0.030, so differences smaller than about three points are not meaningful and should not be ranked. The fine-tune's 0.041 gap to the teacher is real but narrow.
Cost figures are derived, not measured. $/1k docs divides measured throughput by an assumed
$0.35/h GPU rate. A different rate or a spot instance moves the column without anything about
the model changing.
Validate the output against your JSON Schema at the boundary rather than trusting the model to always
emit valid JSON — it does so 99% of the time, not 100%. If you need a hard guarantee of shape, use
constrained decoding, but see the Results section first: it does not improve correctness here, and
it costs latency. Treat posting_date as unusable without a separate rule-based extractor.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
BASE = "Qwen/Qwen3-1.7B"
ADAPTER = "razaali1607/qwen3-1.7b-jobpost-lora"
tok = AutoTokenizer.from_pretrained(BASE)
model = AutoModelForCausalLM.from_pretrained(BASE, torch_dtype="float16", device_map="auto")
model = PeftModel.from_pretrained(model, ADAPTER)
model.eval()
prompt = tok.apply_chat_template(
[{"role": "user", "content": f"Extract the schema as JSON:\n\n{posting_text}"}],
tokenize=False,
add_generation_prompt=True,
) # use the same prompt template as training — see the repo
out = model.generate(**tok(prompt, return_tensors="pt").to(model.device), max_new_tokens=256)
print(tok.decode(out[0], skip_special_tokens=True))
The exact prompt template and the JSON Schema live in the project repository; results will degrade if you deviate from the training-time format.
xanderios/linkedin-job-postings
(MIT), deduplicated and length-filtered.gpt-4o-mini via the OpenAI Batch API, at a total
labelling cost of $1.10.Supervised fine-tuning (TRL SFTTrainer) on teacher-labelled prompt/JSON pairs.
cuda:0 onlyTesting data: the 300-document held-out gold set described above.
Factors: results are disaggregated per schema field in the project repository; fields with fewer
than 30 populated gold values are flagged low-n.
Metrics:
| arm | schema-valid % | macro-F1 | Δ vs teacher | p50 ms/doc (bs 1) | amortized ms/doc @ best batch | $/1k docs |
|---|---|---|---|---|---|---|
base_fewshot | 62.0 | 0.570 | −0.354 | 8900 | 8675 (bs 4) | 0.843 |
base_fewshot_constrained | 91.0 | 0.682 | −0.242 | 12448 | 12448 (bs 1) | 1.211 |
lora_ft (this adapter) | 99.0 | 0.884 | −0.041 | 8616 | 1428 (bs 8) | 0.139 |
lora_ft_constrained | 100.0 | 0.878 | −0.047 | 12852 | 12852 (bs 1) | 1.250 |
teacher (gpt-4o-mini) | 100.0 | 0.925 | ±0.000 | API | API | 0.480 |
| null baseline | — | 0.000 | — | — | — | — |
Latency figures: 10 timed documents × 3 repeats per arm, Tesla T4, fp16, plain
transformers.generate() (no vLLM). The teacher's latency cells read API because its measurement
is sequential network wall-clock from a laptop and is not comparable to a local generate(); its
cost uses standard, not Batch API, rates, since a latency-sensitive deployment cannot wait on a
24-hour queue.
Fine-tuning recovers most of the gap between a prompted small model and the hosted API that taught it: macro-F1 0.570 → 0.884 against a teacher at 0.925, with schema-validity going 62% → 99%.
The result worth carrying away, though, is about constrained decoding. Constraining the decoder to the JSON Schema takes validity from 62% → 91% on the baseline and 99% → 100% on the fine-tune, so validity is essentially free. Accuracy is not. On the baseline the constraint genuinely helps (−0.354 → −0.242 vs teacher) because parse failures were being scored as wrong. On the fine-tune, which already emits valid JSON almost always, macro-F1 moves 0.884 → 0.878 — no improvement, inside the ±0.030 standard error — while single-stream latency rises from 8616 ms to 12852 ms. Constrained decoding guarantees the shape of the answer. It has nothing to say about whether the answer is right.
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
GPU T4 x2 accelerator, one GPU used)Decoder-only causal language model (Qwen3-1.7B) with a LoRA adapter, trained with a next-token-prediction objective on prompt/JSON-completion pairs.
1 × NVIDIA Tesla T4 (16 GB, Turing sm_75). Peak training VRAM 10.07 GB.
PEFT, TRL, Transformers, PyTorch, fp16. vLLM was deliberately not used — its Turing support is
degrading and debugging it would have cost GPU-hours the project did not have. Unsloth, ONNX Runtime
and GGUF export were out of scope. On an A10, L4 or A100 with vLLM, throughput would be substantially
better and the $/1k docs column would drop, so read the cost figures as an upper bound for this
serving path, not as the best achievable.
BibTeX:
@misc{ali2026jobpostlora,
author = {Raza Ali},
title = {Qwen3-1.7B Job-Posting JSON Extraction (LoRA)},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/razaali1607/qwen3-1.7b-jobpost-lora}}
}
APA:
Ali, R. (2026). Qwen3-1.7B job-posting JSON extraction (LoRA) [Model]. Hugging Face. https://huggingface.co/razaali1607/qwen3-1.7b-jobpost-lora
Raza Ali (@razaali1607)