AP678 commited on
Commit
cebd649
·
verified ·
1 Parent(s): c5debc4

Add trained job-title NER model

Browse files
Files changed (5) hide show
  1. README.md +54 -3
  2. config.json +40 -0
  3. model.safetensors +3 -0
  4. tokenizer.json +0 -0
  5. tokenizer_config.json +16 -0
README.md CHANGED
@@ -1,3 +1,54 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: apache-2.0
4
+ tags:
5
+ - ner
6
+ - token-classification
7
+ - job-title
8
+ - bert
9
+ base_model: dslim/bert-base-NER
10
+ ---
11
+
12
+ # Job Title NER
13
+
14
+ Fine-tuned from [dslim/bert-base-NER](https://huggingface.co/dslim/bert-base-NER) to extract
15
+ a single job title span from a job description.
16
+
17
+ | Label | Meaning |
18
+ |---|---|
19
+ | `B-JOB_TITLE` | First token of the job title |
20
+ | `I-JOB_TITLE` | Continuation token of the job title |
21
+ | `O` | Not part of a job title |
22
+
23
+ The model returns an empty sequence when no job title is detectable in the text.
24
+
25
+ ## Usage
26
+
27
+ ```python
28
+ from transformers import pipeline
29
+
30
+ pipe = pipeline(
31
+ "ner",
32
+ model="./job_title_ner_model",
33
+ aggregation_strategy="simple",
34
+ )
35
+
36
+ text = """
37
+ We are seeking a Senior Data Engineer to join our platform team.
38
+ You will design and maintain our data pipelines at scale.
39
+ """
40
+
41
+ results = pipe(text)
42
+ job_titles = [r for r in results if r["entity_group"] == "JOB_TITLE"]
43
+ print(job_titles)
44
+ # [{ 'entity_group': 'JOB_TITLE', 'score': 0.99, 'word': 'Senior Data Engineer', ... }]
45
+ ```
46
+
47
+ ## Training
48
+
49
+ - **Base model:** `dslim/bert-base-NER`
50
+ - **Dataset:** ~137K job descriptions scraped from job boards
51
+ - **Positives:** up to 30 000 examples with a labeled title span
52
+ - **Negatives:** up to 10 000 examples with all-O labels (no title found)
53
+ - **Label scheme:** BIO — O / B-JOB_TITLE / I-JOB_TITLE
54
+ - **Max sequence length:** 384 tokens
config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_num_labels": 9,
3
+ "add_cross_attention": false,
4
+ "architectures": [
5
+ "BertForTokenClassification"
6
+ ],
7
+ "attention_probs_dropout_prob": 0.1,
8
+ "bos_token_id": null,
9
+ "classifier_dropout": null,
10
+ "dtype": "float32",
11
+ "eos_token_id": null,
12
+ "hidden_act": "gelu",
13
+ "hidden_dropout_prob": 0.1,
14
+ "hidden_size": 768,
15
+ "id2label": {
16
+ "0": "O",
17
+ "1": "B-JOB_TITLE",
18
+ "2": "I-JOB_TITLE"
19
+ },
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 3072,
22
+ "is_decoder": false,
23
+ "label2id": {
24
+ "B-JOB_TITLE": 1,
25
+ "I-JOB_TITLE": 2,
26
+ "O": 0
27
+ },
28
+ "layer_norm_eps": 1e-12,
29
+ "max_position_embeddings": 512,
30
+ "model_type": "bert",
31
+ "num_attention_heads": 12,
32
+ "num_hidden_layers": 12,
33
+ "output_past": true,
34
+ "pad_token_id": 0,
35
+ "tie_word_embeddings": true,
36
+ "transformers_version": "5.8.0",
37
+ "type_vocab_size": 2,
38
+ "use_cache": false,
39
+ "vocab_size": 28996
40
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:299e0d380d6f49574ff4db36447d7ce8fbae2dd9e37289483bea62340ac4d688
3
+ size 430911284
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "cls_token": "[CLS]",
4
+ "do_lower_case": false,
5
+ "is_local": false,
6
+ "local_files_only": false,
7
+ "mask_token": "[MASK]",
8
+ "max_len": 512,
9
+ "model_max_length": 512,
10
+ "pad_token": "[PAD]",
11
+ "sep_token": "[SEP]",
12
+ "strip_accents": null,
13
+ "tokenize_chinese_chars": true,
14
+ "tokenizer_class": "BertTokenizer",
15
+ "unk_token": "[UNK]"
16
+ }