Views
No views yet
1from unsloth import FastLanguageModel
2import json
3
4# Load model from HuggingFace
5model, tokenizer = FastLanguageModel.from_pretrained(
6 model_name="HelixCipher/job-posting-extractor-qwen",
7 max_seq_length=2048,
8 load_in_4bit=True,
9)
10FastLanguageModel.for_inference(model)
11
12# Example input
13job_markdown = """# Job Position
14**Position:** Senior Python Developer
15**Company:** TechCorp
16**Location:** San Francisco, CA
17
18## Job Description
19We are looking for an experienced Python developer...
20"""
21
22# Extract JSON
23messages = [
24 {"role": "system", "content": "You are a JSON extraction assistant. Always output ONLY valid JSON."},
25 {"role": "user", "content": f"Extract job fields as JSON.\n\n{job_markdown}"}
26]
27
28prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
29
30inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
31
32outputs = model.generate(**inputs, max_new_tokens=500, temperature=0.1)
33
34result = tokenizer.decode(outputs[0], skip_special_tokens=True)
35
36print(result)HelixCipherThis work is based on Fine-Tuning An Local LLM for Web Scraping byHelixCipher.
Original source: https://github.com/HelixCipher/fine-tuning-an-local-llm-for-web-scraping
Licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0).
1@software{job_posting_extractor,
2 author = {HelixCipher},
3 title = {Job Posting Extractor - Qwen2.5-3B Fine-tuned Model},
4 year = {2026},
5 url = {https://huggingface.co/HelixCipher/job-posting-extractor-qwen}
6}