Views
No views yet
1git lfs install
2git clone https://huggingface.co/team-loxo/jd-acos-extractor-v4
3cd jd-acos-extractor-v4model/model.safetensors, ~3.8 GB) and model/tokenizer.json are
stored in Git LFS and are downloaded automatically by the clone.1python3 -m venv .venv
2source .venv/bin/activate # Windows: .venv\Scripts\activate
3pip install --upgrade pipImportant: Use the PyTorch CUDA 12.8 wheel index. The default PyPI torch is built for CUDA 13 and won't run on common NVIDIA drivers (CUDA 12.x).
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu1281# Single example (uses tests/jd1.txt, prints extraction)
2python run.py run
3
4# Test suite: 3 examples + baseline match check
5python run.py testpython run.py test:Running 3 test examples...
...
SUMMARY
Examples run: 3
Total time: <a few seconds>s
Avg time/example: <a few seconds>s
Baseline matches: 3/3| Problem | Fix |
|---|---|
model.safetensors is a small text file (~150 bytes) | LFS not pulled. Run git lfs install && git lfs pull |
RuntimeError: NVIDIA driver ... too old | Reinstall torch with --extra-index-url https://download.pytorch.org/whl/cu128 |
| Out-of-memory on GPU | Use python run.py run (single example) instead of batched workloads, or set ACOS_DEVICE=cpu |
ModuleNotFoundError: transformers | Forgot to activate venv: source .venv/bin/activate |
1{
2 "core_responsibilities": ["Design ML pipelines", "Collaborate with data team"],
3 "hard_requirements": ["Python", "ML frameworks", "distributed systems"],
4 "bonus_skills": ["PyTorch", "TensorFlow", "Kubernetes"]
5}| Field | Type | Description |
|---|---|---|
core_responsibilities | list[str] | Primary duties and day-to-day responsibilities |
hard_requirements | list[str] | Core skills and technologies required (skill names only, no experience levels) |
bonus_skills | list[str] | Preferred or "nice-to-have" qualifications |
"Python""ML frameworks" (with PyTorch in bonus_skills)deploy/
├── model.py # Model interface and loader (BF16)
├── config.py # Paths and configuration
├── run.py # Orchestration (run/test commands)
├── requirements.txt # Dependencies
├── model/ # Model weights (downloaded from HF)
│ ├── model.safetensors
│ ├── tokenizer.json
│ ├── tokenizer_config.json
│ ├── config.json
│ └── generation_config.json
└── tests/ # Test examples and baseline
├── jd1.txt
├── jd2.txt
├── jd3.txt
└── baseline.json1from model import load_model
2
3# Load model (singleton, BF16)
4extractor = load_model()
5
6# Extract from job description
7jd_text = """
8Senior Software Engineer - Machine Learning
9
10Requirements:
11- 5+ years Python experience
12- Experience with ML frameworks (e.g., PyTorch, TensorFlow)
13"""
14
15result = extractor.extract(jd_text)
16print(result)
17# {
18# "core_responsibilities": [...],
19# "hard_requirements": ["Python", "ML frameworks"],
20# "bonus_skills": ["PyTorch", "TensorFlow"]
21# }
22
23# Batch extraction (recommended for production)
24jd_texts = [jd1, jd2, jd3, ...] # List of job descriptions
25results = extractor.extract_batch(jd_texts, batch_size=128)| Component | Value | Notes |
|---|---|---|
| System prompt | 382 chars / 78 tokens | Inference-optimized (shorter than training prompt for speed) |
| User message format | "Extract structured data...{jd_text}" | Matches eval/benchmark configuration |
| MAX_LENGTH | 1,500 tokens | Matches benchmark setup |
| Chat template | qwen (chat_template.jinja) | Matches training |
| Tokenizer | Qwen3.5-2B | Matches training |
| Precision | BF16 | Matches training |
The model is robust to prompt variations: the shorter inference prompt achieves 91.8% F1 with significantly faster throughput than the original 1,471-char training prompt would.
| Metric | Value |
|---|---|
| Precision | 91.8% |
| Recall | 91.8% |
| F1 | 91.8% |
P and R converge at entity-level because each sample produces one extraction event: a wrong extraction simultaneously counts as both FP and FN for that sample.
| Verdict | Count | % of failures | Meaning |
|---|---|---|---|
| A | 157 | 35.8% | Real model errors |
| B | 121 | 27.6% | Gold label has spurious items, model OK |
| BOTH_OK | 21 | 4.8% | Both acceptable |
| NEITHER | 111 | 25.3% | Both have problems |
| Judge ERROR | 28 | 6.4% | Adjudication failed |
| Field | Precision | Recall | F1 |
|---|---|---|---|
| core_responsibilities | 78.6% | 72.6% | 75.5% |
| hard_requirements | 65.4% | 46.8% | 54.6% |
| bonus_skills | 71.8% | 39.6% | 51.1% |
| Overall | 73.2% | 58.3% | 64.9% |
Item-level recall is dragged down by gold label issues — 27.6% of hard failures were gold containing items NOT in the JD. True item recall is higher.
| Batch Size | Samples/sec | Latency P50 |
|---|---|---|
| 16 | 0.94 | 1046ms |
| 32 | 1.51 | 657ms |
| 64 | 2.65 | 381ms |
| 128 (optimal) | 5.89 | 168ms |
| Spec | Value |
|---|---|
| Model Size | 3.76 GB |
| Precision | BF16 |
| JSON Parse Rate | 100% |
| Max New Tokens | 400 (retry: 600) |
| Max Input Length | 1500 tokens |
| Max JD Characters | 2500 |
v4_production_report.html.model/ directory only (no remote HF fetch)model/model.safetensors exists and is not a Git LFS pointerpip install -r requirements.txttests/1# Check model file is real (not LFS pointer)
2head -c 64 model/model.safetensors | xxd
3# Should NOT show "version https://git-lfs"