--- library_name: transformers pipeline_tag: text-classification language: - en base_model: bert-base-uncased tags: - text-classification - bert - job-posts - custom_code model-index: - name: goodjob results: - task: type: text-classification dataset: name: GoodJob held-out test split (author-grouped) type: private metrics: - type: accuracy value: 0.872 - type: f1 name: macro-F1 value: 0.854 --- # GoodJob: job post classifier A `bert-base-uncased` model that reads Twitter/X or LinkedIn posts and classifies them into four categories: 1. **ML Job**: software opportunities specific to AI/ML. 2. **Job**: other software engineering opportunities, freelance work, and services. 3. **Other**: paid opportunities outside software. 4. **Not Job**: everything else. It is designed for opportunity-discovery pipelines: scrape posts, filter noise, and surface relevant paid work. ## Labels | Label | Description | |---|---| | `ML Job` | Paid work in software that is specific to AI/ML. | | `Job` | Software engineering work, freelance opportunities, services, or anything that can potentially pay. | | `Other` | Paid work that is not software, such as annotation or RLHF gigs. | | `Not Job` | Everything else, including people looking for work. | `is_job` is derived as `type != "Not Job"`. `p_job` is calculated as `1 - P("Not Job")`, representing the model's estimated probability that a post describes a paid opportunity. ## Usage ```python from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained( "SpiderHomie/goodjob", trust_remote_code=True, ) # Single post -> dict model.predict("We're hiring an ML engineer, DM me") # Many posts -> list of dicts (same order as the input) model.predict(posts, batch_size=64, device="auto") ``` Example output: ```python { "type": "ML Job", "type_probs": { "ML Job": 0.999, "Job": 0.0001, "Other": 0.0003, "Not Job": 0.0006 }, "is_job": True, "p_job": 0.999 } ``` Raw access: ```python out = model(**tokenizer(text, return_tensors="pt")) out.logits # Four-class classification logits ``` ## Evaluation Evaluated on separate validation and held-out test splits, with posts grouped by author to prevent the same account from appearing across train, validation, and test sets. ### Test set performance - Samples: 823 - Accuracy: 89.91% (740/823) - Macro-F1: 0.874 | Class | Precision | Recall | F1 | Support | |---|---:|---:|---:|---:| | ML Job | 0.840 | 0.894 | 0.866 | 94 | | Job | 0.949 | 0.876 | 0.911 | 346 | | Other | 0.865 | 0.847 | 0.856 | 170 | | Not Job | 0.892 | 0.981 | 0.934 | 213 | Confusion matrix (rows = true, columns = predicted; order: ML JOB, JOB, OTHER, NOT JOB): ```text [[ 84, 5, 1, 4], [ 12, 303, 20, 11], [ 4, 9, 144, 13], [ 1, 2, 1, 209]] ``` ### Validation set performance - Samples: 824 - Accuracy: 89.44% (737/824) - Macro-F1: 0.868 | Class | Recall | Support | |---|---:|---:| | ML Job | 90.43% | 94 | | Job | 88.73% | 346 | | Other | 81.29% | 171 | | Not Job | 96.71% | 213 | ### CPU inference performance Measured on CPU with 6 threads, batch size 32, without quantization. Measurements cover model forward-pass time only. | Split | Latency per post | Throughput | |---|---:|---:| | Validation | 27.86 ms | 35.9 posts/s | | Test | 25.62 ms | 39.0 posts/s | ### Error analysis On the held-out test set, 83 of 823 predictions were incorrect (10.09%). The most common errors were: - Job predicted as Other: 20 cases. - Job predicted as ML Job: 12 cases. - Other predicted as Not Job: 13 cases. - ML Job predicted as Not Job: 4 cases. The model performs particularly well at identifying Not Job posts, with 98.12% recall. The largest remaining classification challenge is distinguishing Job from Other. Per-class metrics are based on finite test samples, particularly ML Job (94) and Other (170). Small differences should be interpreted cautiously. ## Important notes - The model uses only the post's text as input. - `is_job` is derived from the four-class prediction. - Use `p_job` with a configurable threshold when filtering opportunities instead of relying exclusively on the predicted class. This allows you to trade precision against recall. - Maximum input length is 256 tokens. Longer posts are truncated.